mirror of https://github.com/BOINC/boinc.git
- web: translation system didn't compile BOINC and
project-specific translations correctly. svn path=/trunk/boinc/; revision=17658
This commit is contained in:
parent
9fa183377e
commit
a720fc5d52
|
@ -3325,3 +3325,13 @@ David 24 Mar 2009
|
|||
update_translations.php
|
||||
py/Boinc/
|
||||
setup_project.py
|
||||
|
||||
David 24 Mar 2009
|
||||
- web: translation system didn't compile BOINC and
|
||||
project-specific translations correctly.
|
||||
|
||||
html/
|
||||
ops/
|
||||
update_translations.php
|
||||
inc/
|
||||
translation.inc
|
||||
|
|
|
@ -20,7 +20,7 @@ $lang_language_dir = "../languages/";
|
|||
$lang_translations_dir = "translations/";
|
||||
$lang_prj_translations_dir = "project_specific_translations/";
|
||||
$lang_compiled_dir = "compiled/";
|
||||
$lang_log_level = 1;
|
||||
$lang_log_level = 0;
|
||||
|
||||
/**
|
||||
* Fetches a list of compiled languages from the directory
|
||||
|
@ -72,20 +72,24 @@ function buildLanguages($langdir,$transdir,$compdir,$append=false){
|
|||
);
|
||||
continue;
|
||||
}
|
||||
if (!$fh = fopen($langdir.$compdir.$file.".inc",$append?"a":"w")) {
|
||||
$fh = fopen($langdir.$compdir.$file.".inc",$append?"a":"w");
|
||||
if (!$fh) {
|
||||
language_log(
|
||||
"ERROR: could not access $langdir $compdir - please check permissions",2
|
||||
);
|
||||
exit;
|
||||
}
|
||||
fwrite($fh, "<?php\n");
|
||||
if (!$append) {
|
||||
fwrite($fh, "<?php\n");
|
||||
}
|
||||
foreach ($language as $key => $value){
|
||||
if ($value !== "") {
|
||||
//Skip if the msgstr is empty
|
||||
fwrite($fh, "\$language_lookup_array[\"".str_replace("\"", "\\\"", substr($file,0,-3))."\"][\"".$key."\"] = \"".$value."\";\n");
|
||||
}
|
||||
}
|
||||
fwrite($fh, '?>');
|
||||
// don't write \?\> - may append
|
||||
|
||||
fclose($fh);
|
||||
} else {
|
||||
//debug("File $file with unknown extension found in $info_dir");
|
||||
|
|
|
@ -21,7 +21,7 @@ ini_set('display_errors', true);
|
|||
ini_set('display_startup_errors', true);
|
||||
|
||||
require_once("../inc/translation.inc");
|
||||
system("rm -f $lang_compiled_dir/*");
|
||||
system("rm -f $lang_language_dir/$lang_compiled_dir/*");
|
||||
buildLanguages($lang_language_dir,$lang_translations_dir, $lang_compiled_dir);
|
||||
buildLanguages($lang_language_dir,$lang_prj_translations_dir, $lang_compiled_dir, true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue