From 6782f5fcacada8c9ae793e884c4f12fc83cf759f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 9 Nov 2005 13:16:25 +0000 Subject: [PATCH] just a little cleanup of colin's skels --- lib/WebGUI/Help/{_Help.pm => _help.skeleton} | 0 .../i18n/English/{_i18n.pm => _i18n.skeleton} | 4 ++- lib/WebGUI/i18n/_language.skeleton | 27 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) rename lib/WebGUI/Help/{_Help.pm => _help.skeleton} (100%) rename lib/WebGUI/i18n/English/{_i18n.pm => _i18n.skeleton} (63%) create mode 100644 lib/WebGUI/i18n/_language.skeleton diff --git a/lib/WebGUI/Help/_Help.pm b/lib/WebGUI/Help/_help.skeleton similarity index 100% rename from lib/WebGUI/Help/_Help.pm rename to lib/WebGUI/Help/_help.skeleton diff --git a/lib/WebGUI/i18n/English/_i18n.pm b/lib/WebGUI/i18n/English/_i18n.skeleton similarity index 63% rename from lib/WebGUI/i18n/English/_i18n.pm rename to lib/WebGUI/i18n/English/_i18n.skeleton index 0e2c568fa..cf732820b 100644 --- a/lib/WebGUI/i18n/English/_i18n.pm +++ b/lib/WebGUI/i18n/English/_i18n.skeleton @@ -3,12 +3,14 @@ package WebGUI::i18n::English::_i18n; ##Be sure to change the package name to m our $I18N = { ##hashref of hashes 'key1' => { ##key that will be used to reference this entry. Do not translate this. message => q|Internationalized message. WebGUI Macros work in here. Please use XHTML format for markup|, - lastUpdated => 1131394070, #seconds from the epoch, + lastUpdated => 1131394070, #seconds from the epoch + context => q|Provide some context to let the translator know what this message is used for.| }, 'key2' => { message => q|Second message.|, lastUpdated => 1131394072, + context => q|Provide some context to let the translator know what this message is used for.| }, }; diff --git a/lib/WebGUI/i18n/_language.skeleton b/lib/WebGUI/i18n/_language.skeleton new file mode 100644 index 000000000..6ef3e4a31 --- /dev/null +++ b/lib/WebGUI/i18n/_language.skeleton @@ -0,0 +1,27 @@ +package WebGUI::i18n::LanguageName; # change LanguageName to your language + +use strict; + + +our $LANGUAGE = { + label => 'English', # the language as it will appear to and users + toolbar => 'metal', # choose a toolbar from www/extras/toolbar/ + languageAbbreviation => 'en', # used by plugins such as javascript helpers and third-party perl modules + locale => 'US' # same as above +}; + +sub makeUrlCompliant { # you have to have this method, but it can do URL transcoding for your language + my $value = shift; + $value =~ s/\s+$//; #removes trailing whitespace + $value =~ s/^\s+//; #removes leading whitespace + $value =~ s/ /-/g; #replaces whitespace with hyphens + $value =~ s/\.$//; #removes trailing period + $value =~ s/[^A-Za-z0-9\-\.\_\/]//g; #removes all funky characters + $value =~ s/^\///; #removes a leading / + $value =~ s/\/$//; #removes a trailing / + $value =~ s/\/\//\//g; #removes double / + return $value; +} + + +1;