mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
translator.inc: Eliminate notices for untranslated strings.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
4d697dc42b
commit
f028d5c140
1 changed files with 9 additions and 8 deletions
|
@ -43,8 +43,7 @@ function __() {
|
||||||
global $_t;
|
global $_t;
|
||||||
global $LANG;
|
global $LANG;
|
||||||
|
|
||||||
# create the translation, if it doesn't exist, highlight it
|
# Create the translation.
|
||||||
#
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
|
||||||
# First argument is always string to be translated
|
# First argument is always string to be translated
|
||||||
|
@ -52,13 +51,15 @@ function __() {
|
||||||
|
|
||||||
if (empty($LANG) || $LANG == DEFAULT_LANG)
|
if (empty($LANG) || $LANG == DEFAULT_LANG)
|
||||||
$translated = $tag;
|
$translated = $tag;
|
||||||
else
|
else {
|
||||||
$translated = $_t[$tag];
|
|
||||||
|
|
||||||
# If there is no translation, just print the given string.
|
# If there is no translation, just print the given string.
|
||||||
if (empty($translated)) {
|
if (empty($_t[$tag])) {
|
||||||
$translated = $tag;
|
$translated = $tag;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$translated = $_t[$tag];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$translated = htmlspecialchars($translated, ENT_QUOTES);
|
$translated = htmlspecialchars($translated, ENT_QUOTES);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue