diff --git a/lib/WebGUI/i18n/English/Automated_Information.pm b/lib/WebGUI/i18n/English/Automated_Information.pm new file mode 100644 index 000000000..3fb42d475 --- /dev/null +++ b/lib/WebGUI/i18n/English/Automated_Information.pm @@ -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 '', '
| ',WebGUI::International::get('macro name', 'Macros'), + ' | ', + WebGUI::International::get('macro shortcut', 'Macros'), + ' |
|---|
| ',WebGUI::International::get('macro name', 'Macros'), - ' | ', - WebGUI::International::get('macro shortcut', 'Macros'), - ' |
|---|
The set of available Macros is defined in the WebGUI configuration file. These Macros are available for use on your site:
|.$macro_table, + message => q|The set of available Macros is defined in the WebGUI configuration file. These Macros are available for use on your site:
+^International("macro table","Automated_Information"); +|, context => 'Content for dynamically generated macro list', - lastUpdated => 1112560683, + lastUpdated => 1114134745, }, 'macro enabled' => {