mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
generate_lang_file.php : Permit multiple source files inclusion
This commit is contained in:
parent
2a3f4fb53a
commit
1be3b31c10
1 changed files with 6 additions and 2 deletions
|
@ -29,10 +29,14 @@ require_once('../conf/config.inc.php');
|
||||||
$withoutselectlist=False;
|
$withoutselectlist=False;
|
||||||
$copyoriginalvalue=False;
|
$copyoriginalvalue=False;
|
||||||
$additionalfileformat=False;
|
$additionalfileformat=False;
|
||||||
|
$translations=array();
|
||||||
if ($argc > 1) {
|
if ($argc > 1) {
|
||||||
for ($i=1;$i<$argc;$i++) {
|
for ($i=1;$i<$argc;$i++) {
|
||||||
if (is_file($argv[$i])) {
|
if (is_file($argv[$i])) {
|
||||||
@include($argv[$i]);
|
@include($argv[$i]);
|
||||||
|
foreach($GLOBALS['LSlang'] as $msg => $trans) {
|
||||||
|
$translations[$msg]=$trans;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif($argv[$i]=='--without-select-list') {
|
elseif($argv[$i]=='--without-select-list') {
|
||||||
$withoutselectlist=True;
|
$withoutselectlist=True;
|
||||||
|
@ -57,8 +61,8 @@ $data=array();
|
||||||
|
|
||||||
function add($msg) {
|
function add($msg) {
|
||||||
if ($msg!='') {
|
if ($msg!='') {
|
||||||
global $data;
|
global $data, $translations;
|
||||||
$data[$msg]=$GLOBALS['LSlang'][$msg];
|
$data[$msg]=$translations[$msg];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue