1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

l10n: port echo for translation + add french

This commit is contained in:
Sylvestre Ledru 2025-06-22 18:35:21 +02:00
parent 60bf6cbc91
commit c96f414681
3 changed files with 34 additions and 7 deletions

View file

@ -16,3 +16,9 @@ echo-after-help = Echo the STRING(s) to standard output.
- \v vertical tab
- \0NNN byte with octal value NNN (1 to 3 digits)
- \xHH byte with hexadecimal value HH (1 to 2 digits)
echo-help-no-newline = do not output the trailing newline
echo-help-enable-escapes = enable interpretation of backslash escapes
echo-help-disable-escapes = disable interpretation of backslash escapes (default)
echo-error-non-utf8 = Non-UTF-8 arguments provided, but this platform does not support them

View file

@ -0,0 +1,24 @@
echo-about = Affiche une ligne de texte
echo-usage = echo [OPTIONS]... [CHAÎNE]...
echo-after-help = Affiche la ou les CHAÎNE(s) sur la sortie standard.
Si -e est activé, les séquences suivantes sont reconnues :
- \ barre oblique inverse
- \a alerte (BEL)
- \b retour arrière
- \c ne produit aucune sortie supplémentaire
- \e échappement
- \f saut de page
- \n nouvelle ligne
- \r retour chariot
- \t tabulation horizontale
- \v tabulation verticale
- \0NNN octet avec valeur octale NNN (1 à 3 chiffres)
- \xHH octet avec valeur hexadécimale HH (1 à 2 chiffres)
echo-help-no-newline = ne pas afficher la nouvelle ligne finale
echo-help-enable-escapes = activer l'interprétation des séquences d'échappement
echo-help-disable-escapes = désactiver l'interprétation des séquences d'échappement (par défaut)
echo-error-non-utf8 = Arguments non-UTF-8 fournis, mais cette plateforme ne les prend pas en charge

View file

@ -145,20 +145,20 @@ pub fn uu_app() -> Command {
.arg(
Arg::new(options::NO_NEWLINE)
.short('n')
.help("do not output the trailing newline")
.help(get_message("echo-help-no-newline"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::ENABLE_BACKSLASH_ESCAPE)
.short('e')
.help("enable interpretation of backslash escapes")
.help(get_message("echo-help-enable-escapes"))
.action(ArgAction::SetTrue)
.overrides_with(options::DISABLE_BACKSLASH_ESCAPE),
)
.arg(
Arg::new(options::DISABLE_BACKSLASH_ESCAPE)
.short('E')
.help("disable interpretation of backslash escapes (default)")
.help(get_message("echo-help-disable-escapes"))
.action(ArgAction::SetTrue)
.overrides_with(options::ENABLE_BACKSLASH_ESCAPE),
)
@ -177,10 +177,7 @@ fn execute(
) -> UResult<()> {
for (i, input) in arguments_after_options.into_iter().enumerate() {
let Some(bytes) = bytes_from_os_string(input.as_os_str()) else {
return Err(USimpleError::new(
1,
"Non-UTF-8 arguments provided, but this platform does not support them",
));
return Err(USimpleError::new(1, get_message("echo-error-non-utf8")));
};
if i > 0 {