1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 01:04:16 +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
$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 === "=") {
$value = $text;
} else if($value === "+") {
$v = $language->translator()->commonTranslation($text);
$value = empty($v) ? $text : $v;
} else {
$value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
}
return $value;
}