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

Merge pull request #8146 from sylvestre/l10n-realpath

l10n: port realpath for translation + add french
This commit is contained in:
Daniel Hofstetter 2025-06-11 10:13:06 +02:00 committed by GitHub
commit b2968a9025
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 15 deletions

View file

@ -1,2 +1,13 @@
realpath-about = Print the resolved path
realpath-usage = realpath [OPTION]... FILE...
# Help messages
realpath-help-quiet = Do not print warnings for invalid paths
realpath-help-strip = Only strip '.' and '..' components, but don't resolve symbolic links
realpath-help-zero = Separate output filenames with \0 rather than newline
realpath-help-logical = resolve '..' components before symlinks
realpath-help-physical = resolve symlinks as encountered (default)
realpath-help-canonicalize-existing = canonicalize by following every symlink in every component of the given name recursively, all components must exist
realpath-help-canonicalize-missing = canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence
realpath-help-relative-to = print the resolved path relative to DIR
realpath-help-relative-base = print absolute paths unless paths below DIR

View file

@ -0,0 +1,13 @@
realpath-about = Afficher le chemin résolu
realpath-usage = realpath [OPTION]... FICHIER...
# Messages d'aide
realpath-help-quiet = Ne pas afficher d'avertissements pour les chemins invalides
realpath-help-strip = Supprimer uniquement les composants '.' et '..', mais ne pas résoudre les liens symboliques
realpath-help-zero = Séparer les noms de fichiers de sortie avec \0 plutôt qu'avec un saut de ligne
realpath-help-logical = résoudre les composants '..' avant les liens symboliques
realpath-help-physical = résoudre les liens symboliques rencontrés (par défaut)
realpath-help-canonicalize-existing = canonicaliser en suivant récursivement chaque lien symbolique dans chaque composant du nom donné, tous les composants doivent exister
realpath-help-canonicalize-missing = canonicaliser en suivant récursivement chaque lien symbolique dans chaque composant du nom donné, sans exigences sur l'existence des composants
realpath-help-relative-to = afficher le chemin résolu relativement à RÉP
realpath-help-relative-base = afficher les chemins absolus sauf pour les chemins sous RÉP

View file

@ -93,7 +93,7 @@ pub fn uu_app() -> Command {
Arg::new(OPT_QUIET)
.short('q')
.long(OPT_QUIET)
.help("Do not print warnings for invalid paths")
.help(get_message("realpath-help-quiet"))
.action(ArgAction::SetTrue),
)
.arg(
@ -101,21 +101,21 @@ pub fn uu_app() -> Command {
.short('s')
.long(OPT_STRIP)
.visible_alias("no-symlinks")
.help("Only strip '.' and '..' components, but don't resolve symbolic links")
.help(get_message("realpath-help-strip"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_ZERO)
.short('z')
.long(OPT_ZERO)
.help("Separate output filenames with \\0 rather than newline")
.help(get_message("realpath-help-zero"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_LOGICAL)
.short('L')
.long(OPT_LOGICAL)
.help("resolve '..' components before symlinks")
.help(get_message("realpath-help-logical"))
.action(ArgAction::SetTrue),
)
.arg(
@ -123,27 +123,21 @@ pub fn uu_app() -> Command {
.short('P')
.long(OPT_PHYSICAL)
.overrides_with_all([OPT_STRIP, OPT_LOGICAL])
.help("resolve symlinks as encountered (default)")
.help(get_message("realpath-help-physical"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_CANONICALIZE_EXISTING)
.short('e')
.long(OPT_CANONICALIZE_EXISTING)
.help(
"canonicalize by following every symlink in every component of the \
given name recursively, all components must exist",
)
.help(get_message("realpath-help-canonicalize-existing"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_CANONICALIZE_MISSING)
.short('m')
.long(OPT_CANONICALIZE_MISSING)
.help(
"canonicalize by following every symlink in every component of the \
given name recursively, without requirements on components existence",
)
.help(get_message("realpath-help-canonicalize-missing"))
.action(ArgAction::SetTrue),
)
.arg(
@ -151,14 +145,14 @@ pub fn uu_app() -> Command {
.long(OPT_RELATIVE_TO)
.value_name("DIR")
.value_parser(NonEmptyStringValueParser::new())
.help("print the resolved path relative to DIR"),
.help(get_message("realpath-help-relative-to")),
)
.arg(
Arg::new(OPT_RELATIVE_BASE)
.long(OPT_RELATIVE_BASE)
.value_name("DIR")
.value_parser(NonEmptyStringValueParser::new())
.help("print absolute paths unless paths below DIR"),
.help(get_message("realpath-help-relative-base")),
)
.arg(
Arg::new(ARG_FILES)