fix lookup of English language tags when translation fails
This commit is contained in:
parent
a0d3c2d17c
commit
bdb88b6c6d
5 changed files with 84 additions and 12 deletions
27
t/supporting_collateral/PigLatin.pm
Normal file
27
t/supporting_collateral/PigLatin.pm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package WebGUI::i18n::PigLatin;
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
our $LANGUAGE = {
|
||||
label => 'PigLatin',
|
||||
toolbar => 'bullet',
|
||||
languageAbbreviation => 'PL', # used by plugins such as javascript helpers and third-party perl modules
|
||||
locale => 'US' # same as above
|
||||
};
|
||||
|
||||
sub makeUrlCompliant {
|
||||
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;
|
||||
11
t/supporting_collateral/WebGUI.pm
Normal file
11
t/supporting_collateral/WebGUI.pm
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package WebGUI::i18n::PigLatin::WebGUI;
|
||||
|
||||
our $I18N = {
|
||||
'webgui' => {
|
||||
message => q|ebGUIWay|,
|
||||
lastUpdated => 1141963573,
|
||||
context => q|Test key for International macro test. DO NOT TRANSLATE|,
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue