1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #8085 from sylvestre/l10n-dirname

l10n: port dirname to translation + add french
This commit is contained in:
Daniel Hofstetter 2025-06-07 08:18:10 +02:00 committed by GitHub
commit 9c0eb00d13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 2 deletions

View file

@ -2,3 +2,5 @@ dirname-about = Strip last component from file name
dirname-usage = dirname [OPTION] NAME... dirname-usage = dirname [OPTION] NAME...
dirname-after-help = Output each NAME with its last non-slash component and trailing slashes 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). 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

View file

@ -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

View file

@ -32,7 +32,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
.collect(); .collect();
if dirnames.is_empty() { if dirnames.is_empty() {
return Err(UUsageError::new(1, "missing operand")); return Err(UUsageError::new(1, get_message("dirname-missing-operand")));
} else { } else {
for path in &dirnames { for path in &dirnames {
let p = Path::new(path); let p = Path::new(path);
@ -70,7 +70,7 @@ pub fn uu_app() -> Command {
Arg::new(options::ZERO) Arg::new(options::ZERO)
.long(options::ZERO) .long(options::ZERO)
.short('z') .short('z')
.help("separate output with NUL rather than newline") .help(get_message("dirname-zero-help"))
.action(ArgAction::SetTrue), .action(ArgAction::SetTrue),
) )
.arg( .arg(