1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Format numbers in translations

This commit is contained in:
Jakub Vrana
2012-06-04 17:44:04 -07:00
parent a2378af008
commit 7f1fcc2286
3 changed files with 10 additions and 3 deletions

View File

@@ -51,7 +51,9 @@ function put_file($match) {
function lang(\$translation, \$number) {
\$pos = $match2[2]\t\t: " . (preg_match("~\\\$LANG == '$_SESSION[lang]'.* \\? (.+)\n~U", $match2[1], $match3) ? $match3[1] : "1") . '
);
return sprintf($translation[$pos], $number);
$translation = str_replace("%d", "%s", $translation[$pos]);
$number = number_format($number, 0, ".", lang(\',\'));
return sprintf($translation, $number);
}
';
} else {