Skip to content

Commit 9c0eb00

Browse files
authored
Merge pull request #8085 from sylvestre/l10n-dirname
l10n: port dirname to translation + add french
2 parents 212789f + 15a6f92 commit 9c0eb00

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/uu/dirname/locales/en-US.ftl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ dirname-about = Strip last component from file name
22
dirname-usage = dirname [OPTION] NAME...
33
dirname-after-help = Output each NAME with its last non-slash component and trailing slashes
44
removed; if NAME contains no /'s, output '.' (meaning the current directory).
5+
dirname-missing-operand = missing operand
6+
dirname-zero-help = separate output with NUL rather than newline

src/uu/dirname/locales/fr-FR.ftl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dirname-about = Supprimer le dernier composant du nom de fichier
2+
dirname-usage = dirname [OPTION] NOM...
3+
dirname-after-help = Afficher chaque NOM avec son dernier composant non-slash et les slashes finaux
4+
supprimés ; si NOM ne contient pas de '/', afficher '.' (signifiant le répertoire courant).
5+
dirname-missing-operand = opérande manquant
6+
dirname-zero-help = séparer la sortie avec NUL plutôt qu'avec un saut de ligne
7+

src/uu/dirname/src/dirname.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
3232
.collect();
3333

3434
if dirnames.is_empty() {
35-
return Err(UUsageError::new(1, "missing operand"));
35+
return Err(UUsageError::new(1, get_message("dirname-missing-operand")));
3636
} else {
3737
for path in &dirnames {
3838
let p = Path::new(path);
@@ -70,7 +70,7 @@ pub fn uu_app() -> Command {
7070
Arg::new(options::ZERO)
7171
.long(options::ZERO)
7272
.short('z')
73-
.help("separate output with NUL rather than newline")
73+
.help(get_message("dirname-zero-help"))
7474
.action(ArgAction::SetTrue),
7575
)
7676
.arg(

0 commit comments

Comments
 (0)