diff options
author | Loui Chang <louipc.ist@gmail.com> | 2009-04-13 09:55:04 -0400 |
---|---|---|
committer | Loui Chang <louipc.ist@gmail.com> | 2009-04-13 09:55:04 -0400 |
commit | f028d5c1409c1083e742fceeb1651cce7fd54ec2 (patch) | |
tree | 19e882722779fbb237a3d5d19fceaf946b88eec5 /web | |
parent | 4d697dc42b3115b73888202de45e797ffb6150c5 (diff) | |
download | aurweb-f028d5c1409c1083e742fceeb1651cce7fd54ec2.tar.xz |
translator.inc: Eliminate notices for untranslated strings.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
-rw-r--r-- | web/lib/translator.inc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/web/lib/translator.inc b/web/lib/translator.inc index 24ede1a..da89e9e 100644 --- a/web/lib/translator.inc +++ b/web/lib/translator.inc @@ -43,8 +43,7 @@ function __() { global $_t; global $LANG; - # create the translation, if it doesn't exist, highlight it - # + # Create the translation. $args = func_get_args(); # First argument is always string to be translated @@ -52,12 +51,14 @@ function __() { if (empty($LANG) || $LANG == DEFAULT_LANG) $translated = $tag; - else - $translated = $_t[$tag]; - - # If there is no translation, just print the given string. - if (empty($translated)) { - $translated = $tag; + else { + # If there is no translation, just print the given string. + if (empty($_t[$tag])) { + $translated = $tag; + } + else { + $translated = $_t[$tag]; + } } $translated = htmlspecialchars($translated, ENT_QUOTES); |