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
18 changes: 18 additions & 0 deletions src/uu/cat/locales/en-US.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
cat-about = Concatenate FILE(s), or standard input, to standard output
With no FILE, or when FILE is -, read standard input.
cat-usage = cat [OPTION]... [FILE]...

# Help messages
cat-help-show-all = equivalent to -vET
cat-help-number-nonblank = number nonempty output lines, overrides -n
cat-help-show-nonprinting-ends = equivalent to -vE
cat-help-show-ends = display $ at end of each line
cat-help-number = number all output lines
cat-help-squeeze-blank = suppress repeated empty output lines
cat-help-show-nonprinting-tabs = equivalent to -vT
cat-help-show-tabs = display TAB characters at ^I
cat-help-show-nonprinting = use ^ and M- notation, except for LF (\n) and TAB (\t)
cat-help-ignored-u = (ignored)

# Error messages
cat-error-unknown-filetype = unknown filetype: { $ft_debug }
cat-error-is-directory = Is a directory
cat-error-input-file-is-output-file = input file is output file
cat-error-too-many-symbolic-links = Too many levels of symbolic links
21 changes: 21 additions & 0 deletions src/uu/cat/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cat-about = Concaténer les FICHIER(s), ou l'entrée standard, vers la sortie standard
Si aucun FICHIER, ou quand FICHIER est -, lire l'entrée standard.
cat-usage = cat [OPTION]... [FICHIER]...

# Messages d'aide
cat-help-show-all = équivalent à -vET
cat-help-number-nonblank = numéroter les lignes de sortie non vides, remplace -n
cat-help-show-nonprinting-ends = équivalent à -vE
cat-help-show-ends = afficher $ à la fin de chaque ligne
cat-help-number = numéroter toutes les lignes de sortie
cat-help-squeeze-blank = supprimer les lignes vides répétées en sortie
cat-help-show-nonprinting-tabs = équivalent à -vT
cat-help-show-tabs = afficher les caractères TAB comme ^I
cat-help-show-nonprinting = utiliser la notation ^ et M-, sauf pour LF (\n) et TAB (\t)
cat-help-ignored-u = (ignoré)

# Messages d'erreur
cat-error-unknown-filetype = type de fichier inconnu : { $ft_debug }
cat-error-is-directory = Est un répertoire
cat-error-input-file-is-output-file = le fichier d'entrée est le fichier de sortie
cat-error-too-many-symbolic-links = Trop de niveaux de liens symboliques
28 changes: 14 additions & 14 deletions src/uu/cat/src/cat.rs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You overlooked the error strings of the CatError enum.

Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ enum CatError {
#[error("{0}")]
Nix(#[from] nix::Error),
/// Unknown file type; it's not a regular file, socket, etc.
#[error("unknown filetype: {ft_debug}")]
#[error("{}", translate!("cat-error-unknown-filetype", "ft_debug" => .ft_debug))]
UnknownFiletype {
/// A debug print of the file type
ft_debug: String,
},
#[error("Is a directory")]
#[error("{}", translate!("cat-error-is-directory"))]
IsDirectory,
#[error("input file is output file")]
#[error("{}", translate!("cat-error-input-file-is-output-file"))]
OutputIsInput,
#[error("Too many levels of symbolic links")]
#[error("{}", translate!("cat-error-too-many-symbolic-links"))]
TooManySymlinks,
}

Expand Down Expand Up @@ -302,69 +302,69 @@ pub fn uu_app() -> Command {
Arg::new(options::SHOW_ALL)
.short('A')
.long(options::SHOW_ALL)
.help("equivalent to -vET")
.help(translate!("cat-help-show-all"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::NUMBER_NONBLANK)
.short('b')
.long(options::NUMBER_NONBLANK)
.help("number nonempty output lines, overrides -n")
.help(translate!("cat-help-number-nonblank"))
// Note: This MUST NOT .overrides_with(options::NUMBER)!
// In clap, overriding is symmetric, so "-b -n" counts as "-n", which is not what we want.
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::SHOW_NONPRINTING_ENDS)
.short('e')
.help("equivalent to -vE")
.help(translate!("cat-help-show-nonprinting-ends"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::SHOW_ENDS)
.short('E')
.long(options::SHOW_ENDS)
.help("display $ at end of each line")
.help(translate!("cat-help-show-ends"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::NUMBER)
.short('n')
.long(options::NUMBER)
.help("number all output lines")
.help(translate!("cat-help-number"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::SQUEEZE_BLANK)
.short('s')
.long(options::SQUEEZE_BLANK)
.help("suppress repeated empty output lines")
.help(translate!("cat-help-squeeze-blank"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::SHOW_NONPRINTING_TABS)
.short('t')
.help("equivalent to -vT")
.help(translate!("cat-help-show-nonprinting-tabs"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::SHOW_TABS)
.short('T')
.long(options::SHOW_TABS)
.help("display TAB characters at ^I")
.help(translate!("cat-help-show-tabs"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::SHOW_NONPRINTING)
.short('v')
.long(options::SHOW_NONPRINTING)
.help("use ^ and M- notation, except for LF (\\n) and TAB (\\t)")
.help(translate!("cat-help-show-nonprinting"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(options::IGNORED_U)
.short('u')
.help("(ignored)")
.help(translate!("cat-help-ignored-u"))
.action(ArgAction::SetTrue),
)
}
Expand Down
Loading