mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Fix issue processwire/processwire-issues#163
This commit is contained in:
@@ -40,12 +40,14 @@ function __($text, $textdomain = null, $context = '') {
|
|||||||
// common translation
|
// common translation
|
||||||
$textdomain = 'wire/modules/LanguageSupport/LanguageTranslator.php';
|
$textdomain = 'wire/modules/LanguageSupport/LanguageTranslator.php';
|
||||||
}
|
}
|
||||||
$value = htmlspecialchars($language->translator()->getTranslation($textdomain, $text, $context), ENT_QUOTES, 'UTF-8');
|
$value = $language->translator()->getTranslation($textdomain, $text, $context);
|
||||||
if($value === "=") {
|
if($value === "=") {
|
||||||
$value = $text;
|
$value = $text;
|
||||||
} else if($value === "+") {
|
} else if($value === "+") {
|
||||||
$v = $language->translator()->commonTranslation($text);
|
$v = $language->translator()->commonTranslation($text);
|
||||||
$value = empty($v) ? $text : $v;
|
$value = empty($v) ? $text : $v;
|
||||||
|
} else {
|
||||||
|
$value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user