fix for CGI based translator
This commit is contained in:
parent
6458873c02
commit
ec7f7a7d9e
2 changed files with 42 additions and 38 deletions
38
lib/WebGUI/i18n/English/Automated_Information.pm
Normal file
38
lib/WebGUI/i18n/English/Automated_Information.pm
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
package WebGUI::i18n::English::Automated_Information;
|
||||
|
||||
use WebGUI::Session;
|
||||
use WebGUI::International;
|
||||
|
||||
##Get list of all macros by namespace/module name
|
||||
my $dir = join $session{os}{slash}, $session{config}{webguiRoot},"lib","WebGUI","Macro";
|
||||
opendir (DIR,$dir) or WebGUI::ErrorHandler::fatal("Can't open Macro directory: $dir!");
|
||||
my @macros = map { s/Macro_//; s/\.pm//; $_; }
|
||||
grep { /\.pm$/ }
|
||||
readdir(DIR); ##list of namespaces
|
||||
closedir(DIR);
|
||||
|
||||
##Build list of enabled macros, by namespace by reversing session hash:
|
||||
my %macros = reverse %{ $session{config}{macros} };
|
||||
|
||||
$macro_table =
|
||||
join "\n",
|
||||
map { join '', '<tr><td>', $_, '</td><td>',
|
||||
($macros{$_} ? ('^', $macros{$_}, '();') : ' '),
|
||||
'</td></tr>' }
|
||||
@macros;
|
||||
|
||||
$macro_table =
|
||||
join("\n",
|
||||
'<table border="1" cellpadding="3">',
|
||||
'<tr><th>',WebGUI::International::get('macro name', 'Macros'),
|
||||
'</th><th>',
|
||||
WebGUI::International::get('macro shortcut', 'Macros'),
|
||||
'</th></tr>',$macro_table,'</table>');
|
||||
|
||||
our $I18N = {
|
||||
'macro table' => {
|
||||
message => $macro_table,
|
||||
lastUpdated => 1112466408,
|
||||
}
|
||||
};
|
||||
1;
|
||||
|
|
@ -1,8 +1,5 @@
|
|||
package WebGUI::i18n::English::Macros;
|
||||
|
||||
use WebGUI::Session;
|
||||
use WebGUI::International;
|
||||
|
||||
our $I18N = {
|
||||
|
||||
'macro name' => {
|
||||
|
|
@ -15,48 +12,17 @@ our $I18N = {
|
|||
lastUpdated => 1112591289
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
##Get list of all macros by namespace/module name
|
||||
my $dir = join $session{os}{slash}, $session{config}{webguiRoot},"lib","WebGUI","Macro";
|
||||
opendir (DIR,$dir) or WebGUI::ErrorHandler::fatal("Can't open Macro directory: $dir!");
|
||||
my @macros = map { s/Macro_//; s/\.pm//; $_; }
|
||||
grep { /\.pm$/ }
|
||||
readdir(DIR); ##list of namespaces
|
||||
closedir(DIR);
|
||||
|
||||
##Build list of enabled macros, by namespace by reversing session hash:
|
||||
my %macros = reverse %{ $session{config}{macros} };
|
||||
|
||||
$macro_table =
|
||||
join "\n",
|
||||
map { join '', '<tr><td>', $_, '</td><td>',
|
||||
($macros{$_} ? ('^', $macros{$_}, '();') : ' '),
|
||||
'</td></tr>' }
|
||||
@macros;
|
||||
|
||||
$macro_table =
|
||||
join("\n",
|
||||
'<table border="1" cellpadding="3">',
|
||||
'<tr><th>',WebGUI::International::get('macro name', 'Macros'),
|
||||
'</th><th>',
|
||||
WebGUI::International::get('macro shortcut', 'Macros'),
|
||||
'</th></tr>',$macro_table,'</table>');
|
||||
|
||||
|
||||
$I18N = {
|
||||
|
||||
%{ $I18N },
|
||||
|
||||
'macros list title' => {
|
||||
message => q|Macros, List of Available|,
|
||||
lastUpdated => 1112395935,
|
||||
},
|
||||
|
||||
'macros list body' => {
|
||||
message => q|<P>The set of available Macros is defined in the WebGUI configuration file. These Macros are available for use on your site:</P>|.$macro_table,
|
||||
message => q|<P>The set of available Macros is defined in the WebGUI configuration file. These Macros are available for use on your site:</P>
|
||||
^International("macro table","Automated_Information");
|
||||
|,
|
||||
context => 'Content for dynamically generated macro list',
|
||||
lastUpdated => 1112560683,
|
||||
lastUpdated => 1114134745,
|
||||
},
|
||||
|
||||
'macro enabled' => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue