diff options
author | Oliver Tappe | 2006-10-06 22:26:57 +0200 |
---|---|---|
committer | Oliver Tappe | 2006-10-06 22:26:57 +0200 |
commit | cd031c89ff38e56588cbccef259d6aecc34a73ae (patch) | |
tree | 118a1172ff351cbaba43c60b6964e8ec47ffdaea /config-db | |
parent | * fixed format of error-message. (diff) | |
download | core-cd031c89ff38e56588cbccef259d6aecc34a73ae.tar.gz core-cd031c89ff38e56588cbccef259d6aecc34a73ae.tar.xz core-cd031c89ff38e56588cbccef259d6aecc34a73ae.zip |
* added canonicalization of '\n' and '\t' to _tr().
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@452 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rw-r--r-- | config-db/OpenSLX/Basics.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config-db/OpenSLX/Basics.pm b/config-db/OpenSLX/Basics.pm index 128f9cfb..7021cb95 100644 --- a/config-db/OpenSLX/Basics.pm +++ b/config-db/OpenSLX/Basics.pm @@ -222,12 +222,16 @@ sub trInit # ------------------------------------------------------------------------------ sub _tr { - my $trKey = shift; + my $trOrig = shift; + + my $trKey = $trOrig; + $trKey =~ s[\n][\\n]g; + $trKey =~ s[\t][\\t]g; my $formatStr = $translations{$trKey}; if (!defined $formatStr) { # carp "Translation key '$trKey' not found."; - $formatStr = $trKey; + $formatStr = $trOrig; } return sprintf($formatStr, @_); } |