Bug fix in smarty block.t plugin

Equal instead of assign for plural text translate calls.

Update smarty tests with more detail checks of translations
This commit is contained in:
Clemens Schwaighofer
2022-04-18 10:52:37 +09:00
parent daf1f9263c
commit 3c35341e8b
3 changed files with 26 additions and 5 deletions

View File

@@ -160,6 +160,12 @@ _textdomain($domain);
_bindtextdomain($domain, $path);
_bind_textdomain_codeset($domain, $encoding);
echo "INPUT TEST $locale: " . $string . " => " . __($string) . "<br>";
$single_string = 'single';
$multi_string = 'multi';
for ($n = 0; $n <= 3; $n++) {
echo "MULTI TEST $n: " . $single_string . "/" . $multi_string . " => "
. _ngettext($single_string, $multi_string, $n) . "<br>";
}
$locale = 'en_US.UTF-8';
_setlocale(LC_MESSAGES, $locale);
@@ -167,6 +173,12 @@ _textdomain($domain);
_bindtextdomain($domain, $path);
_bind_textdomain_codeset($domain, $encoding);
echo "INPUT TEST $locale: " . $string . " => " . __($string) . "<br>";
$single_string = 'single';
$multi_string = 'multi';
for ($n = 0; $n <= 3; $n++) {
echo "MULTI TEST $n: " . $single_string . "/" . $multi_string . " => "
. _ngettext($single_string, $multi_string, $n) . "<br>";
}
print "</body></html>";