Skip to content
Snippets Groups Projects
Commit 010618d0 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix

parent 887b7069
Branches
Tags
No related merge requests found
...@@ -81,7 +81,8 @@ class Translate ...@@ -81,7 +81,8 @@ class Translate
// This may happen if you forget to set a variable and then run undefinedVar through the trans-filter // This may happen if you forget to set a variable and then run undefinedVar through the trans-filter
$original = $original ?? 'undefined variable'; $original = $original ?? 'undefined variable';
$text = Translator::$current->gettext($original); $loc = new Localization(Configuration::getInstance());
$text = $loc->getTranslator()->gettext($original);
if (func_num_args() === 1) { if (func_num_args() === 1) {
return $text; return $text;
...@@ -107,7 +108,8 @@ class Translate ...@@ -107,7 +108,8 @@ class Translate
// This may happen if you forget to set a variable and then run undefinedVar through the trans-filter // This may happen if you forget to set a variable and then run undefinedVar through the trans-filter
$original = $original ?? 'undefined variable'; $original = $original ?? 'undefined variable';
$text = Translator::$current->ngettext($original, $plural, $value); $loc = new Localization(Configuration::getInstance());
$text = $loc->getTranslator()->ngettext($original, $plural, $value);
if (func_num_args() === 3) { if (func_num_args() === 3) {
return $text; return $text;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment