Added German language (de)
This commit is contained in:
parent
7b8462e1f9
commit
c4b1a53439
4 changed files with 7 additions and 4 deletions
|
@ -532,6 +532,7 @@ function langs($instid, $uri, $auto) {
|
|||
if (mysqli_num_rows($res)<1) {
|
||||
$code=myesc($link,truncs($lang,'Languages','Code','«'.$instrow['URI'].'»'));
|
||||
$NameOrig=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,$lang)),'Languages','NameOrig','«'.$instrow['URI'].'»'));
|
||||
$NameDe=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,'de')),'Languages','NameDE','«'.$instrow['URI'].'»'));
|
||||
$NameUk=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,'uk')),'Languages','NameUK','«'.$instrow['URI'].'»'));
|
||||
$NameCa=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,'ca')),'Languages','NameCA','«'.$instrow['URI'].'»'));
|
||||
$NameEn=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,'en')),'Languages','NameEN','«'.$instrow['URI'].'»'));
|
||||
|
@ -539,7 +540,7 @@ function langs($instid, $uri, $auto) {
|
|||
$NameFr=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,'fr')),'Languages','NameFR','«'.$instrow['URI'].'»'));
|
||||
$NameGl=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,'gl')),'Languages','NameGL','«'.$instrow['URI'].'»'));
|
||||
$NameIt=myesc($link,truncs(mb_ucfirst(locale_get_display_name($lang,'it')),'Languages','NameIT','«'.$instrow['URI'].'»'));
|
||||
$q = 'INSERT INTO Languages (ID, Code, NameOrig, NameUK, NameCA, NameEN, NameES, NameFR, NameGL, NameIT) VALUES (NULL, \''.$code.'\', \''.$NameOrig.'\', \''.$NameUk.'\', \''.$NameCa.'\', \''.$NameEn.'\', \''.$NameEs.'\', \''.$NameFr.'\', \''.$NameGl.'\', \''.$NameIt.'\')';
|
||||
$q = 'INSERT INTO Languages (ID, Code, NameOrig, NameDE, NameUK, NameCA, NameEN, NameES, NameFR, NameGL, NameIT) VALUES (NULL, \''.$code.'\', \''.$NameOrig.'\', \''.$NameDe.'\', \''.$NameUk.'\', \''.$NameCa.'\', \''.$NameEn.'\', \''.$NameEs.'\', \''.$NameFr.'\', \''.$NameGl.'\', \''.$NameIt.'\')';
|
||||
if (!$opts['dryrun']) {
|
||||
mysqli_query($link, $q) or mexit(__LINE__.': '.mysqli_error($link).N,3);
|
||||
$langid=mysqli_insert_id($link);
|
||||
|
|
|
@ -143,7 +143,7 @@ if ($opts['updstats']) {
|
|||
'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
|
||||
'ffffffffffffffffffffffffffffffff'
|
||||
);
|
||||
$langs=array('ca','en','es','fr','gl','it','uk');
|
||||
$langs=array('ca','de','en','es','fr','gl','it','uk');
|
||||
$urls=array('home','instances','about','stats','contribute','404');
|
||||
for ($i=0; $i<1460; $i++) mysqli_query($link,'INSERT INTO ZHits (UID,URL,Lang,TS) VALUES ("'.$uids[rand(0,count($uids)-1)].'","'.$urls[rand(0,count($urls)-1)].'","'.$langs[rand(0,count($langs)-1)].'",'.rand($now-365*24*60*60,$tdstart).')');
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ if ($opts['updstats']) {
|
|||
$inserts++;
|
||||
$hits=0;
|
||||
// this line below must be synced with $supplangs in ../site/index.php
|
||||
$hitslang=array('ca'=>0, 'en'=>0, 'es'=>0, 'fr'=>0, 'gl'=>0, 'it'=>0, 'uk'=>0);
|
||||
$hitslang=array('ca'=>0, 'de'=>0, 'en'=>0, 'es'=>0, 'fr'=>0, 'gl'=>0, 'it'=>0, 'uk'=>0);
|
||||
// this line below must be synced with the urls we consider, see ../site/index.php
|
||||
$hitspage=array('home'=>0, 'instances'=>0, 'about'=>0, 'stats'=>0, 'contribute'=>0, '404'=>0);
|
||||
$visits=0;
|
||||
|
|
|
@ -29,7 +29,7 @@ if (strlen($path)>0) {
|
|||
}
|
||||
}
|
||||
|
||||
$supplangs=['ca','en','es','fr','gl','it','uk'];// when adding a language code here, it is necessary to add it also to "$menu" in this same file, to "$hlmap" in stats.php, to "$hitslang" and "$langs" in ../clitools/mustool.php, to "langs" in ../clitools/updtrans.bash, to function "langs" in ../clitools/crawler.php; and to run "../clitools/addlang.php <new language code>" locally and on the server
|
||||
$supplangs=['ca','de','en','es','fr','gl','it','uk'];// when adding a language code here, it is necessary to add it also to "$menu" in this same file, to "$hlmap" in stats.php, to "$hitslang" and "$langs" in ../clitools/mustool.php, to "langs" in ../clitools/updtrans.bash (if missing), to function "langs" in ../clitools/crawler.php; and to run "../clitools/addlang.php <new language code>" locally and on the server
|
||||
if (preg_match('#/('.implode('|',$supplangs).')$#',$path,$lang)===1) {
|
||||
$dlang=$lang[1];
|
||||
$path=substr($path,0,-3);
|
||||
|
@ -60,6 +60,7 @@ $menu=array(
|
|||
),
|
||||
'language'=>array('liadd'=>null, 'href'=>null, 'title'=>_('Language'), 'selected'=>false, 'submenu'=>array(
|
||||
'ca'=>array('liadd'=>null, 'href'=>null, 'title'=>'Català', 'selected'=>false, 'submenu'=>null),
|
||||
'de'=>array('liadd'=>null, 'href'=>null, 'title'=>'Deutsch', 'selected'=>false, 'submenu'=>null),
|
||||
'en'=>array('liadd'=>null, 'href'=>null, 'title'=>'English', 'selected'=>false, 'submenu'=>null),
|
||||
/* 'aa'=>array('liadd'=>null, 'href'=>null, 'title'=>'Prova', 'selected'=>false, 'submenu'=>array(
|
||||
'bb'=>array('liadd'=>null, 'href'=>$conf['instpath'].'/stats/'.$dlang, 'title'=>'Statistics', 'selected'=>false, 'submenu'=>null),
|
||||
|
|
|
@ -33,6 +33,7 @@ $limit=$tdstart-(30*24*60*60);
|
|||
$res=mysqli_query($link,'SELECT * FROM ZStats WHERE TS >= '.$limit.' ORDER BY TS DESC') or muorimeglio(__LINE__.': '.mysqli_error($link),true);
|
||||
$hlmap=array(
|
||||
'ca'=>_('Catalan'),
|
||||
'de'=>_('German'),
|
||||
'en'=>_('English'),
|
||||
'es'=>_('Spanish'),
|
||||
'fr'=>_('French'),
|
||||
|
|
Loading…
Reference in a new issue