From 6fd283cc386477fef8770ba3214bd83ab6a12d9c Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Tue, 4 Aug 2020 14:28:02 +0000 Subject: [PATCH] Fix openvk::tr() --- bootstrap.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bootstrap.php b/bootstrap.php index 5be2b04f..404e5433 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -80,7 +80,13 @@ function tr(string $stringId, ...$variables): string } $newOutput = $localizer->_($numberedStringId, $lang); - $output = $newOutput === "@$numberedStringId" ? $output : $newOutput; + if($newOutput === "@$numberedStringId") { + $newOutput = $localizer->_($stringId . "_other", $lang); + if($newOutput === ("@" . $stringId . "_other")) + $newOutput = $output; + } + + $output = $newOutput; } for($i = 0; $i < sizeof($variables); $i++)