1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00
This commit is contained in:
Ryan Cramer
2017-02-01 08:28:24 -05:00
parent 144bd01619
commit 8e08e0d5ac

View File

@@ -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;
} }