Display warning about incomplete translations

This commit is contained in:
Michal Čihař
2011-04-05 15:28:02 +02:00
parent ef48add94c
commit 26a4a09c11
5 changed files with 37 additions and 0 deletions

View File

@@ -354,6 +354,23 @@ if ($cfg['SuhosinDisableWarning'] == false && @ini_get('suhosin.request.max_valu
trigger_error(PMA_sanitize(sprintf(__('Server running with Suhosin. Please refer to %sdocumentation%s for possible issues.'), '[a@./Documentation.html#faq1_38@_blank]', '[/a]')), E_USER_WARNING);
}
/**
* Warning about incomplete translations.
*
* The data file is created while creating release by ./scripts/remove-incomplete-mo
*/
if (file_exists('./libraries/language_stats.inc.php')) {
include('./libraries/language_stats.inc.php');
/*
* This message is intentionally not translated, because we're
* handling incomplete translations here and focus on english
* speaking users.
*/
if (isset($GLOBALS['language_stats'][$lang]) && $GLOBALS['language_stats'][$lang] < $cfg['TranslationWarningThreshold']) {
trigger_error('You are using translation which is not complete, you are welcome to <a href="http://www.phpmyadmin.net/home_page/improve.php#translate">contribute to it</a>.', E_USER_NOTICE);
}
}
/**
* prints list item for main page
*