Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/uu/echo/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 24 additions & 0 deletions src/uu/echo/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
@@ -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
11 changes: 4 additions & 7 deletions src/uu/echo/src/echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,20 @@
.arg(
Arg::new(options::NO_NEWLINE)
.short('n')
.help("do not output the trailing newline")
.help(get_message("echo-help-no-newline"))

Check warning on line 148 in src/uu/echo/src/echo.rs

View check run for this annotation

Codecov / codecov/patch

src/uu/echo/src/echo.rs#L148

Added line #L148 was not covered by tests
.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"))

Check warning on line 154 in src/uu/echo/src/echo.rs

View check run for this annotation

Codecov / codecov/patch

src/uu/echo/src/echo.rs#L154

Added line #L154 was not covered by tests
.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"))

Check warning on line 161 in src/uu/echo/src/echo.rs

View check run for this annotation

Codecov / codecov/patch

src/uu/echo/src/echo.rs#L161

Added line #L161 was not covered by tests
.action(ArgAction::SetTrue)
.overrides_with(options::ENABLE_BACKSLASH_ESCAPE),
)
Expand All @@ -177,10 +177,7 @@
) -> 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")));

Check warning on line 180 in src/uu/echo/src/echo.rs

View check run for this annotation

Codecov / codecov/patch

src/uu/echo/src/echo.rs#L180

Added line #L180 was not covered by tests
};

if i > 0 {
Expand Down
Loading