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
2 changes: 2 additions & 0 deletions src/uu/dirname/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ dirname-about = Strip last component from file name
dirname-usage = dirname [OPTION] NAME...
dirname-after-help = Output each NAME with its last non-slash component and trailing slashes
removed; if NAME contains no /'s, output '.' (meaning the current directory).
dirname-missing-operand = missing operand
dirname-zero-help = separate output with NUL rather than newline
7 changes: 7 additions & 0 deletions src/uu/dirname/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dirname-about = Supprimer le dernier composant du nom de fichier
dirname-usage = dirname [OPTION] NOM...
dirname-after-help = Afficher chaque NOM avec son dernier composant non-slash et les slashes finaux
supprimés ; si NOM ne contient pas de '/', afficher '.' (signifiant le répertoire courant).
dirname-missing-operand = opérande manquant
dirname-zero-help = séparer la sortie avec NUL plutôt qu'avec un saut de ligne

4 changes: 2 additions & 2 deletions src/uu/dirname/src/dirname.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
.collect();

if dirnames.is_empty() {
return Err(UUsageError::new(1, "missing operand"));
return Err(UUsageError::new(1, get_message("dirname-missing-operand")));

Check warning on line 35 in src/uu/dirname/src/dirname.rs

View check run for this annotation

Codecov / codecov/patch

src/uu/dirname/src/dirname.rs#L35

Added line #L35 was not covered by tests
} else {
for path in &dirnames {
let p = Path::new(path);
Expand Down Expand Up @@ -70,7 +70,7 @@
Arg::new(options::ZERO)
.long(options::ZERO)
.short('z')
.help("separate output with NUL rather than newline")
.help(get_message("dirname-zero-help"))
.action(ArgAction::SetTrue),
)
.arg(
Expand Down
Loading