mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 09:04:02 +02:00
Translations: check fullstops in 'ja' and 'he'
This commit is contained in:
@@ -280,7 +280,7 @@ $translations = array(
|
|||||||
'Default value' => 'ערך ברירת מחדל',
|
'Default value' => 'ערך ברירת מחדל',
|
||||||
'Full table scan' => 'סריקה טבלה מלאה',
|
'Full table scan' => 'סריקה טבלה מלאה',
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => 'יותר מידי נסיונות כניסה נכשלו, אנא נסה עוד %d דקות',
|
'Too many unsuccessful logins, try again in %d minute(s).' => 'יותר מידי נסיונות כניסה נכשלו, אנא נסה עוד %d דקות',
|
||||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'תודה שהשתמש ב-adminer אנא שקול <a href="https://www.adminer.org/en/donation/">לתרום</a>.',
|
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'תודה שהשתמש ב-adminer אנא שקול <a href="https://www.adminer.org/en/donation/">לתרום</a>',
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'סיסמת המאסטר פגה <a href="https://www.adminer.org/en/extension/"%s>התקן תוסף</a> על מנת להפוך את זה לתמידי',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'סיסמת המאסטר פגה <a href="https://www.adminer.org/en/extension/"%s>התקן תוסף</a> על מנת להפוך את זה לתמידי',
|
||||||
'If you did not send this request from Adminer then close this page.' => 'אם לא אתה שלחת בקשה ל-Adminer הינך יכול לסגור חלון זה',
|
'If you did not send this request from Adminer then close this page.' => 'אם לא אתה שלחת בקשה ל-Adminer הינך יכול לסגור חלון זה',
|
||||||
'You can upload a big SQL file via FTP and import it from server.' => 'ניתן לעלות קבצים ב-FTP ואז למשוך אותם מהשרת',
|
'You can upload a big SQL file via FTP and import it from server.' => 'ניתן לעלות קבצים ב-FTP ואז למשוך אותם מהשרת',
|
||||||
|
14
lang.php
14
lang.php
@@ -35,15 +35,19 @@ foreach (glob(__DIR__ . "/adminer/lang/" . ($_SESSION["lang"] ?: "*") . ".inc.ph
|
|||||||
preg_match_all("~^(\\s*(?:// [^'].*\\s+)?)(?:// )?(('(?:[^\\\\']+|\\\\.)*') => (.*[^,\n])),?~m", $file, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
|
preg_match_all("~^(\\s*(?:// [^'].*\\s+)?)(?:// )?(('(?:[^\\\\']+|\\\\.)*') => (.*[^,\n])),?~m", $file, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
|
||||||
$s = "";
|
$s = "";
|
||||||
$lang = basename($filename, ".inc.php");
|
$lang = basename($filename, ".inc.php");
|
||||||
$fullstop = ($lang == "bn" ? '।' : (substr($lang, 0, 2) == 'zh' ? '。' : ($lang == 'he' || $lang == 'ja' ? '' : '\.')));
|
$fullstop = ($lang == "bn" ? '।' : (preg_match('~^(ja|zh)~', $lang) ? '。' : ($lang == 'he' ? '[^.]' : '\.')));
|
||||||
foreach ($matches as $match) {
|
foreach ($matches as $match) {
|
||||||
list(, list($indent), list($line, $offset), list($en), list($translation)) = $match;
|
list(, list($indent), list($line, $offset), list($en), list($translation)) = $match;
|
||||||
if (isset($messages[$en])) {
|
if (isset($messages[$en])) {
|
||||||
// keep current messages
|
// keep current messages
|
||||||
$s .= "$indent$line,\n";
|
$s .= "$indent$line,\n";
|
||||||
unset($messages[$en]);
|
unset($messages[$en]);
|
||||||
if ($en != "','" && $fullstop && (substr($en, -2, 1) == "." xor preg_match("~$fullstop'\)?\$~", $line))) {
|
$en_fullstop = (substr($en, -2, 1) == ".");
|
||||||
echo "$filename:" . (substr_count($file, "\n", 0, $offset) + 1) . ":Not matching fullstop: $line\n";
|
//! check in array
|
||||||
|
if ($en != "','" && ($en_fullstop xor preg_match("~($fullstop)'\)?\$~", $line, $match))) {
|
||||||
|
if ($lang != ($en_fullstop ? "ja" : "he")) { // fullstop is optional in 'ja', forbidden in 'he'
|
||||||
|
echo "$filename:" . (substr_count($file, "\n", 0, $offset) + 1) . ":Not matching fullstop: $line\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (preg_match('~%~', $en) xor preg_match('~%~', $translation)) {
|
if (preg_match('~%~', $en) xor preg_match('~%~', $translation)) {
|
||||||
echo "$filename:" . (substr_count($file, "\n", 0, $offset) + 1) . ":Not matching placeholder.\n";
|
echo "$filename:" . (substr_count($file, "\n", 0, $offset) + 1) . ":Not matching placeholder.\n";
|
||||||
@@ -54,14 +58,14 @@ foreach (glob(__DIR__ . "/adminer/lang/" . ($_SESSION["lang"] ?: "*") . ".inc.ph
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($messages) {
|
if ($messages) {
|
||||||
if (basename($filename) != "en.inc.php") {
|
if ($lang != "en") {
|
||||||
$s .= "\n";
|
$s .= "\n";
|
||||||
}
|
}
|
||||||
foreach ($messages as $idf => $val) {
|
foreach ($messages as $idf => $val) {
|
||||||
// add new messages
|
// add new messages
|
||||||
if ($val == "," && strpos($idf, "%d")) {
|
if ($val == "," && strpos($idf, "%d")) {
|
||||||
$s .= "\t$idf => array(),\n";
|
$s .= "\t$idf => array(),\n";
|
||||||
} elseif (basename($filename) != "en.inc.php") {
|
} elseif ($lang != "en") {
|
||||||
$s .= "\t$idf => null,\n";
|
$s .= "\t$idf => null,\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user