LScli / LSlang: starting CLI commands messages translation

This commit is contained in:
Benjamin Renard 2023-03-21 12:59:55 +01:00
parent e103bee065
commit 48e5d45d32
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC
5 changed files with 492 additions and 89 deletions

View file

@ -88,46 +88,54 @@ class LScli extends LSlog_staticLoggerClass {
* Show usage message * Show usage message
* *
* @param string|false $error Error message to display before usage message (optional, default: false) * @param string|false $error Error message to display before usage message (optional, default: false)
* @param string $extra_args Optional argument use to compute error message using sprintf (if provided)
* @return void * @return void
**/ **/
public static function usage($error=false) { public static function usage($error=false, ...$extra_args) {
global $argv; global $argv;
if ($error) if ($error) {
if ($extra_args)
$error = call_user_func_array('sprintf', array_merge(array($error), $extra_args));
echo "$error\n\n"; echo "$error\n\n";
}
echo "Usage : ".basename($argv[0])." [-h] [-qdC] command\n"; printf(_(
echo " -h Show this message\n"; "Usage: %s [-h] [-qdC] command
echo " -q|--quiet Quiet mode: nothing log on console (but keep other logging handler)\n"; -h Show this message
echo " -d|--debug Debug mode (set log level to DEBUG, default: WARNING)\n"; -q|--quiet Quiet mode: nothing log on console (but keep other logging handler)
echo " -v|--verbose Verbose mode (set log level to INFO, default: WARNING)\n"; -d|--debug Debug mode (set log level to DEBUG, default: WARNING)
echo " --trace Trace mode (set log level to TRACE, default: WARNING)\n"; -v|--verbose Verbose mode (set log level to INFO, default: WARNING)
echo " -C|--console Log on console with same log level as other handlers (otherwise, log only errors)\n"; --trace Trace mode (set log level to TRACE, default: WARNING)
echo " -S|--ldap-server Connect to a specific LDAP server: you could specify a LDAP\n"; -C|--console Log on console with same log level as other handlers (otherwise, log only errors)
echo " server by its declaration order in configuration (default:\n"; -S|--ldap-server Connect to a specific LDAP server: you could specify a LDAP
echo " first one).\n"; server by its declaration order in configuration (default:
echo " -L|--load-class Load specific class to permit access to its CLI commands\n"; first one).
echo " -A|--load-addons Load specific addon to permit access to its CLI commands\n"; -L|--load-class Load specific class to permit access to its CLI commands
echo " command Command to run\n"; -A|--load-addons Load specific addon to permit access to its CLI commands
echo "\n"; command Command to run
echo "Available commands :\n";
Available commands:
"), basename($argv[0]));
foreach (self :: $commands as $command => $info) { foreach (self :: $commands as $command => $info) {
if (self :: $current_command and self :: $current_command != $command) if (self :: $current_command and self :: $current_command != $command)
continue; continue;
echo " $command : ".$info['short_desc']."\n"; echo " $command: ".__($info['short_desc'])."\n";
echo " ".basename($argv[0])." $command ".($info['usage_args']?$info['usage_args']:'')."\n"; echo " ".basename($argv[0])." $command ".($info['usage_args']?__($info['usage_args']):'')."\n";
if ($info['long_desc']) { if ($info['long_desc']) {
if (is_array($info['long_desc'])) if (is_array($info['long_desc'])) {
$info['long_desc'] = array_map('__', $info['long_desc']);
$info['long_desc'] = implode("\n", $info['long_desc']); $info['long_desc'] = implode("\n", $info['long_desc']);
echo "\n ".str_replace("\n", "\n ", wordwrap($info['long_desc']))."\n"; }
echo "\n ".str_replace("\n", "\n ", wordwrap(__($info['long_desc'])))."\n";
} }
echo "\n"; echo "\n";
} }
if (empty(self :: $commands)) if (empty(self :: $commands))
echo " Currently no available command is declared.\n"; echo " "._("Currently no available command is declared.")."\n";
exit(($error?1:0)); exit($error?1:0);
} }
/** /**
@ -186,7 +194,7 @@ class LScli extends LSlog_staticLoggerClass {
$i++; $i++;
$ldap_server_id = intval($argv[$i]); $ldap_server_id = intval($argv[$i]);
if(!LSsession :: setLdapServer($ldap_server_id)) if(!LSsession :: setLdapServer($ldap_server_id))
self :: usage("Fail to select LDAP server #$ldap_server_id."); self :: usage(_("Fail to select LDAP server #%s."), $ldap_server_id);
break; break;
case '--sub-dn': case '--sub-dn':
$i++; $i++;
@ -197,14 +205,14 @@ class LScli extends LSlog_staticLoggerClass {
$i++; $i++;
$class = $argv[$i]; $class = $argv[$i];
if(!LSsession :: loadLSclass($class)) if(!LSsession :: loadLSclass($class))
self :: usage("Fail to load class '$class'."); self :: usage(_("Fail to load class '%s'."), $class);
break; break;
case '-A': case '-A':
case '--load-addon': case '--load-addon':
$i++; $i++;
$addon = $argv[$i]; $addon = $argv[$i];
if(!LSsession :: loadLSaddon($addon)) if(!LSsession :: loadLSaddon($addon))
self :: usage("Fail to load addon '$addon'."); self :: usage(_("Fail to load addon '%s'."), $addon);
break; break;
case '--': case '--':
$command_args = array_merge($command_args, array_slice($argv, $i)); $command_args = array_merge($command_args, array_slice($argv, $i));
@ -215,7 +223,8 @@ class LScli extends LSlog_staticLoggerClass {
$command_args[] = $argv[$i]; $command_args[] = $argv[$i];
else else
self :: usage( self :: usage(
getFData(_("Invalid parameter \"%{parameter}\".\nNote: Command's parameter/argument must be place after the command."), $argv[$i]) _("Invalid parameter \"%s\".\nNote: Command's parameter/argument must be place after the command."),
$argv[$i]
); );
} }
} }
@ -249,7 +258,7 @@ class LScli extends LSlog_staticLoggerClass {
if ($ldap_server_subDn) { if ($ldap_server_subDn) {
self :: need_ldap_con(); self :: need_ldap_con();
if(!LSsession :: setSubDn($ldap_server_subDn)) if(!LSsession :: setSubDn($ldap_server_subDn))
self :: usage("Fail to select sub DN '$ldap_server_subDn'."); self :: usage(_("Fail to select sub DN '%s'."), $ldap_server_subDn);
} }
if (!$command) { if (!$command) {
@ -259,7 +268,7 @@ class LScli extends LSlog_staticLoggerClass {
// Select LDAP server (if not already done with -S/--ldap-server parameter) // Select LDAP server (if not already done with -S/--ldap-server parameter)
if ($ldap_server_id === false && !LSsession :: setLdapServer(0)) if ($ldap_server_id === false && !LSsession :: setLdapServer(0))
self :: log_fatal('Fail to select first LDAP server.'); self :: log_fatal(_('Fail to select first LDAP server.'));
// Run command // Run command
self :: run_command($command, $command_args); self :: run_command($command, $command_args);
@ -379,12 +388,12 @@ class LScli extends LSlog_staticLoggerClass {
**/ **/
public static function confirm($question=null) { public static function confirm($question=null) {
if (is_null($question)) if (is_null($question))
$question = "Are you sure?"; $question = _("Are you sure?");
echo "\n$question Type 'yes' to continue: "; printf(_("\n%s Type 'yes' to continue: "), $question);
$handle = fopen ("php://stdin","r"); $handle = fopen ("php://stdin","r");
$line = fgets($handle); $line = fgets($handle);
if(trim($line) != 'yes'){ if(trim($line) != _('yes')){
echo "User cancel\n"; echo _("User cancel\n");
return false; return false;
} }
echo "\n"; echo "\n";
@ -456,7 +465,7 @@ class LScli extends LSlog_staticLoggerClass {
$ldap_server_id = intval($comp_words[$i]); $ldap_server_id = intval($comp_words[$i]);
self :: unquote_word($ldap_server_id); self :: unquote_word($ldap_server_id);
if(!LSsession :: setLdapServer($ldap_server_id)) if(!LSsession :: setLdapServer($ldap_server_id))
self :: usage("Fail to select LDAP server #$ldap_server_id."); self :: usage(_("Fail to select LDAP server #%s."), $ldap_server_id);
} }
break; break;
case '--sub-dn': case '--sub-dn':
@ -476,7 +485,7 @@ class LScli extends LSlog_staticLoggerClass {
self :: unquote_word($ldap_server_subDn); self :: unquote_word($ldap_server_subDn);
self :: need_ldap_con(); self :: need_ldap_con();
if(!LSsession :: setSubDn($ldap_server_subDn)) if(!LSsession :: setSubDn($ldap_server_subDn))
self :: usage("Fail to select sub DN '$ldap_server_subDn'."); self :: usage(_("Fail to select sub DN '%s'.", $ldap_server_subDn));
break; break;
case '-L': case '-L':
case '--load-class': case '--load-class':
@ -491,7 +500,7 @@ class LScli extends LSlog_staticLoggerClass {
$class = $comp_words[$i]; $class = $comp_words[$i];
self :: unquote_word($class); self :: unquote_word($class);
if(!LSsession :: loadLSclass($class)) if(!LSsession :: loadLSclass($class))
self :: usage("Fail to load class '$class'."); self :: usage(_("Fail to load class '%s'."), $class);
break; break;
case '-A': case '-A':
case '--load-addon': case '--load-addon':
@ -506,7 +515,7 @@ class LScli extends LSlog_staticLoggerClass {
$addon = $comp_words[$i]; $addon = $comp_words[$i];
self :: unquote_word($addon); self :: unquote_word($addon);
if(!LSsession :: loadLSaddon($addon)) if(!LSsession :: loadLSaddon($addon))
self :: usage("Fail to load addon '$addon'."); self :: usage(_("Fail to load addon '%s'."), $addon);
break; break;
default: default:
if (!in_array($comp_words[$i], $opts)) { if (!in_array($comp_words[$i], $opts)) {
@ -524,7 +533,7 @@ class LScli extends LSlog_staticLoggerClass {
asort($subDns); asort($subDns);
$subDn = key($subDns); $subDn = key($subDns);
if(!LSsession :: setSubDn($subDn)) if(!LSsession :: setSubDn($subDn))
self :: usage("Fail to select sub DN '$subDn'."); self :: usage(_("Fail to select sub DN '%s'."), $subDn);
$opts[] = '--sub-dn'; $opts[] = '--sub-dn';
} }
} }
@ -852,7 +861,7 @@ ___("LScli : The CLI command '%{command}' handler is not callable.")
LScli :: add_command( LScli :: add_command(
'bash_autocomplete', 'bash_autocomplete',
array('LScli', 'bash_autocomplete'), array('LScli', 'bash_autocomplete'),
'Handle BASH completion', ___('Handle BASH completion'),
'[arg num to autocomplete] -- [command args]', '[arg num to autocomplete] -- [command args]',
null, null,
false false

View file

@ -755,9 +755,9 @@ function cli_generate_lang_file($command_args) {
$i++; $i++;
$without = strtolower($command_args[$i]); $without = strtolower($command_args[$i]);
if (!in_array($without, $available_withouts)) if (!in_array($without, $available_withouts))
LScli :: usage("Invalid -W/--without parameter. Must be one of the following values : '".implode("','", $available_withouts)."'."); LScli :: usage(_("Invalid -W/--without parameter. Must be one of the following values: %s.'"), implode("','", $available_withouts));
elseif ($only) elseif ($only)
LScli :: usage("You could not use only -W/--without parameter combined with -O/--only parameter."); LScli :: usage(_("You could not use -W/--without parameter combined with -O/--only parameter."));
$withouts[] = $without; $withouts[] = $without;
break; break;
@ -765,12 +765,12 @@ function cli_generate_lang_file($command_args) {
case '-O': case '-O':
$i++; $i++;
if ($only) if ($only)
LScli :: usage("You could specify only on -O/--only parameter."); LScli :: usage(_("You could specify only one -O/--only parameter."));
$only = strtolower($command_args[$i]); $only = strtolower($command_args[$i]);
if (!in_array($only, $available_onlys)) if (!in_array($only, $available_onlys))
LScli :: usage("Invalid -O/--only parameter. Must be one of the following values : '".implode("','", $available_onlys)."'."); LScli :: usage(_("Invalid -O/--only parameter. Must be one of the following values: %s.'"), implode("','", $available_onlys));
elseif ($withouts) elseif ($withouts)
LScli :: usage("You could not use only -O/--only parameter combined with -W/--without parameter."); LScli :: usage(_("You could not use -W/--without parameter combined with -O/--only parameter."));
break; break;
case '-I': case '-I':
@ -802,7 +802,7 @@ function cli_generate_lang_file($command_args) {
$encoding = $parse_lang[1]; $encoding = $parse_lang[1];
} }
else { else {
LScli :: usage("Invalid --lang parameter. Must be compose in format : [lang].[encoding]"); LScli :: usage(_("Invalid -l/--lang parameter. Must be compose in format : [lang].[encoding]"));
} }
break; break;
@ -817,7 +817,7 @@ function cli_generate_lang_file($command_args) {
$i++; $i++;
$format = strtolower($command_args[$i]); $format = strtolower($command_args[$i]);
if (!in_array($format, $available_formats)) { if (!in_array($format, $available_formats)) {
LScli :: usage("Invalid -f/--format parameter. Must be one of the following values : '".implode("','", $available_formats)."'."); LScli :: usage(_("Invalid -f/--format parameter. Must be one of the following values: %s.'"), implode("','", $available_formats));
} }
break; break;
@ -841,7 +841,7 @@ function cli_generate_lang_file($command_args) {
if (is_file($path)) if (is_file($path))
$load_files[] = $path; $load_files[] = $path;
else else
LScli :: usage($command_args[$i]." : Invalid parameter or lang file to load."); LScli :: usage(_("%s: Invalid parameter or lang file to load."), $command_args[$i]);
} }
} }
@ -1133,29 +1133,32 @@ function cli_generate_lang_file_args_autocompleter($comp_words, $comp_word_num,
LScli :: add_command( LScli :: add_command(
'generate_lang_file', 'generate_lang_file',
'cli_generate_lang_file', 'cli_generate_lang_file',
'Generate lang.php file', ___('Generate lang.php file'),
'l [lang] [-o output.file] [file1] [file2] [-h] [options]', '-l [lang] [-o output.file] [file1] [file2] [-h] [options]',
array( array(
" -W/--without Disable specified messages. Must be one of", ___(
" the following values :", " -W/--without Disable specified messages. Must be one of
the following values:"),
" - ".implode("\n - ", $available_withouts), " - ".implode("\n - ", $available_withouts),
" -O/--only Only handle specified messages. Must be one", ___(
" of the following values :", " -O/--only Only handle specified messages. Must be one
of the following values :"),
" - ".implode("\n - ", $available_onlys), " - ".implode("\n - ", $available_onlys),
" -I/--include-upstream Include upstream code to message lookup", ___(
" -c/--copy-original-value Copy original value as translated value when", " -I/--include-upstream Include upstream code to message lookup
" no translated value exists", -c/--copy-original-value Copy original value as translated value when
" -i/--interactive Interactive mode : ask user to enter", no translated value exists
" translated on each translation needed", -i/--interactive Interactive mode : ask user to enter
" -a/--additional-file-format Additional file format output", translated on each translation needed
" -l/--lang Load the specify lang", -a/--additional-file-format Additional file format output
" Format: [lang].[encoding]", -l/--lang Language of the translation
" -o/--output Output file (default: stdout)", Format: [lang].[encoding]
" -f/--format Output file format : php or pot", -o/--output Output file (default: stdout)
" (default: php)", -f/--format Output file format : php or pot
" -K/--keep-unused Keep unused translations in resulting file", (default: php)
" -F/--fix-utf8 Try to load and fix broken UTF-8 characters in", -K/--keep-unused Keep unused translations in resulting file
" existing lang files." -F/--fix-utf8 Try to load and fix broken UTF-8 characters
in existing lang files.")
), ),
false, // This command does not need LDAP connection false, // This command does not need LDAP connection
'cli_generate_lang_file_args_autocompleter' 'cli_generate_lang_file_args_autocompleter'
@ -1246,16 +1249,16 @@ function cli_generate_ldapsaisie_pot($command_args) {
LScli :: add_command( LScli :: add_command(
'generate_ldapsaisie_pot', 'generate_ldapsaisie_pot',
'cli_generate_ldapsaisie_pot', 'cli_generate_ldapsaisie_pot',
'Generate ldapsaisie.pot files :', ___('Generate POT files:'),
null, null,
array( array(
"This command generate 3 POT files:", ___("This command generate 3 POT files:"),
" - ".LS_I18N_DIR_PATH."/ldapsaisie-main.pot", " - ".LS_I18N_DIR_PATH."/ldapsaisie-main.pot",
" => contains messages from PHP files", ___(" => contains messages from PHP files"),
" - ".LS_I18N_DIR_PATH."/ldapsaisie-templates.pot", " - ".LS_I18N_DIR_PATH."/ldapsaisie-templates.pot",
" => contains messages from templates files", ___(" => contains messages from templates files"),
" - ".LS_I18N_DIR_PATH."/ldapsaisie.pot", " - ".LS_I18N_DIR_PATH."/ldapsaisie.pot",
" => contains all messages", ___(" => contains all messages"),
), ),
false // This command does not need LDAP connection false // This command does not need LDAP connection
); );

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: LdapSaisie\n" "Project-Id-Version: LdapSaisie\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2023-03-21 11:25+0100\n" "PO-Revision-Date: 2023-03-21 12:59+0100\n"
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n" "Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
"Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise." "Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise."
"org>\n" "org>\n"
@ -1107,6 +1107,123 @@ msgstr "Ou laisser vide pour copier le message original?\n"
msgid "Or leave empty to pass.\n" msgid "Or leave empty to pass.\n"
msgstr "Or leave empty to pass.\n" msgstr "Or leave empty to pass.\n"
#: includes/class/class.LSlang.php:758
#, php-format
msgid ""
"Invalid -W/--without parameter. Must be one of the following values: %s.'"
msgstr ""
"Paramètre -W/--without invalide. Doit-être une des valeurs suivantes : %s."
#: includes/class/class.LSlang.php:760 includes/class/class.LSlang.php:773
msgid ""
"You could not use -W/--without parameter combined with -O/--only parameter."
msgstr ""
"Vous ne pouvez pas utiliser les paramètres -W/--without et -O/--only "
"ensemble."
#: includes/class/class.LSlang.php:768
msgid "You could specify only one -O/--only parameter."
msgstr "Vous ne pouvez spécifier qu'un seul paramètre -O/--only."
#: includes/class/class.LSlang.php:771
#, php-format
msgid "Invalid -O/--only parameter. Must be one of the following values: %s.'"
msgstr ""
"Paramètre -O/--only invalide. Doit-être une des valeurs suivantes : %s."
#: includes/class/class.LSlang.php:805
msgid ""
"Invalid -l/--lang parameter. Must be compose in format : [lang].[encoding]"
msgstr ""
"Paramètre -l/--lang invalide. Doit-être composé au format : [lang].[encoding]"
#: includes/class/class.LSlang.php:820
#, php-format
msgid ""
"Invalid -f/--format parameter. Must be one of the following values: %s.'"
msgstr ""
"Paramètre -f/--format invalide. Doit-être une des valeurs suivantes : %s."
#: includes/class/class.LSlang.php:844
#, php-format
msgid "%s: Invalid parameter or lang file to load."
msgstr "%s : Paramètre ou fichier de traductions à charger invalide."
#: includes/class/class.LSlang.php:1136
msgid "Generate lang.php file"
msgstr "Générer le fichier lang.php"
#: includes/class/class.LSlang.php:1140
msgid ""
" -W/--without Disable specified messages. Must be one of\n"
" the following values:"
msgstr ""
" -W/--without Désactiver les messages spécifiés. Doit\n"
" être une des valeurs suivants :"
#: includes/class/class.LSlang.php:1144
msgid ""
" -O/--only Only handle specified messages. Must be one\n"
" of the following values :"
msgstr ""
" -O/--only Gérer uniquement les messages spécifiés.\n"
" Doit-être une des valeurs suivantes :"
#: includes/class/class.LSlang.php:1148
msgid ""
" -I/--include-upstream Include upstream code to message lookup\n"
" -c/--copy-original-value Copy original value as translated value when\n"
" no translated value exists\n"
" -i/--interactive Interactive mode : ask user to enter\n"
" translated on each translation needed\n"
" -a/--additional-file-format Additional file format output\n"
" -l/--lang Language of the translation\n"
" Format: [lang].[encoding]\n"
" -o/--output Output file (default: stdout)\n"
" -f/--format Output file format : php or pot\n"
" (default: php)\n"
" -K/--keep-unused Keep unused translations in resulting file\n"
" -F/--fix-utf8 Try to load and fix broken UTF-8 characters\n"
" in existing lang files."
msgstr ""
" -I/--include-upstream Inclure le code upstream dans la recherche de\n"
" messages\n"
" -c/--copy-original-value Copier le message d'origine lorsqu'aucune\n"
" traduction n'est disponible\n"
" -i/--interactive Mode interactif : demander à l'utilisateur\n"
" de saisir les traductions lorsque nécessaire\n"
" -a/--additional-file-format Format de fichier de sortie additionnel\n"
" -l/--lang Langue de la traduction\n"
" Format : [lang].[encoding]\n"
" -o/--output Fichier de sortie (par défaut : stdout)\n"
" -f/--format Format du fichier de sortie : php ou pot\n"
" (par défaut: php)\n"
" -K/--keep-unused Conserver les messages traduits non-utilisés\n"
" dans le fichier\n"
" -F/--fix-utf8 Essayer de charger et réparer les\n"
" caractères UTF-8 invalides dans les fichiers\n"
" de traductions existants."
#: includes/class/class.LSlang.php:1252
msgid "Generate POT files:"
msgstr "Générer les fichiers POT:"
#: includes/class/class.LSlang.php:1255
msgid "This command generate 3 POT files:"
msgstr "Cette commande génère 3 fichiers POT :"
#: includes/class/class.LSlang.php:1257
msgid " => contains messages from PHP files"
msgstr " => contient les messages issues des fichiers PHP"
#: includes/class/class.LSlang.php:1259
msgid " => contains messages from templates files"
msgstr " => contient les messages issues des fichiers de templates"
#: includes/class/class.LSlang.php:1261
msgid " => contains all messages"
msgstr " => contient tous -W/--withoutles messages"
#: includes/class/class.LStemplate.php:160 #: includes/class/class.LStemplate.php:160
msgid "LStemplate : compile directory is not writable (dir : %{dir})" msgid "LStemplate : compile directory is not writable (dir : %{dir})"
msgstr "" msgstr ""
@ -2873,25 +2990,134 @@ msgstr "La boîte mail a été supprimée."
msgid "Role" msgid "Role"
msgstr "Rôle" msgstr "Rôle"
#: includes/class/class.LScli.php:218 #: includes/class/class.LScli.php:104
#, php-format
msgid "" msgid ""
"Invalid parameter \"%{parameter}\".\n" "Usage: %s [-h] [-qdC] command\n"
" -h Show this message\n"
" -q|--quiet Quiet mode: nothing log on console (but keep other "
"logging handler)\n"
" -d|--debug Debug mode (set log level to DEBUG, default: WARNING)\n"
" -v|--verbose Verbose mode (set log level to INFO, default: WARNING)\n"
" --trace Trace mode (set log level to TRACE, default: WARNING)\n"
" -C|--console Log on console with same log level as other handlers "
"(otherwise, log only errors)\n"
" -S|--ldap-server Connect to a specific LDAP server: you could specify a "
"LDAP\n"
" server by its declaration order in configuration "
"(default:\n"
" first one).\n"
" -L|--load-class Load specific class to permit access to its CLI "
"commands\n"
" -A|--load-addons Load specific addon to permit access to its CLI "
"commands\n"
" command Command to run\n"
"\n"
" Available commands:\n"
msgstr ""
"Usage: %s [-h] [-qdC] commande\n"
" -h Afficher ce message\n"
" -q|--quiet Mode silencieux : rien ne sera afficher sur la console\n"
" (mais conversé dans les autres canaux de "
"journalisation)\n"
" -d|--debug Mode debug (définir le niveau de log à DEBUG, par "
"défaut : WARNING)\n"
" -v|--verbose Mode verbeux (définir le niveau de log à INFO, par "
"défaut : WARNING)\n"
" --trace Mode trace (définir le niveau de log à TRACE, par "
"défaut : WARNING)\n"
" -C|--console Journalisation des messages dans la console au même "
"niveaux que les\n"
" autres canaux (autrement, affichage des messages "
"d'erreur uniquement)\n"
" -S|--ldap-server Connexion au serveur LDAP spécifié : vous pouvez "
"spécifier un serveur\n"
" par son ordre déclaration dans le fichier de "
"configuration\n"
" (par défaut: le premier).\n"
" -L|--load-class Charger la classe spécifiée pour permettre l'accès à ses "
"commandes CLI\n"
" -A|--load-addons Charger l'addon spécifié pour permettre l'accès à ses "
"commandes CLI\n"
" commande La commande à exécuter\n"
"\n"
" Commandes disponibles :\n"
#: includes/class/class.LScli.php:136
msgid "Currently no available command is declared."
msgstr "Aucune commande n'est disponible actuellement."
#: includes/class/class.LScli.php:197 includes/class/class.LScli.php:468
#, php-format
msgid "Fail to select LDAP server #%s."
msgstr "Impossible de sélectionner le serveur LDAP #%s."
#: includes/class/class.LScli.php:208 includes/class/class.LScli.php:503
#, php-format
msgid "Fail to load class '%s'."
msgstr "Impossible de charger la classe '%s'."
#: includes/class/class.LScli.php:215 includes/class/class.LScli.php:518
#, php-format
msgid "Fail to load addon '%s'."
msgstr "Échec de chargement de l'addon '%s'."
#: includes/class/class.LScli.php:226
#, php-format
msgid ""
"Invalid parameter \"%s\".\n"
"Note: Command's parameter/argument must be place after the command." "Note: Command's parameter/argument must be place after the command."
msgstr "" msgstr ""
"Paramètre \"%{parameter}\" invalide.\n" "Paramètre \"%s\" invalide.\n"
"Note: Les paramètres/arguments de la commande doivent être placés après " "Note: Les paramètres/arguments de la commande doivent être placés après "
"celle-ci." "celle-ci."
#: includes/class/class.LScli.php:843 #: includes/class/class.LScli.php:261 includes/class/class.LScli.php:488
#: includes/class/class.LScli.php:536
#, php-format
msgid "Fail to select sub DN '%s'."
msgstr "Échec de sélection du sous DN '%s'."
#: includes/class/class.LScli.php:271
msgid "Fail to select first LDAP server."
msgstr "Impossible de sélectionner le premier serveur LDAP."
#: includes/class/class.LScli.php:391
msgid "Are you sure?"
msgstr "Vous êtes sûre ?"
#: includes/class/class.LScli.php:392
#, php-format
msgid ""
"\n"
"%s Type 'yes' to continue: "
msgstr ""
"\n"
"%s Entrer 'oui' pour continuer : "
#: includes/class/class.LScli.php:395 templates/default/import.tpl:26
#: templates/default/import.tpl:32
msgid "yes"
msgstr "oui"
#: includes/class/class.LScli.php:396
msgid "User cancel\n"
msgstr "Annulation par l'utilisateur\n"
#: includes/class/class.LScli.php:852
msgid "LScli : The CLI command '%{command}' already exists." msgid "LScli : The CLI command '%{command}' already exists."
msgstr "LScli : La commande CLI '%{command}' existe déjà." msgstr "LScli : La commande CLI '%{command}' existe déjà."
#: includes/class/class.LScli.php:846 #: includes/class/class.LScli.php:855
msgid "LScli : The CLI command '%{command}' handler is not callable." msgid "LScli : The CLI command '%{command}' handler is not callable."
msgstr "" msgstr ""
"LScli : La fonction de prise en charge de la commande CLI '%{command}' n'est " "LScli : La fonction de prise en charge de la commande CLI '%{command}' n'est "
"pas exécutable." "pas exécutable."
#: includes/class/class.LScli.php:864
msgid "Handle BASH completion"
msgstr "Gérer la complétion BASH"
#: includes/class/class.LSioFormatCSV.php:294 #: includes/class/class.LSioFormatCSV.php:294
msgid "LSioFormatCSV: function fputcsv is not available." msgid "LSioFormatCSV: function fputcsv is not available."
msgstr "LSioFormatCSV : la fonction fputcsv n'est pas disponible." msgstr "LSioFormatCSV : la fonction fputcsv n'est pas disponible."
@ -3441,9 +3667,8 @@ msgstr "événement(s) trouvé(s) pour cet objet."
msgid "no" msgid "no"
msgstr "non" msgstr "non"
#: templates/default/import.tpl:26 templates/default/import.tpl:32 #~ msgid "Generate ldapsaisie.pot files:"
msgid "yes" #~ msgstr "Générer les fichiers POT :"
msgstr "oui"
#~ msgid "" #~ msgid ""
#~ "SAMBA Support: The attribute %{dependency} is missing. Unable to forge " #~ "SAMBA Support: The attribute %{dependency} is missing. Unable to forge "

View file

@ -971,6 +971,96 @@ msgstr ""
msgid "Or leave empty to pass.\n" msgid "Or leave empty to pass.\n"
msgstr "" msgstr ""
#: includes/class/class.LSlang.php:758
#, php-format
msgid ""
"Invalid -W/--without parameter. Must be one of the following values: %s.'"
msgstr ""
#: includes/class/class.LSlang.php:760 includes/class/class.LSlang.php:773
msgid ""
"You could not use -W/--without parameter combined with -O/--only parameter."
msgstr ""
#: includes/class/class.LSlang.php:768
msgid "You could specify only one -O/--only parameter."
msgstr ""
#: includes/class/class.LSlang.php:771
#, php-format
msgid "Invalid -O/--only parameter. Must be one of the following values: %s.'"
msgstr ""
#: includes/class/class.LSlang.php:805
msgid ""
"Invalid -l/--lang parameter. Must be compose in format : [lang].[encoding]"
msgstr ""
#: includes/class/class.LSlang.php:820
#, php-format
msgid ""
"Invalid -f/--format parameter. Must be one of the following values: %s.'"
msgstr ""
#: includes/class/class.LSlang.php:844
#, php-format
msgid "%s: Invalid parameter or lang file to load."
msgstr ""
#: includes/class/class.LSlang.php:1136
msgid "Generate lang.php file"
msgstr ""
#: includes/class/class.LSlang.php:1140
msgid ""
" -W/--without Disable specified messages. Must be one of\n"
" the following values:"
msgstr ""
#: includes/class/class.LSlang.php:1144
msgid ""
" -O/--only Only handle specified messages. Must be one\n"
" of the following values :"
msgstr ""
#: includes/class/class.LSlang.php:1148
msgid ""
" -I/--include-upstream Include upstream code to message lookup\n"
" -c/--copy-original-value Copy original value as translated value when\n"
" no translated value exists\n"
" -i/--interactive Interactive mode : ask user to enter\n"
" translated on each translation needed\n"
" -a/--additional-file-format Additional file format output\n"
" -l/--lang Language of the translation\n"
" Format: [lang].[encoding]\n"
" -o/--output Output file (default: stdout)\n"
" -f/--format Output file format : php or pot\n"
" (default: php)\n"
" -K/--keep-unused Keep unused translations in resulting file\n"
" -F/--fix-utf8 Try to load and fix broken UTF-8 characters\n"
" in existing lang files."
msgstr ""
#: includes/class/class.LSlang.php:1252
msgid "Generate POT files:"
msgstr ""
#: includes/class/class.LSlang.php:1255
msgid "This command generate 3 POT files:"
msgstr ""
#: includes/class/class.LSlang.php:1257
msgid " => contains messages from PHP files"
msgstr ""
#: includes/class/class.LSlang.php:1259
msgid " => contains messages from templates files"
msgstr ""
#: includes/class/class.LSlang.php:1261
msgid " => contains all messages"
msgstr ""
#: includes/class/class.LStemplate.php:160 #: includes/class/class.LStemplate.php:160
msgid "LStemplate : compile directory is not writable (dir : %{dir})" msgid "LStemplate : compile directory is not writable (dir : %{dir})"
msgstr "" msgstr ""
@ -2468,20 +2558,100 @@ msgstr ""
msgid "Role" msgid "Role"
msgstr "" msgstr ""
#: includes/class/class.LScli.php:218 #: includes/class/class.LScli.php:104
#, php-format
msgid "" msgid ""
"Invalid parameter \"%{parameter}\".\n" "Usage: %s [-h] [-qdC] command\n"
" -h Show this message\n"
" -q|--quiet Quiet mode: nothing log on console (but keep other "
"logging handler)\n"
" -d|--debug Debug mode (set log level to DEBUG, default: WARNING)\n"
" -v|--verbose Verbose mode (set log level to INFO, default: WARNING)\n"
" --trace Trace mode (set log level to TRACE, default: WARNING)\n"
" -C|--console Log on console with same log level as other handlers "
"(otherwise, log only errors)\n"
" -S|--ldap-server Connect to a specific LDAP server: you could specify a "
"LDAP\n"
" server by its declaration order in configuration "
"(default:\n"
" first one).\n"
" -L|--load-class Load specific class to permit access to its CLI "
"commands\n"
" -A|--load-addons Load specific addon to permit access to its CLI "
"commands\n"
" command Command to run\n"
"\n"
" Available commands:\n"
msgstr ""
#: includes/class/class.LScli.php:136
msgid "Currently no available command is declared."
msgstr ""
#: includes/class/class.LScli.php:197 includes/class/class.LScli.php:468
#, php-format
msgid "Fail to select LDAP server #%s."
msgstr ""
#: includes/class/class.LScli.php:208 includes/class/class.LScli.php:503
#, php-format
msgid "Fail to load class '%s'."
msgstr ""
#: includes/class/class.LScli.php:215 includes/class/class.LScli.php:518
#, php-format
msgid "Fail to load addon '%s'."
msgstr ""
#: includes/class/class.LScli.php:226
#, php-format
msgid ""
"Invalid parameter \"%s\".\n"
"Note: Command's parameter/argument must be place after the command." "Note: Command's parameter/argument must be place after the command."
msgstr "" msgstr ""
#: includes/class/class.LScli.php:843 #: includes/class/class.LScli.php:261 includes/class/class.LScli.php:488
#: includes/class/class.LScli.php:536
#, php-format
msgid "Fail to select sub DN '%s'."
msgstr ""
#: includes/class/class.LScli.php:271
msgid "Fail to select first LDAP server."
msgstr ""
#: includes/class/class.LScli.php:391
msgid "Are you sure?"
msgstr ""
#: includes/class/class.LScli.php:392
#, php-format
msgid ""
"\n"
"%s Type 'yes' to continue: "
msgstr ""
#: includes/class/class.LScli.php:395 templates/default/import.tpl:26
#: templates/default/import.tpl:32
msgid "yes"
msgstr ""
#: includes/class/class.LScli.php:396
msgid "User cancel\n"
msgstr ""
#: includes/class/class.LScli.php:852
msgid "LScli : The CLI command '%{command}' already exists." msgid "LScli : The CLI command '%{command}' already exists."
msgstr "" msgstr ""
#: includes/class/class.LScli.php:846 #: includes/class/class.LScli.php:855
msgid "LScli : The CLI command '%{command}' handler is not callable." msgid "LScli : The CLI command '%{command}' handler is not callable."
msgstr "" msgstr ""
#: includes/class/class.LScli.php:864
msgid "Handle BASH completion"
msgstr ""
#: includes/class/class.LSioFormatCSV.php:294 #: includes/class/class.LSioFormatCSV.php:294
msgid "LSioFormatCSV: function fputcsv is not available." msgid "LSioFormatCSV: function fputcsv is not available."
msgstr "" msgstr ""
@ -3006,7 +3176,3 @@ msgstr ""
#: templates/default/import.tpl:27 templates/default/import.tpl:33 #: templates/default/import.tpl:27 templates/default/import.tpl:33
msgid "no" msgid "no"
msgstr "" msgstr ""
#: templates/default/import.tpl:26 templates/default/import.tpl:32
msgid "yes"
msgstr ""