diff --git a/lib/WebGUI/i18n/English/CanEditText.pm b/lib/WebGUI/i18n/English/CanEditText.pm
index 6c6e008ee..2db028324 100644
--- a/lib/WebGUI/i18n/English/CanEditText.pm
+++ b/lib/WebGUI/i18n/English/CanEditText.pm
@@ -10,8 +10,9 @@ our $I18N = {
'can edit text body' => {
message => q|
-^CanEditText();
-Display a message to a user that can edit the current page.
+^CanEditText(text message);
+Display a message to a user that can edit the current page. The message can be
+HTML or WebGUI Macros.
Example: ^CanEditText(^AdminToggle;);
diff --git a/lib/WebGUI/i18n/English/Macros.pm b/lib/WebGUI/i18n/English/Macros.pm index e03408be8..9474d6c4b 100644 --- a/lib/WebGUI/i18n/English/Macros.pm +++ b/lib/WebGUI/i18n/English/Macros.pm @@ -1,13 +1,60 @@ package WebGUI::i18n::English::Macros; +use WebGUI::Session; +use WebGUI::International; + our $I18N = { + + 'macro name' => { + message => q|Macro Name|, + lastUpdated => 1112591288 + }, + + 'macro shortcut' => { + message => q|Macro Shortcut|, + 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/\.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'), + ' |
|---|
The set of available Macros is defined in the WebGUI configuration file. These Macros are available for use on your site:
|, + message => q|The set of available Macros is defined in the WebGUI configuration file. These Macros are available for use on your site:
|.$macro_table, context => 'Content for dynamically generated macro list', lastUpdated => 1112560683, }, diff --git a/lib/WebGUI/i18n/English/a_account.pm b/lib/WebGUI/i18n/English/a_account.pm index b4099e687..004928e1e 100644 --- a/lib/WebGUI/i18n/English/a_account.pm +++ b/lib/WebGUI/i18n/English/a_account.pm @@ -3,7 +3,7 @@ package WebGUI::i18n::English::a_account; our $I18N = { 'account title' => { - message => q|My Account Macro|, + message => q|Account Macro|, lastUpdated => 1112466408, },