Replace generate_lang_file.php by LScli command generate_lang_file

This commit is contained in:
Benjamin Renard 2020-05-06 17:48:49 +02:00
parent fe4ef419fd
commit 68a2105900
7 changed files with 822 additions and 828 deletions

View file

@ -1,5 +1,4 @@
var/cache/ldapsaisie usr/share/ldapsaisie/tmp
usr/local/share/ldapsaisie usr/share/ldapsaisie/local
usr/local/share/ldapsaisie etc/ldapsaisie/local
usr/share/ldapsaisie/lang/generate_lang_file.php usr/bin/ldapsaisie-generate-lang-file
usr/share/ldapsaisie/bin/ldapsaisie.php usr/sbin/ldapsaisie

View file

@ -190,3 +190,662 @@ class LSlang {
}
}
/*
***********************************************
* Generate translation file CLI methods
*
* Only load in CLI context
***********************************************
*/
if (php_sapi_name() != "cli") return;
/**
* CLI generate_lang_file command
*
* @param[in] $command_args array Command arguments
*
* @retval boolean True on succes, false otherwise
**/
global $available_onlys, $available_withouts;
$available_onlys = array("config", "templates", "addons");
$available_withouts = array_merge($available_onlys, array("select-list"));
function cli_generate_lang_file($command_args) {
// Use global variables to share it with sub-functions
global $available_onlys, $available_withouts, $data, $translations, $interactive,
$copyoriginalvalue, $format, $curdir, $additionalfileformat, $copyoriginalvalue;
// Store existing translations
$translations = array();
// Store output translations
$data = array();
// Parameters
$only = null;
$withouts = array();
$copyoriginalvalue = False;
$interactive = False;
$output = False;
$additionalfileformat = False;
$lang = null;
$encoding = null;
$available_formats = array('php', 'pot');
$format=$available_formats[0];
$debug = false;
$load_files = array();
// Change directory
$curdir = getcwd();
chdir(dirname(__FILE__).'/../');
function relative2absolute_path($path) {
if ($path[0] == '/')
return $path;
global $curdir;
return realpath($curdir)."/".$path;
}
function absolute2relative_path($path) {
if ($path[0] == '/')
$path = realpath($path);
if (substr($path, 0, strlen(LS_ROOT_DIR)) == LS_ROOT_DIR)
return substr($path, strlen(LS_ROOT_DIR)+1);
return $path;
}
for ($i=0; $i < count($command_args); $i++) {
switch ($command_args[$i]) {
case '--without':
case '-W':
$i++;
$without = strtolower($command_args[$i]);
if (!in_array($without, $available_withouts))
LScli :: usage("Invalid -W/--without parameter. Must be one of the following values : '".implode("','", $available_withouts)."'.");
elseif ($only)
LScli :: usage("You could not use only -W/--without parameter combined with -O/--only parameter.");
$withouts[] = $without;
break;
case '--only':
case '-O':
$i++;
if ($only)
LScli :: usage("You could specify only on -O/--only parameter.");
$only = strtolower($command_args[$i]);
if (!in_array($only, $available_onlys))
LScli :: usage("Invalid -O/--only parameter. Must be one of the following values : '".implode("','", $available_onlys)."'.");
elseif ($without)
LScli :: usage("You could not use only -O/--only parameter combined with -W/--without parameter.");
break;
case '--copy-original-value':
case '-c':
$copyoriginalvalue=True;
break;
case '--interactive':
case '-i':
$interactive=True;
break;
case '--additional-file-format':
case '-a':
$additionalfileformat=True;
break;
case '--lang':
case '-l':
$i++;
$parse_lang = explode('.', $command_args[$i]);
if (count($parse_lang) == 2) {
$lang = $parse_lang[0];
$encoding = $parse_lang[1];
}
else {
LScli :: usage("Invalid --lang parameter. Must be compose in format : [lang].[encoding]");
}
break;
case '--output':
case '-o':
$i++;
$output = $command_args[$i];
break;
case '--format':
case '-f':
$i++;
$format = strtolower($command_args[$i]);
if (!in_array($format, $available_formats)) {
LScli :: usage("Invalid -f/--format parameter. Must be one of the following values : '".implode("','", $available_formats)."'.");
}
break;
case '--debug':
case '-d':
$debug = true;
break;
default:
$path = relative2absolute_path($command_args[$i]);
if (is_file($path))
$load_files[] = $path;
else
LScli :: usage($command_args[$i]." : Invalid parameter or lang file to load.");
}
}
function debug($msg) {
LSlog :: debug("generate_lang_file() : $msg");
}
function add($msg, $context=null) {
global $lang, $data, $translations, $interactive, $copyoriginalvalue, $format;
debug("add($msg, $context)");
if ($msg == '')
return;
if (!is_null($lang) && _($msg) != "$msg")
return;
// Message already exists ?
if (array_key_exists($msg, $data)) {
if ($context && !in_array($context, $data[$msg]['contexts']))
$data[$msg]['contexts'][] = $context;
return True;
}
// Handle translation
$translation = "";
if (array_key_exists($msg, $translations)) {
$translation = $translations[$msg];
}
elseif (!is_null($lang) && _($msg) != $msg) {
$translation = _($msg);
}
elseif ($interactive && $format != 'pot') {
if ($context)
fwrite(STDERR, "\n# $context\n");
if ($copyoriginalvalue) {
fwrite(STDERR, "\"$msg\"\n\n => Please enter translated string (or leave empty to copy original string) : ");
$in = trim(fgets(STDIN));
if ($in)
$translation = $in;
else
$translation = $msg;
}
else {
fwrite(STDERR, "\"$msg\"\n\n => Please enter translated string (or 'c' to copy original message, 'i' to ignore this message, leave empty to pass) : ");
$in = trim(fgets(STDIN));
if ($in) {
if ($in=="i")
return True;
if ($in=="c")
$translation = $msg;
else
$translation = $in;
}
}
}
$data[$msg] = array (
'translation' => $translation,
'contexts' => ($context?array($context):array()),
);
}
function addFromLSconfig($pattern, $value='value', $excludes=array()) {
debug("addFromLSconfig($pattern, array(".implode(',', $excludes)."))");
$keys = LSconfig :: getMatchingKeys($pattern);
debug("addFromLSconfig : ".count($keys)." matching key(s)");
foreach ($keys as $key => $value) {
debug("addFromLSconfig : $key = $value");
if ($value == 'key') {
// Get the last key parts as value and all other as key
$key_parts = explode('.', $key);
$value = $key_parts[count($key_parts)-1];
$key = implode('.', array_slice($key_parts, 0, count($key_parts)-1));
}
if (!in_array($value, $excludes) && is_string($value))
add($value, $key);
}
}
// Load translation files
foreach($load_files as $path) {
debug("Load $path lang file");
@include($path);
foreach($GLOBALS['LSlang'] as $msg => $trans) {
$translations[$msg]=$trans;
}
}
// Initialize session
LSlang :: setLocale($lang, $encoding);
// Load lang string if lang was specify
if ($lang && $encoding && isset($GLOBALS['LSlang']) && is_array($GLOBALS['LSlang'])) {
foreach($GLOBALS['LSlang'] as $msg => $trans) {
$translations[$msg] = $trans;
}
}
/*
* Manage configuration parameters
*/
if (!in_array('config', $withouts) && (!$only || $only == 'config')) {
// LDAP Servers
$objects = array();
foreach(LSconfig :: keys('ldap_servers') as $ldap_server_id) {
addFromLSconfig("ldap_servers.$ldap_server_id.name");
addFromLSconfig("ldap_servers.$ldap_server_id.subDnLabel");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.recoveryHashMail.subject");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.recoveryHashMail.msg");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.newPasswordMail.subject");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.newPasswordMail.msg");
addFromLSconfig("ldap_servers.$ldap_server_id.subDn.*", 'key', array("LSobject"));
addFromLSconfig("ldap_servers.$ldap_server_id.LSprofiles.*.label");
// LSaccess
foreach (LSconfig :: get("ldap_servers.$ldap_server_id.LSaccess", array()) as $LSobject) {
if (is_string($LSobject) && !in_array($LSobject, $objects) && LSsession :: loadLSobject($LSobject)) {
$objects[] = $LSobject;
}
}
// Sub DN LSobjects
foreach (LSconfig :: getMatchingKeys("ldap_servers.$ldap_server_id.subDn.*.LSobjects.*") as $LSobject)
if (is_string($LSobject) && !in_array($LSobject, $objects) && LSsession :: loadLSobject($LSobject))
$objects[] = $LSobject;
}
debug('LSobjects list : '.implode(', ', $objects));
// LSobject
foreach($objects as $obj) {
addFromLSconfig("LSobjects.$obj.label");
// LSrelation
addFromLSconfig("LSobjects.$obj.LSrelation.*.label");
addFromLSconfig("LSobjects.$obj.LSrelation.*.emptyText");
// Custom Actions
addFromLSconfig("LSobjects.$obj.customActions.*.label");
addFromLSconfig("LSobjects.$obj.customActions.*.helpInfo");
addFromLSconfig("LSobjects.$obj.customActions.*.question_format");
addFromLSconfig("LSobjects.$obj.customActions.*.onSuccessMsgFormat");
// LSform
addFromLSconfig("LSobjects.$obj.LSform.layout.*.label");
addFromLSconfig("LSobjects.$obj.LSform.dataEntryForm.*.label");
// LSsearch
addFromLSconfig("LSobjects.$obj.LSsearch.predefinedFilters.*");
addFromLSconfig("LSobjects.$obj.LSsearch.extraDisplayedColumns.*.label");
addFromLSconfig("LSobjects.$obj.LSsearch.customActions.*.label");
addFromLSconfig("LSobjects.$obj.LSsearch.customActions.*.question_format");
addFromLSconfig("LSobjects.$obj.LSsearch.customActions.*.onSuccessMsgFormat");
// Attributes
foreach(LSconfig :: keys("LSobjects.$obj.attrs") as $attr) {
addFromLSconfig("LSobjects.$obj.attrs.$attr.label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.help_info");
addFromLSconfig("LSobjects.$obj.attrs.$attr.no_value_label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.check_data.*.msg");
addFromLSconfig("LSobjects.$obj.attrs.$attr.validation.*.msg");
// HTML Options
$html_type = LSconfig :: get("LSobjects.$obj.attrs.$attr.html_type");
switch($html_type) {
case 'boolean':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.true_label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.false_label");
break;
case 'jsonCompositeAttribute':
$components = LSconfig :: keys("LSobjects.$obj.attrs.$attr.html_options.components");
foreach($components as $c) {
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.help_info");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.check_data.*.msg");
if (
LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.type") == 'select_list' &&
LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.translate_labels", "True", "bool") &&
!in_array('select-list', $withouts)
)
{
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values", array()) as $pkey => $plabel) {
if (is_string($pkey)) {
if ($pkey == 'OTHER_OBJECT')
continue;
elseif ($pkey == 'OTHER_ATTRIBUTE') {
if (is_string($plabel))
continue;
elseif (is_array($plabel)) {
if (isset($plabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.*");
}
}
else
add($plabel, "LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey");
}
elseif (is_int($pkey) && is_array($plabel)) {
// Sub possible values
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey.label");
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey.possible_values", array()) as $ppkey => $pplabel) {
if ($ppkey == 'OTHER_OBJECT')
continue;
elseif ($ppkey == 'OTHER_ATTRIBUTE') {
if (is_string($pplabel))
continue;
elseif (is_array($pplabel)) {
if (isset($pplabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.*");
}
}
elseif(is_string($pplabel)) {
add($pplabel, "LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey.possible_values.$ppkey");
}
}
}
}
}
}
break;
case 'labeledValue':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.labels.*");
break;
case 'password':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.mail.subject");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.mail.msg");
break;
case 'select_list':
case 'select_box':
if (LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.translate_labels", "True", "bool") && !in_array('select-list', $withouts)) {
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.possible_values", array()) as $pkey => $plabel) {
if (is_string($pkey)) {
if ($pkey == 'OTHER_OBJECT')
continue;
elseif ($pkey == 'OTHER_ATTRIBUTE') {
if (is_string($plabel))
continue;
elseif (is_array($plabel)) {
if (isset($plabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.*");
}
}
else
add($plabel, "LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey");
}
elseif (is_int($pkey) && is_array($plabel)) {
// Sub possible values
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey.label");
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey.possible_values", array()) as $ppkey => $pplabel) {
if ($ppkey == 'OTHER_OBJECT')
continue;
elseif ($ppkey == 'OTHER_ATTRIBUTE') {
if (is_string($pplabel))
continue;
elseif (is_array($pplabel)) {
if (isset($pplabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.*");
}
}
elseif(is_string($pplabel)) {
add($pplabel, "LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey.possible_values.$ppkey");
}
}
}
}
}
break;
case 'valueWithUnit':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.units.*");
break;
}
}
}
}
/*
* Manage template file
*/
if (!in_array('templates', $withouts) && (!$only || $only == 'templates')) {
function parse_template_file($file) {
debug("parse_template_file($file) : start ...");
$count = 0;
foreach(file($file) as $line) {
$count ++;
if (preg_match_all('/\{ *tr +msg=["\']([^\}]+)["\'] *\}/',$line,$matches)) {
foreach($matches[1] as $t) {
debug(" - \"$t\" # Line $count");
add($t, absolute2relative_path($file).":$count");
}
}
}
debug("parse_template_file($file) : done.");
}
function find_and_parse_template_file($dir) {
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if ($file=='.' || $file=='..') continue;
if (is_dir($dir.'/'.$file)) {
find_and_parse_template_file($dir.'/'.$file);
}
elseif (is_file($dir."/".$file) && preg_match('/\.tpl$/',$file)) {
parse_template_file($dir.'/'.$file);
}
}
closedir($dh);
}
}
}
find_and_parse_template_file(LS_ROOT_DIR.'/'.LS_TEMPLATES_DIR);
find_and_parse_template_file(LS_ROOT_DIR.'/'.LS_LOCAL_DIR.LS_TEMPLATES_DIR);
}
/*
* Manage addons files
*/
if (!in_array('addons', $withouts) && (!$only || $only == 'addons')) {
function parse_addon_file($file) {
$count = 0;
foreach(file($file) as $line) {
$count++;
$offset=0;
while ($pos = strpos($line,'__(',$offset)) {
$quote='';
$res='';
for ($i=$pos+3;$i<strlen($line);$i++) {
if (empty($quote)) {
// Quote char not detected : try to detect it
if ($line[$i]=='\\' || $line[$i]==" " || $line[$i]=="\t") {
// Space or escape char : pass
$i++;
}
elseif ($line[$i]=='"' || $line[$i]=="'") {
// Quote detected
$quote=$line[$i];
}
elseif ($line[$i]=='$' || $line[$i]==')') {
// Variable translation not possible or end function call detected
$offset=$i;
break;
}
else {
// Unknown case : continue
$i++;
}
}
elseif (!empty($quote)) {
// Quote char already detected : try to detect end quote char
if ($line[$i]=='\\') {
// Escape char detected : pass this char and the following one
$res.=$line[$i];
$i++;
$res.=$line[$i];
}
elseif ($line[$i]==$quote) {
// End quote char detected : set offset for next detection and break this one
$offset=$i;
break;
}
else {
// End quote char not detected : append current char to result
$res.=$line[$i];
}
}
}
if (!empty($res)) add($res, absolute2relative_path($file).":$count");
}
}
}
function find_and_parse_addon_file($dir) {
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (preg_match('/^LSaddons\.(.+)\.php$/',$file)) {
parse_addon_file($dir.'/'.$file);
}
}
closedir($dh);
}
}
}
find_and_parse_addon_file(LS_ROOT_DIR.'/'.LS_ADDONS_DIR);
find_and_parse_addon_file(LS_ROOT_DIR.'/'.LS_LOCAL_DIR.LS_ADDONS_DIR);
}
// Sort resulting strings
ksort($data);
/*
* Handle output file format
*/
function output_php($fd) {
global $additionalfileformat, $data, $copyoriginalvalue;
fwrite($fd, "<?php\n\n");
if (!$additionalfileformat) fwrite($fd, "\$GLOBALS['LSlang'] = array (\n");
foreach($data as $key => $key_data) {
if ($copyoriginalvalue && $key_data['translation'] == "") {
$val = $key;
}
else
$val = $key_data['translation'];
$key=str_replace('"','\\"',$key);
$val=str_replace('"','\\"',$val);
foreach ($key_data['contexts'] as $context)
fwrite($fd, "\n# $context");
if ($additionalfileformat) {
fwrite($fd, "\n\$GLOBALS['LSlang'][\"$key\"] = \"$val\";\n");
}
else {
fwrite($fd, "\n\"$key\" =>\n \"$val\",\n");
}
}
if (!$additionalfileformat) fwrite($fd, "\n);\n");
}
function clean_for_pot_file($val) {
$val = str_replace('"', '\\"', $val);
return str_replace("\n", "\\n", $val);
}
function output_pot($fd) {
global $data, $copyoriginalvalue;
foreach($data as $key => $key_data) {
if ($copyoriginalvalue && $key_data['translation'] == "") {
$val = $key;
}
else
$val = $key_data['translation'];
foreach ($key_data['contexts'] as $context)
fwrite($fd, "#: $context\n");
$key = clean_for_pot_file($key);
$val = clean_for_pot_file($val);
fwrite($fd, "msgid \"$key\"\nmsgstr \"$val\"\n\n");
}
}
// Determine where to write result
if ($output) {
$output = relative2absolute_path($output);
try {
debug("Open output file ($output)");
$fd = fopen($output, 'w');
}
catch(Exception $e) {
LSlog :: error('Error occured opening output file : '.$e->getMessage(), "\n");
}
if (!$fd) {
LSlog :: error("Use stdout out instead.\n");
$fd = STDOUT;
$output = false;
}
}
else
$fd = STDOUT;
// Generate output
debug("Output format : $format");
switch($format) {
case 'pot':
output_pot($fd);
break;
case 'php':
default:
output_php($fd);
break;
}
// Close output file (is specified)
if ($output && $fd != STDOUT) {
debug("Close output file ($output)");
fclose($fd);
}
exit(0);
}
LScli :: add_command(
'generate_lang_file',
'cli_generate_lang_file',
'Generate lang.php file',
'l [lang] [-o output.file] [file1] [file2] [-h] [options]',
array(
" -W/--without Disable specified messages. Must be one of",
" the following values :",
" - ".implode("\n - ", $available_withouts),
" -O/--only Only handle specified messages. Must be one",
" of the following values :",
" - ".implode("\n - ", $available_onlys),
" -c/--copy-original-value Copy original value as translated value when",
" no translated value exists",
" -i/--interactive Interactive mode : ask user to enter",
" translated on each translation needed",
" -a/--additional-file-format Additional file format output",
" -l/--lang Load the specify lang",
" Format: [lang].[encoding]",
" -o/--output Output file (default: stdout)",
" -f/--format Output file format : php or pot",
" (default: php)",
)
);

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: LdapSaisie\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2020-05-06 12:10+0200\n"
"PO-Revision-Date: 2020-05-06 17:36+0200\n"
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n"
"Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise."
"org>\n"
@ -458,7 +458,7 @@ msgstr "Confirmez-vous votre choix ?"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSconfirmBox.php:37
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsmoothbox.php:39
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1378
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1246
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:68
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:568
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1148
@ -485,7 +485,6 @@ msgstr "Attribut"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_mailQuota.php:80
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:108
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_quota.php:80
#: templates/default/LSformElement_mailQuota_field.tpl:17
msgid "Incorrect value"
msgstr "Valeur incorrecte"
@ -799,81 +798,77 @@ msgstr ""
msgid "Clear"
msgstr "Nettoyer"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1318
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1186
msgid "Connection"
msgstr "Connexion"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1328
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1367
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1196
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1235
msgid "LDAP server"
msgstr "Serveur LDAP"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1338
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2489
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1206
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2356
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:669
msgid "Level"
msgstr "Niveau"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1339
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1377
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1207
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1245
msgid "Identifier"
msgstr "Identifiant"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1340
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1208
msgid "Password"
msgstr "Mot de passe"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1341
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1209
msgid "Connect"
msgstr "Se connecter"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1342
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1210
msgid "Forgot your password ?"
msgstr "Mot de passe perdu ?"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1360
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1228
msgid "Recovery of your credentials"
msgstr "Récupération de votre mot de passe"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1379
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1247
msgid "Back"
msgstr "Retour"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1382
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1250
msgid "Please fill the identifier field to proceed recovery procedure"
msgstr ""
"Merci d'entrer votre identifiant pour poursuivre la procédure de récupération"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1387
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1255
msgid ""
"An email has been sent to %{mail}. Please follow the instructions on it."
msgstr ""
"Un e-mail vient de vous être envoyé à l'adresse %{mail}. Merci de suivre les "
"indications qu'il contient."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1396
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1264
msgid "Your new password has been sent to %{mail}."
msgstr "Votre nouveau mot de passe vous a été envoyé à l'adresse %{mail}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1547
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1415
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:146
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:423
msgid "Refresh"
msgstr "Rafraîchir"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1563
msgid "Language"
msgstr "Langue"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1585
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1452
msgid "Connected as"
msgstr "Connecté en tant que"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2635
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2502
msgid "LSsession : The constant %{const} is not defined."
msgstr "LSsession : La constante %{const} n'est pas définie."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2638
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2505
msgid ""
"LSsession : The %{addon} support is uncertain. Verify system compatibility "
"and the add-on configuration."
@ -881,52 +876,52 @@ msgstr ""
"LSsession : Le support %{addon} est incertain. Vérifiez la compatibilité du "
"système et la configuration de l'add-on."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2641
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2508
msgid ""
"LSsession : LDAP server's configuration data are invalid. Can't connect."
msgstr ""
"LSsession : Les données de configuration du serveur LDAP sont invalide. "
"Impossible de s'y connecter."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2644
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2511
msgid "LSsession : Failed to load LSobject type %{type} : unknon type."
msgstr ""
"LSsession : Impossible de charger le type d'LSobject %{type} : type inconnu."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2647
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2514
msgid "LSsession : Failed to load LSclass %{class}."
msgstr "LSsession : Impossible de charger la LSclass %{class}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2650
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2517
msgid "LSsession : Login or password incorrect."
msgstr "LSsession : Identifiant ou mot de passe incorrects."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2653
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2520
msgid "LSsession : Impossible to identify you : Duplication of identities."
msgstr "LSsession : Impossible de vous identifier : Duplication d'identité."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2656
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2523
msgid "LSsession : Can't load class of authentification (%{class})."
msgstr ""
"LSsession : Impossible de charger la classe d'authentification (%{class})."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2659
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2526
msgid "LSsession : Can't connect to LDAP server."
msgstr "LSsession : Impossible de se connecter au serveur LDAP."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2662
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2529
msgid "LSsession : Impossible to authenticate you."
msgstr "LSsession : Impossible de vous identifier."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2665
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2532
msgid "LSsession : Your are not authorized to do this action."
msgstr "LSsession : Vous n'êtes pas autorisé à faire cette action."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2668
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2535
msgid "LSsession : Some informations are missing to display this page."
msgstr "LSsession : Des informations sont manquant pour afficher cette page."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2671
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2538
msgid ""
"LSsession : The function of the custom action %{name} does not exists or is "
"not configured."
@ -934,24 +929,24 @@ msgstr ""
"LSsearch : La fonction de l'action personnalisée %{name} n'existe pas ou "
"n'est pas configurée."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2674
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2541
msgid "LSsession : Fail to retreive user's LDAP credentials from LSauth."
msgstr ""
"LSsession : Erreur en récupérant les identifiants LDAP de l'utilisateur "
"depuis LSauth."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2677
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2544
msgid ""
"LSsession : Fail to reconnect to LDAP server with user's LDAP credentials."
msgstr ""
"LSsession : Impossible de se reconnecter au serveur LDAP avec les "
"identifiants de l'utilisateur."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2680
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2547
msgid "LSsession : No import/export format define for this object type."
msgstr "LSsession : Aucun format d'entrée/sortie définie pour ce type d'objet."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2683
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2550
msgid ""
"LSsession : Error during creation of list of levels. Contact administrators. "
"(Code : %{code})"
@ -959,13 +954,13 @@ msgstr ""
"LSsession : Erreur durant la création de la liste des niveaux. Contacter les "
"administrateurs. (Code : %{type})"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2686
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2553
msgid "LSsession : The password recovery is disabled for this LDAP server."
msgstr ""
"LSsession : La récupération de mot de passe est désactivée pour ce serveur "
"LDAP."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2689
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2556
msgid ""
"LSsession : Some informations are missing to recover your password. Contact "
"administrators."
@ -973,7 +968,7 @@ msgstr ""
"LSsession : Des informations sont manques pour pouvoir récupérer votre mot "
"de passe. Contacter les administrateurs."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2692
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2559
msgid ""
"LSsession : Error during password recovery. Contact administrators.(Step : "
"%{step})"
@ -981,26 +976,26 @@ msgstr ""
"LSsession : Erreur durant la récupération de votre mot de passe. Contacter "
"les administrateurs. (Etape : %{step})"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2695
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2562
msgid ""
"LSsession : call function %{func} do not provided from LSaddon %{addon}."
msgstr ""
"LSsession : la fonction %{func} n'est pas fournie par le LSaddon %{addon}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2698
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2565
msgid "LSsession : problem during initialisation."
msgstr "LSsession : Problème durant l'initialisation."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2701
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2568
msgid "LSsession : view function %{func} for LSaddon %{addon} doet not exist."
msgstr ""
"LSsession : la fonction de vue %{func} du LSaddon %{addon} n'existe pas."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2704
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2571
msgid "LSsession : invalid related object's DN pass in parameter."
msgstr "LSsession : DN d'objet en relation incorrect dans les paramètres."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2707
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2574
msgid ""
"LSsession : the LSaddon %{addon} keep using old-style addon view URL. Please "
"upgrade it."
@ -1008,7 +1003,7 @@ msgstr ""
"LSsession : le LSaddon %{addon} utilise toujours l'ancien type d'URL de "
"vues. Merci de le mettre à jour."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2710
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2577
msgid ""
"LSsession : You have been redirect from an old-style URL %{url}. Please "
"upgrade this link."
@ -1016,7 +1011,7 @@ msgstr ""
"LSsession : Vous avez été redirigé depuis une ancienne URL %{url}. Merci de "
"le mettre à jour ce lien."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2713
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2580
msgid ""
"LSsession : You still seen use LSsession :: redirect() in your custom code. "
"Please upgrade it and use LSurl :: redirect()."
@ -1779,7 +1774,6 @@ msgid "Actions"
msgstr "Actions"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsearch.php:1086
#: templates/default/global_search.tpl:25
msgid "This search didn't get any result."
msgstr "Cette recherche n'a retournée aucun résultat."
@ -2006,11 +2000,11 @@ msgstr "Rôle"
msgid "Entity type"
msgstr "Type d'entité"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:122
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:127
msgid "Only one command could be executed !"
msgstr "Une seule commande peut-être exécutée !"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:168
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:173
msgid ""
"Invalid parameter \"%{parameter}\".\n"
"Note: Command's parameter/argument must be place after the command."
@ -2019,11 +2013,11 @@ msgstr ""
"Note: Les paramètres/arguments de la commande doivent être placés après "
"celle-ci."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:207
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:212
msgid "LScli : The CLI command '%{command}' already exists."
msgstr "LScli : La commande CLI '%{command}' existe déjà."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:210
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:215
msgid "LScli : The CLI command '%{command}' handler is not callable."
msgstr ""
"LScli : La fonction de prise en charge de la commande CLI '%{command}' n'est "
@ -2034,7 +2028,6 @@ msgid "LSlog : Fail to load logging handler %{handler}."
msgstr "LSlog : Impossible de charger l'handler %{handler}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSerror.php:102
#: templates/default/import.tpl:28
msgid "Errors"
msgstr "Erreurs"
@ -2093,7 +2086,6 @@ msgstr "Réinitialiser"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:466
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:666
#: templates/default/global_search.tpl:7
msgid "Search"
msgstr "Rechercher"
@ -2167,113 +2159,85 @@ msgstr "[pas une chaîne de caractères]"
msgid "Folder not found"
msgstr "Dossier introuvable"
#: templates/default/LSaccessRightsMatrixView.tpl:17
msgid "Attributes / Profiles"
msgstr "Attributs / Profils"
#: templates/default/error.tpl:22
msgid "Details"
msgstr "Détails"
#: templates/default/import.tpl:9
msgid "File"
msgstr "Fichier"
#: templates/default/import.tpl:12
msgid "Format"
msgstr "Format"
#: templates/default/top.tpl:36 templates/default/top.tpl:37
#: templates/default/global_search.tpl:10
msgid "Global search"
msgstr "Recherche globale"
#: templates/default/import.tpl:70
msgid "Imported objects"
msgstr "Objets importés"
#: templates/default/LSaccessRightsMatrixView.tpl:19
#: templates/default/LSaccessRightsMatrixView.tpl:55
msgid "Legend:"
msgstr "Légende :"
#: templates/default/viewSearch.tpl:133
msgid "Nb / page :"
msgstr "Nb / page :"
#: templates/default/import.tpl:75
msgid "No imported object"
msgstr "Aucun objet importé"
#~ msgid "Language"
#~ msgstr "Langue"
#: templates/default/import.tpl:43
msgid "No value"
msgstr "Aucune valeur"
#~ msgid "Attributes / Profiles"
#~ msgstr "Attributs / Profils"
#: templates/default/import.tpl:18
msgid "Only validate data"
msgstr "Validation des données uniquement"
#~ msgid "Details"
#~ msgstr "Détails"
#: templates/default/LSaccessRightsMatrixView.tpl:20
#: templates/default/LSaccessRightsMatrixView.tpl:37
#: templates/default/LSaccessRightsMatrixView.tpl:72
msgid "R"
msgstr "L"
#~ msgid "File"
#~ msgstr "Fichier"
#: templates/default/LSaccessRightsMatrixView.tpl:22
#: templates/default/LSaccessRightsMatrixView.tpl:39
#: templates/default/LSaccessRightsMatrixView.tpl:74
msgid "R/W"
msgstr "L/É"
#~ msgid "Global search"
#~ msgstr "Recherche globale"
#: templates/default/LSaccessRightsMatrixView.tpl:20
#: templates/default/LSaccessRightsMatrixView.tpl:56
msgid "Readable"
msgstr "Lecture"
#~ msgid "Imported objects"
#~ msgstr "Objets importés"
#: templates/default/LSaccessRightsMatrixView.tpl:22
#: templates/default/LSaccessRightsMatrixView.tpl:58
msgid "Readable / Writable"
msgstr "Lecture / Écriture"
#~ msgid "Legend:"
#~ msgstr "Légende :"
#: templates/default/top.tpl:63
msgid "Refresh my access rights"
msgstr "Rafraîchir mes droits d'accès"
#~ msgid "No imported object"
#~ msgstr "Aucun objet importé"
#: templates/default/LSaccessRightsMatrixView.tpl:53
msgid "Relations / Profiles"
msgstr "Relations / Profils"
#~ msgid "No value"
#~ msgstr "Aucune valeur"
#: templates/default/import.tpl:26
msgid "Result"
msgstr "Résultat"
#~ msgid "Only validate data"
#~ msgstr "Validation des données uniquement"
#: templates/default/LSaccessRightsMatrixView.tpl:48
msgid "Their relations with other objects"
msgstr "Leurs relations avec les autres objets"
#~ msgid "R"
#~ msgstr "L"
#: templates/default/LSaccessRightsMatrixView.tpl:83
msgid "This object type has no configured relation."
msgstr "Ce type d'objet n'a aucune relation de configurée."
#~ msgid "R/W"
#~ msgstr "L/É"
#: templates/default/import.tpl:15
msgid "Update objects if exists"
msgstr "Mise à jour des objets existants"
#~ msgid "Readable"
#~ msgstr "Lecture"
#: templates/default/import.tpl:80
msgid "Updated objects"
msgstr "Objets mis à jour"
#~ msgid "Readable / Writable"
#~ msgstr "Lecture / Écriture"
#: templates/default/import.tpl:21
msgid "Valid"
msgstr "Valider"
#~ msgid "Refresh my access rights"
#~ msgstr "Rafraîchir mes droits d'accès"
#: templates/default/import.tpl:16 templates/default/import.tpl:19
msgid "no"
msgstr "non"
#~ msgid "Relations / Profiles"
#~ msgstr "Relations / Profils"
#: templates/default/import.tpl:16 templates/default/import.tpl:19
msgid "yes"
msgstr "oui"
#~ msgid "Result"
#~ msgstr "Résultat"
#~ msgid "Their relations with other objects"
#~ msgstr "Leurs relations avec les autres objets"
#~ msgid "This object type has no configured relation."
#~ msgstr "Ce type d'objet n'a aucune relation de configurée."
#~ msgid "Update objects if exists"
#~ msgstr "Mise à jour des objets existants"
#~ msgid "Updated objects"
#~ msgstr "Objets mis à jour"
#~ msgid "Valid"
#~ msgstr "Valider"
#~ msgid "no"
#~ msgstr "non"
#~ msgid "yes"
#~ msgstr "oui"
#~ msgid "Deleting"
#~ msgstr "Suppression"

View file

@ -1,630 +0,0 @@
#!/usr/bin/php
<?php
/*******************************************************************************
* Copyright (C) 2007 Easter-eggs
* http://ldapsaisie.labs.libre-entreprise.org
*
* Author: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
******************************************************************************/
error_reporting(E_ERROR);
// Change directory
$curdir=getcwd();
chdir(dirname(__FILE__).'/../');
require_once('includes/core.php');
require_once('conf/config.inc.php');
$available_onlys = array("config", "templates", "addons");
$only = null;
$available_withouts = array_merge($available_onlys, array("select-list"));
$withouts = array();
$copyoriginalvalue=False;
$interactive=False;
$output=False;
$additionalfileformat=False;
$lang=False;
$encoding=False;
$available_formats=array('php', 'pot');
$format=$available_formats[0];
$translations=array();
$debug = false;
$load_files = array();
function usage($error=false, $exit_code=0) {
global $argv, $available_withouts, $available_onlys;
if ($error)
echo "$error\n\n";
echo "Usage : ".$argv[0]." [file1] [file2] [-h] [options]\n";
echo " -W/--without Disable specified messages. Must be one of the following values :\n";
echo " '".implode("','", $available_withouts)."'\n";
echo " -O/--only Only handle specified messages. Must be one of the following values :\n";
echo " '".implode("','", $available_onlys)."'\n";
echo " -c/--copy-original-value Copy original value as translated value when no translated value exists\n";
echo " -i/--interactive Interactive mode : ask user to enter translated on each translation needed\n";
echo " -a/--additional-file-format Additional file format output\n";
echo " -l/--lang Load this specify lang (format : [lang].[encoding])\n";
echo " -o/--output Output file (default : stdout)\n";
echo " -f/--format Output file format : php or pot (default : php)\n";
echo " -d/--debug Enable debug mode\n";
exit($exit_code);
}
function realtive_path($path) {
if ($path[0] == '/')
return $path;
global $curdir;
return realpath($curdir)."/".$path;
}
if ($argc > 1) {
for ($i=1;$i<$argc;$i++) {
if($argv[$i]=='--without' || $argv[$i]=='-W') {
$i++;
$without = strtolower($argv[$i]);
if (!in_array($without, $available_withouts))
die("Invalid -W/--without parameter. Must be one of the following values : '".implode("','", $available_withouts)."'.\n");
elseif ($only)
die("You could not use only -W/--without parameter combined with -O/--only parameter.\n");
$withouts[] = $without;
}
elseif($argv[$i]=='--only' || $argv[$i]=='-O') {
$i++;
if ($only)
die("You could specify only on -O/--only parameter.\n");
$only = strtolower($argv[$i]);
if (!in_array($only, $available_onlys))
die("Invalid -O/--only parameter. Must be one of the following values : '".implode("','", $available_onlys)."'.\n");
elseif ($without)
die("You could not use only -O/--only parameter combined with -W/--without parameter.\n");
}
elseif($argv[$i]=='--copy-original-value' || $argv[$i]=='-c') {
$copyoriginalvalue=True;
}
elseif($argv[$i]=='--interactive' || $argv[$i]=='-i') {
$interactive=True;
}
elseif($argv[$i]=='--additional-file-format' || $argv[$i]=='-a') {
$additionalfileformat=True;
}
elseif($argv[$i]=='--lang' || $argv[$i]=='-l') {
$i++;
$parse_lang=explode('.',$argv[$i]);
if (count($parse_lang)==2) {
$lang=$parse_lang[0];
$encoding=$parse_lang[1];
}
else {
die("Invalid --lang parameter. Must be compose in format : [lang].[encoding]\n");
}
}
elseif($argv[$i]=='--output' || $argv[$i]=='-o') {
$i++;
$output = $argv[$i];
}
elseif($argv[$i]=='--format' || $argv[$i]=='-f') {
$i++;
$format = strtolower($argv[$i]);
if (!in_array($format, $available_formats)) {
die("Invalid -f/--format parameter. Must be one of the following values : '".implode("','", $available_formats)."'.\n");
}
}
elseif($argv[$i]=='--debug' || $argv[$i]=='-d') {
$debug = true;
}
elseif($argv[$i]=='-h') {
usage();
}
else {
$path = realtive_path($argv[$i]);
if (is_file($path))
$load_files[] = $path;
else
usage($argv[$i]." : Invalid lang file to load.", 1);
}
}
}
$data=array();
function debug($msg) {
global $debug, $output;
if (!$debug) return true;
$fd = ($output?STDOUT: STDERR);
fwrite($fd, "$msg\n");
}
function add($msg, $context=null) {
debug("add($msg, $context)");
if ($msg!='' && _($msg) == "$msg") {
global $data, $translations, $interactive, $copyoriginalvalue, $format;
// Message already exists ?
if (array_key_exists($msg, $data)) {
if ($context && !in_array($context, $data[$msg]['contexts']))
$data[$msg]['contexts'][] = $context;
return True;
}
// Handle translation
$translation = "";
if (array_key_exists($msg, $translations)) {
$translation = $translations[$msg];
}
elseif (_($msg) != $msg) {
$translation = _($msg);
}
elseif ($interactive && $format != 'pot') {
if ($context)
fwrite(STDERR, "\n# $context\n");
if ($copyoriginalvalue) {
fwrite(STDERR, "\"$msg\"\n\n => Please enter translated string (or leave empty to copy original string) : ");
$in = trim(fgets(STDIN));
if ($in)
$translation = $in;
else
$translation = $msg;
}
else {
fwrite(STDERR, "\"$msg\"\n\n => Please enter translated string (or 'c' to copy original message, 'i' to ignore this message, leave empty to pass) : ");
$in = trim(fgets(STDIN));
if ($in) {
if ($in=="i")
return True;
if ($in=="c")
$translation = $msg;
else
$translation = $in;
}
}
}
$data[$msg] = array (
'translation' => $translation,
'contexts' => ($context?array($context):array()),
);
}
}
function addFromLSconfig($pattern, $value='value', $excludes=array()) {
debug("addFromLSconfig($pattern, array(".implode(',', $excludes)."))");
$keys = LSconfig :: getMatchingKeys($pattern);
debug("addFromLSconfig : ".count($keys)." matching key(s)");
foreach ($keys as $key => $value) {
debug("addFromLSconfig : $key = $value");
if ($value == 'key') {
// Get the last key parts as value and all other as key
$key_parts = explode('.', $key);
$value = $key_parts[count($key_parts)-1];
$key = implode('.', array_slice($key_parts, 0, count($key_parts)-1));
}
if (!in_array($value, $excludes) && is_string($value))
add($value, $key);
}
}
// Load translation files
foreach($load_files as $path) {
debug("Load $path lang file");
@include($path);
foreach($GLOBALS['LSlang'] as $msg => $trans) {
$translations[$msg]=$trans;
}
}
// Initialize session
LSsession :: initialize($lang,$encoding);
// Load lang string if lang was specify
if ($lang && $encoding) {
foreach($GLOBALS['LSlang'] as $msg => $trans) {
$translations[$msg]=$trans;
}
}
/*
* Manage configuration parameters
*/
if (!in_array('config', $withouts) && (!$only || $only == 'config')) {
// LDAP Servers
$objects = array();
foreach(LSconfig :: keys('ldap_servers') as $ldap_server_id) {
addFromLSconfig("ldap_servers.$ldap_server_id.name");
addFromLSconfig("ldap_servers.$ldap_server_id.subDnLabel");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.recoveryHashMail.subject");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.recoveryHashMail.msg");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.newPasswordMail.subject");
addFromLSconfig("ldap_servers.$ldap_server_id.recoverPassword.newPasswordMail.msg");
addFromLSconfig("ldap_servers.$ldap_server_id.subDn.*", 'key', array("LSobject"));
addFromLSconfig("ldap_servers.$ldap_server_id.LSprofiles.*.label");
// LSaccess
foreach (LSconfig :: get("ldap_servers.$ldap_server_id.LSaccess", array()) as $LSobject) {
if (is_string($LSobject) && !in_array($LSobject, $objects) && LSsession :: loadLSobject($LSobject)) {
$objects[] = $LSobject;
}
}
// Sub DN LSobjects
foreach (LSconfig :: getMatchingKeys("ldap_servers.$ldap_server_id.subDn.*.LSobjects.*") as $LSobject)
if (is_string($LSobject) && !in_array($LSobject, $objects) && LSsession :: loadLSobject($LSobject))
$objects[] = $LSobject;
}
debug('LSobjects list : '.implode(', ', $objects));
// LSobject
foreach($objects as $obj) {
addFromLSconfig("LSobjects.$obj.label");
// LSrelation
addFromLSconfig("LSobjects.$obj.LSrelation.*.label");
addFromLSconfig("LSobjects.$obj.LSrelation.*.emptyText");
// Custom Actions
addFromLSconfig("LSobjects.$obj.customActions.*.label");
addFromLSconfig("LSobjects.$obj.customActions.*.helpInfo");
addFromLSconfig("LSobjects.$obj.customActions.*.question_format");
addFromLSconfig("LSobjects.$obj.customActions.*.onSuccessMsgFormat");
// LSform
addFromLSconfig("LSobjects.$obj.LSform.layout.*.label");
addFromLSconfig("LSobjects.$obj.LSform.dataEntryForm.*.label");
// LSsearch
addFromLSconfig("LSobjects.$obj.LSsearch.predefinedFilters.*");
addFromLSconfig("LSobjects.$obj.LSsearch.extraDisplayedColumns.*.label");
addFromLSconfig("LSobjects.$obj.LSsearch.customActions.*.label");
addFromLSconfig("LSobjects.$obj.LSsearch.customActions.*.question_format");
addFromLSconfig("LSobjects.$obj.LSsearch.customActions.*.onSuccessMsgFormat");
// Attributes
foreach(LSconfig :: keys("LSobjects.$obj.attrs") as $attr) {
addFromLSconfig("LSobjects.$obj.attrs.$attr.label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.help_info");
addFromLSconfig("LSobjects.$obj.attrs.$attr.no_value_label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.check_data.*.msg");
addFromLSconfig("LSobjects.$obj.attrs.$attr.validation.*.msg");
// HTML Options
$html_type = LSconfig :: get("LSobjects.$obj.attrs.$attr.html_type");
switch($html_type) {
case 'boolean':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.true_label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.false_label");
break;
case 'jsonCompositeAttribute':
$components = LSconfig :: keys("LSobjects.$obj.attrs.$attr.html_options.components");
foreach($components as $c) {
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.label");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.help_info");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.check_data.*.msg");
if (
LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.type") == 'select_list' &&
LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.translate_labels", "True", "bool") &&
!in_array('select-list', $withouts)
)
{
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values", array()) as $pkey => $plabel) {
if (is_string($pkey)) {
if ($pkey == 'OTHER_OBJECT')
continue;
elseif ($pkey == 'OTHER_ATTRIBUTE') {
if (is_string($plabel))
continue;
elseif (is_array($plabel)) {
if (isset($plabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.*");
}
}
else
add($plabel, "LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey");
}
elseif (is_int($pkey) && is_array($plabel)) {
// Sub possible values
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey.label");
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey.possible_values", array()) as $ppkey => $pplabel) {
if ($ppkey == 'OTHER_OBJECT')
continue;
elseif ($ppkey == 'OTHER_ATTRIBUTE') {
if (is_string($pplabel))
continue;
elseif (is_array($pplabel)) {
if (isset($pplabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.OTHER_ATTRIBUTE.*");
}
}
elseif(is_string($pplabel)) {
add($pplabel, "LSobjects.$obj.attrs.$attr.html_options.components.$c.options.possible_values.$pkey.possible_values.$ppkey");
}
}
}
}
}
}
break;
case 'labeledValue':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.labels.*");
break;
case 'password':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.mail.subject");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.mail.msg");
break;
case 'select_list':
case 'select_box':
if (LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.translate_labels", "True", "bool") && !in_array('select-list', $withouts)) {
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.possible_values", array()) as $pkey => $plabel) {
if (is_string($pkey)) {
if ($pkey == 'OTHER_OBJECT')
continue;
elseif ($pkey == 'OTHER_ATTRIBUTE') {
if (is_string($plabel))
continue;
elseif (is_array($plabel)) {
if (isset($plabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.*");
}
}
else
add($plabel, "LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey");
}
elseif (is_int($pkey) && is_array($plabel)) {
// Sub possible values
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey.label");
foreach(LSconfig :: get("LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey.possible_values", array()) as $ppkey => $pplabel) {
if ($ppkey == 'OTHER_OBJECT')
continue;
elseif ($ppkey == 'OTHER_ATTRIBUTE') {
if (is_string($pplabel))
continue;
elseif (is_array($pplabel)) {
if (isset($pplabel['json_component_key']))
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.json_component_label");
else
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.possible_values.OTHER_ATTRIBUTE.*");
}
}
elseif(is_string($pplabel)) {
add($pplabel, "LSobjects.$obj.attrs.$attr.html_options.possible_values.$pkey.possible_values.$ppkey");
}
}
}
}
}
break;
case 'valueWithUnit':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.units.*");
break;
}
}
}
}
/*
* Manage template file
*/
if (!in_array('templates', $withouts) && (!$only || $only == 'templates')) {
function parse_template_file($file) {
debug("parse_template_file($file) : start ...");
$count = 0;
foreach(file($file) as $line) {
$count ++;
if (preg_match_all('/\{ *tr +msg=["\']([^\}]+)["\'] *\}/',$line,$matches)) {
foreach($matches[1] as $t) {
debug(" - \"$t\" # Line $count");
add($t, "$file:$count");
}
}
}
debug("parse_template_file($file) : done.");
}
function find_and_parse_template_file($dir) {
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if ($file=='.' || $file=='..') continue;
if (is_dir($dir.'/'.$file)) {
find_and_parse_template_file($dir.'/'.$file);
}
elseif (is_file($dir."/".$file) && preg_match('/\.tpl$/',$file)) {
parse_template_file($dir.'/'.$file);
}
}
closedir($dh);
}
}
}
find_and_parse_template_file(LS_TEMPLATES_DIR);
find_and_parse_template_file(LS_LOCAL_DIR.LS_TEMPLATES_DIR);
}
/*
* Manage addons files
*/
if (!in_array('addons', $withouts) && (!$only || $only == 'addons')) {
function parse_addon_file($file) {
$count = 0;
foreach(file($file) as $line) {
$count++;
$offset=0;
while ($pos = strpos($line,'__(',$offset)) {
$quote='';
$res='';
for ($i=$pos+3;$i<strlen($line);$i++) {
if (empty($quote)) {
// Quote char not detected : try to detect it
if ($line[$i]=='\\' || $line[$i]==" " || $line[$i]=="\t") {
// Space or escape char : pass
$i++;
}
elseif ($line[$i]=='"' || $line[$i]=="'") {
// Quote detected
$quote=$line[$i];
}
elseif ($line[$i]=='$' || $line[$i]==')') {
// Variable translation not possible or end function call detected
$offset=$i;
break;
}
else {
// Unknown case : continue
$i++;
}
}
elseif (!empty($quote)) {
// Quote char already detected : try to detect end quote char
if ($line[$i]=='\\') {
// Escape char detected : pass this char and the following one
$res.=$line[$i];
$i++;
$res.=$line[$i];
}
elseif ($line[$i]==$quote) {
// End quote char detected : set offset for next detection and break this one
$offset=$i;
break;
}
else {
// End quote char not detected : append current char to result
$res.=$line[$i];
}
}
}
if (!empty($res)) add($res, "$file:$count");
}
}
}
function find_and_parse_addon_file($dir) {
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (preg_match('/^LSaddons\.(.+)\.php$/',$file)) {
parse_addon_file($dir.'/'.$file);
}
}
closedir($dh);
}
}
}
find_and_parse_addon_file(LS_ADDONS_DIR);
find_and_parse_addon_file(LS_LOCAL_DIR.LS_ADDONS_DIR);
}
// Sort resulting strings
ksort($data);
/*
* Handle output file format
*/
function output_php($fd) {
global $additionalfileformat, $data, $copyoriginalvalue;
fwrite($fd, "<?php\n\n");
if (!$additionalfileformat) fwrite($fd, "\$GLOBALS['LSlang'] = array (\n");
foreach($data as $key => $key_data) {
if ($copyoriginalvalue && $key_data['translation'] == "") {
$val = $key;
}
else
$val = $key_data['translation'];
$key=str_replace('"','\\"',$key);
$val=str_replace('"','\\"',$val);
foreach ($key_data['contexts'] as $context)
fwrite($fd, "\n# $context");
if ($additionalfileformat) {
fwrite($fd, "\n\$GLOBALS['LSlang'][\"$key\"] = \"$val\";\n");
}
else {
fwrite($fd, "\n\"$key\" =>\n \"$val\",\n");
}
}
if (!$additionalfileformat) fwrite($fd, "\n);\n");
}
function clean_for_pot_file($val) {
$val = str_replace('"', '\\"', $val);
return str_replace("\n", "\\n", $val);
}
function output_pot($fd) {
global $data, $copyoriginalvalue;
foreach($data as $key => $key_data) {
if ($copyoriginalvalue && $key_data['translation'] == "") {
$val = $key;
}
else
$val = $key_data['translation'];
foreach ($key_data['contexts'] as $context)
fwrite($fd, "#: $context\n");
$key = clean_for_pot_file($key);
$val = clean_for_pot_file($val);
fwrite($fd, "msgid \"$key\"\nmsgstr \"$val\"\n\n");
}
}
// Determine where to write result
if ($output) {
$output = realtive_path($output);
try {
debug("Open output file ($output)");
$fd = fopen($output, 'w');
}
catch(Exception $e) {
fwrite(STDERR, 'Error occured opening output file : '.$e->getMessage(), "\n");
}
if (!$fd) {
fwrite(STDERR, "Use stdout out instead.\n");
$fd = STDOUT;
$output = false;
}
}
else
$fd = STDOUT;
// Generate output
debug("Output format : $format");
switch($format) {
case 'pot':
output_pot($fd);
break;
case 'php':
default:
output_php($fd);
break;
}
// Close output file (is specified)
if ($output) {
debug("Close output file ($output)");
fclose($fd);
}
exit(0);

View file

@ -16,7 +16,8 @@ xgettext --from-code utf-8 \
$( find "$SRC" -name "*.php" )
# Extract other messages from LdapSaisie templates files
$SRC/lang/generate_lang_file.php -o "$SRC/lang/ldapsaisie-templates.pot" \
$SRC/bin/ldapsaisie.php generate_lang_file \
-o "$SRC/lang/ldapsaisie-templates.pot" \
-f pot \
--only templates

View file

@ -379,7 +379,7 @@ msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSconfirmBox.php:37
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsmoothbox.php:39
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1378
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1246
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:68
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:568
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1148
@ -667,195 +667,191 @@ msgstr ""
msgid "Clear"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1318
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1186
msgid "Connection"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1328
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1367
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1196
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1235
msgid "LDAP server"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1338
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2489
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1206
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2356
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:669
msgid "Level"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1339
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1377
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1207
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1245
msgid "Identifier"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1340
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1208
msgid "Password"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1341
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1209
msgid "Connect"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1342
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1210
msgid "Forgot your password ?"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1360
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1228
msgid "Recovery of your credentials"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1379
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1247
msgid "Back"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1382
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1250
msgid "Please fill the identifier field to proceed recovery procedure"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1387
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1255
msgid ""
"An email has been sent to %{mail}. Please follow the instructions on it."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1396
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1264
msgid "Your new password has been sent to %{mail}."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1547
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1415
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:146
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:423
msgid "Refresh"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1563
msgid "Language"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1585
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:1452
msgid "Connected as"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2635
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2502
msgid "LSsession : The constant %{const} is not defined."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2638
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2505
msgid ""
"LSsession : The %{addon} support is uncertain. Verify system compatibility "
"and the add-on configuration."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2641
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2508
msgid ""
"LSsession : LDAP server's configuration data are invalid. Can't connect."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2644
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2511
msgid "LSsession : Failed to load LSobject type %{type} : unknon type."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2647
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2514
msgid "LSsession : Failed to load LSclass %{class}."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2650
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2517
msgid "LSsession : Login or password incorrect."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2653
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2520
msgid "LSsession : Impossible to identify you : Duplication of identities."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2656
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2523
msgid "LSsession : Can't load class of authentification (%{class})."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2659
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2526
msgid "LSsession : Can't connect to LDAP server."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2662
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2529
msgid "LSsession : Impossible to authenticate you."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2665
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2532
msgid "LSsession : Your are not authorized to do this action."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2668
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2535
msgid "LSsession : Some informations are missing to display this page."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2671
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2538
msgid ""
"LSsession : The function of the custom action %{name} does not exists or is "
"not configured."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2674
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2541
msgid "LSsession : Fail to retreive user's LDAP credentials from LSauth."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2677
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2544
msgid ""
"LSsession : Fail to reconnect to LDAP server with user's LDAP credentials."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2680
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2547
msgid "LSsession : No import/export format define for this object type."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2683
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2550
msgid ""
"LSsession : Error during creation of list of levels. Contact administrators. "
"(Code : %{code})"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2686
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2553
msgid "LSsession : The password recovery is disabled for this LDAP server."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2689
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2556
msgid ""
"LSsession : Some informations are missing to recover your password. Contact "
"administrators."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2692
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2559
msgid ""
"LSsession : Error during password recovery. Contact administrators.(Step : "
"%{step})"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2695
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2562
msgid ""
"LSsession : call function %{func} do not provided from LSaddon %{addon}."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2698
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2565
msgid "LSsession : problem during initialisation."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2701
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2568
msgid "LSsession : view function %{func} for LSaddon %{addon} doet not exist."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2704
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2571
msgid "LSsession : invalid related object's DN pass in parameter."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2707
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2574
msgid ""
"LSsession : the LSaddon %{addon} keep using old-style addon view URL. Please "
"upgrade it."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2710
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2577
msgid ""
"LSsession : You have been redirect from an old-style URL %{url}. Please "
"upgrade this link."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2713
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsession.php:2580
msgid ""
"LSsession : You still seen use LSsession :: redirect() in your custom code. "
"Please upgrade it and use LSurl :: redirect()."
@ -1701,21 +1697,21 @@ msgstr ""
msgid "Entity type"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:122
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:127
msgid "Only one command could be executed !"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:168
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:173
msgid ""
"Invalid parameter \"%{parameter}\".\n"
"Note: Command's parameter/argument must be place after the command."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:207
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:212
msgid "LScli : The CLI command '%{command}' already exists."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:210
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LScli.php:215
msgid "LScli : The CLI command '%{command}' handler is not callable."
msgstr ""
@ -1874,6 +1870,11 @@ msgstr ""
msgid "Imported objects"
msgstr ""
#: templates/default/top.tpl:53 templates/default/recoverpassword.tpl:33
#: templates/default/login.tpl:31 templates/default/login.tpl:42
msgid "Language"
msgstr ""
#: templates/default/LSaccessRightsMatrixView.tpl:19
#: templates/default/LSaccessRightsMatrixView.tpl:55
msgid "Legend:"