Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
aurweb
Commits
f028d5c1
Commit
f028d5c1
authored
Apr 13, 2009
by
Loui Chang
Browse files
translator.inc: Eliminate notices for untranslated strings.
Signed-off-by:
Loui Chang
<
louipc.ist@gmail.com
>
parent
4d697dc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/lib/translator.inc
View file @
f028d5c1
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment