diff --git a/src/uu/echo/locales/en-US.ftl b/src/uu/echo/locales/en-US.ftl index 05bf06cd2..04a442620 100644 --- a/src/uu/echo/locales/en-US.ftl +++ b/src/uu/echo/locales/en-US.ftl @@ -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 diff --git a/src/uu/echo/locales/fr-FR.ftl b/src/uu/echo/locales/fr-FR.ftl new file mode 100644 index 000000000..457017faf --- /dev/null +++ b/src/uu/echo/locales/fr-FR.ftl @@ -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 diff --git a/src/uu/echo/src/echo.rs b/src/uu/echo/src/echo.rs index d1306dd3e..e0c542366 100644 --- a/src/uu/echo/src/echo.rs +++ b/src/uu/echo/src/echo.rs @@ -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 {