diff --git a/lib/WebGUI/Asset/Wobject/HttpProxy.pm b/lib/WebGUI/Asset/Wobject/HttpProxy.pm index 1d1966a4d..e542a1a44 100644 --- a/lib/WebGUI/Asset/Wobject/HttpProxy.pm +++ b/lib/WebGUI/Asset/Wobject/HttpProxy.pm @@ -397,8 +397,7 @@ sub view { } } else { # Fetching page failed... $var{header} = "text/html"; - $var{content} = "Getting $proxiedUrl failed". - "

GET status line: ".$response->status_line.""; + $var{content} = sprintf $i18n->get('fetch page error'), $proxiedUrl, $proxiedUrl, $response->status_line; } unless ($self->get("cacheTimeout") <= 10) { $cacheContent->set($var{content},$self->get("cacheTimeout")); diff --git a/lib/WebGUI/Help/Asset_HttpProxy.pm b/lib/WebGUI/Help/Asset_HttpProxy.pm index 783af8865..09dd1ae6b 100644 --- a/lib/WebGUI/Help/Asset_HttpProxy.pm +++ b/lib/WebGUI/Help/Asset_HttpProxy.pm @@ -6,8 +6,8 @@ our $HELP = { body => '11', isa => [ { - namespace => "Asset_Wobject", - tag => "wobject add/edit" + namespace => 'Asset_Wobject', + tag => 'wobject add/edit', }, ], fields => [ @@ -75,58 +75,124 @@ our $HELP = { related => [ { tag => 'asset fields', - namespace => 'Asset' + namespace => 'Asset', }, { tag => 'wobject add/edit', - namespace => 'Asset_Wobject' + namespace => 'Asset_Wobject', }, { tag => 'http proxy template', - namespace => 'Asset_HttpProxy' + namespace => 'Asset_HttpProxy', }, { tag => 'content filtering', - namespace => 'WebGUI' + namespace => 'WebGUI', }, - ] + ], }, 'http proxy template' => { title => 'http proxy template title', body => 'http proxy template body', + isa => [ + { + namespace => 'Asset_HttpProxy', + tag => 'http proxy asset template variables', + }, + { + namespace => 'Asset_Template', + tag => 'template variables', + }, + { + namespace => 'Asset', + tag => 'asset template', + }, + ], fields => [ ], variables => [ { - 'name' => 'header' + 'name' => 'header', }, { - 'name' => 'content' + 'name' => 'content', }, { - 'name' => 'search.for' + 'name' => 'search.for', }, { - 'name' => 'stop.at' + 'name' => 'stop.at', }, { - 'name' => 'content.leading' + 'name' => 'content.leading', }, { - 'name' => 'content.trailing' - } + 'name' => 'content.trailing', + }, ], related => [ { tag => 'http proxy add/edit', - namespace => 'Asset_HttpProxy' + namespace => 'Asset_HttpProxy', }, + ], + }, + + 'http proxy asset template variables' => { + title => 'http proxy asset template variables title', + body => 'http proxy asset template variables body', + isa => [ { - tag => 'template language', - namespace => 'Asset_Template' + namespace => 'Asset_Wobject', + tag => 'wobject template variables', }, - ] + ], + fields => [ + ], + variables => [ + { + 'name' => 'templateId', + }, + { + 'name' => 'proxiedUrl', + }, + { + 'name' => 'useAmpersand', + }, + { + 'name' => 'timeout', + }, + { + 'name' => 'removeStyle', + }, + { + 'name' => 'cacheTimeout', + }, + { + 'name' => 'filterHtml', + }, + { + 'name' => 'followExternal', + }, + { + 'name' => 'rewriteUrls', + }, + { + 'name' => 'followRedirect', + }, + { + 'name' => 'searchFor', + }, + { + 'name' => 'stopAt', + }, + { + 'name' => 'cookieJarStorageId', + }, + ], + related => [ + ], }, }; diff --git a/lib/WebGUI/i18n/English/Asset_HttpProxy.pm b/lib/WebGUI/i18n/English/Asset_HttpProxy.pm index 45bac6ed6..e5e806629 100644 --- a/lib/WebGUI/i18n/English/Asset_HttpProxy.pm +++ b/lib/WebGUI/i18n/English/Asset_HttpProxy.pm @@ -197,6 +197,89 @@ our $I18N = { context => q|This entry is used to tell the user that the HttpProxy cannot leave this URL. Please leeave the %s part of the string as is, since this entry is used in sprintf|, }, + 'http proxy asset template variables title' => { + message => q|Http Proxy Asset Template Variables|, + lastUpdated => 1168994434 + }, + + 'http proxy asset template variables body' => { + message => q|Every asset provides a set of variables to most of its +templates based on the internal asset properties. Some of these variables may +be useful, others may not.|, + lastUpdated => 1168994436 + }, + + 'templateId' => { + message => q|The ID of the template used to display the output of the Http Proxy.|, + lastUpdated => 1168994434 + }, + + 'proxiedUrl' => { + message => q|The URL to proxy.|, + lastUpdated => 1168994434 + }, + + 'useAmpersand' => { + message => q|A conditional which is true if the Http Proxy has been set to join parameters in the URL.|, + lastUpdated => 1168994434 + }, + + 'timeout' => { + message => q|The amount of time in seconds that WebGUI will wait for a connection before giving up on an external page.|, + lastUpdated => 1168994613 + }, + + 'removeStyle' => { + message => q|A conditional that will be true if the Http Proxy was configured to remove the stylesheet from the proxied page and replace it with the stylesheet from your site.|, + lastUpdated => 1168994613 + }, + + 'cacheTimeout' => { + message => q|The amount of time in seconds output from the Http Proxy will be cached.|, + lastUpdated => 1168994613 + }, + + 'filterHtml' => { + message => q|The level of HTML filtering that has been set for proxied content.|, + lastUpdated => 1168994613 + }, + + 'followExternal' => { + message => q|A conditional that is true if the Http Proxy is set up to allow it follow external links.|, + lastUpdated => 1168994613 + }, + + 'rewriteUrls' => { + message => q|A conditional that is true if the Http Proxy is set up to rewrite external links.|, + lastUpdated => 1168994613 + }, + + 'followRedirect' => { + message => q|A conditional that is true if the Http Proxy is set up to follow redirects.|, + lastUpdated => 1168994613 + }, + + 'searchFor' => { + message => q|A search string that will define the starting point for displayed content.|, + lastUpdated => 1168994613 + }, + + 'stopAt' => { + message => q|A search string that will define the stopping point for displayed content.|, + lastUpdated => 1168994613 + }, + + 'cookieJarStorageId' => { + message => q|The ID of the storage object where cookies will be stored.|, + lastUpdated => 1168994613 + }, + + 'fetch page error' => { + message => q|Getting %s failed

GET status line: %s|, + context => q|Translator note: the "%s" tokens in the message should not be translated.|, + lastUpdated => 1168994613 + }, + }; 1;