Update all translations to be sure to only have strings really used in COPS. re #39

This commit is contained in:
Sébastien Lucas 2013-09-16 20:34:50 +02:00
parent b40fd0b2b5
commit a46bc7d05a
12 changed files with 2241 additions and 1284 deletions

View file

@ -167,6 +167,13 @@ function localize($phrase, $count=-1) {
$lang_file_content = file_get_contents($lang_file);
/* Load the language file as a JSON object and transform it into an associative array */
$translations = json_decode($lang_file_content, true);
/* Clean the array of all translations unfinished */
foreach ($translations as $key => $val) {
if (preg_match ("/^##TODO##/", $key)) {
unset ($translations [$key]);
}
}
if ($lang_file_en)
{
$lang_file_content = file_get_contents($lang_file_en);