8000 l10n: port fmt for translation + use thiserror + add french · uutils/coreutils@ebc4fbc · GitHub
[go: up one dir, main page]

Skip to content

Commit ebc4fbc

Browse files
committed
l10n: port fmt for translation + use thiserror + add french
1 parent 1675c3e commit ebc4fbc

File tree

5 files changed

+143
-94
lines changed

5 files changed

+143
-94
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/uu/fmt/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ path = "src/fmt.rs"
2121
clap = { workspace = true }
2222
unicode-width = { workspace = true }
2323
uucore = { workspace = true }
24+
thiserror = { workspace = true }
2425

2526
[[bin]]
2627
name = "fmt"

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

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
fmt-about = Reformat paragraphs from input files (or stdin) to stdout.
2-
fmt-usage = fmt [-WIDTH] [OPTION]... [FILE]...
1+
fmt-about = Reformat paragraphs from input (or standard input) to stdout.
2+
fmt-usage = [OPTION]... [FILE]...
3+
4+
# Help messages
5+
fmt-crown-margin-help = First and second line of paragraph may have different indentations, in which case the first line's indentation is preserved, and each subsequent line's indentation matches the second line.
6+
fmt-tagged-paragraph-help = Like -c, except that the first and second line of a paragraph *must* have different indentation or they are treated as separate paragraphs.
7+
fmt-preserve-headers-help = Attempt to detect and preserve mail headers in the input. Be careful when combining this flag with -p.
8+
fmt-split-only-help = Split lines only, do not reflow.
9+
fmt-uniform-spacing-help = Insert exactly one space between words, and two between sentences. Sentence breaks in the input are detected as [?!.] followed by two spaces or a newline; other punctuation is not interpreted as a sentence break.
10+
fmt-prefix-help = Reformat only lines beginning with PREFIX, reattaching PREFIX to reformatted lines. Unless -x is specified, leading whitespace will be ignored when matching PREFIX.
11+
fmt-skip-prefix-help = Do not reformat lines beginning with PSKIP. Unless -X is specified, leading whitespace will be ignored when matching PSKIP
12+
fmt-exact-prefix-help = PREFIX must match at the beginning of the line with no preceding whitespace.
13+
fmt-exact-skip-prefix-help = PSKIP must match at the beginning of the line with no preceding whitespace.
14+
fmt-width-help = Fill output lines up to a maximum of WIDTH columns, default 75. This can be specified as a negative number in the first argument.
15+
fmt-goal-help = Goal width, default of 93% of WIDTH. Must be less than or equal to WIDTH.
16+
fmt-quick-help = Break lines more quickly at the expense of a potentially more ragged appearance.
17+
fmt-tab-width-help = Treat tabs as TABWIDTH spaces for determining line length, default 8. Note that this is used only for calculating line lengths; tabs are preserved in the output.
18+
19+
# Error messages
20+
fmt-error-invalid-goal = invalid goal: {$goal}
21+
fmt-error-goal-greater-than-width = GOAL cannot be greater than WIDTH.
22+
fmt-error-invalid-width = invalid width: {$width}
23+
fmt-error-width-out-of-range = invalid width: '{$width}': Numerical result out of range
24+
fmt-error-invalid-tabwidth = Invalid TABWIDTH specification: {$tabwidth}
25+
fmt-error-first-option-width = invalid option -- {$option}; -WIDTH is recognized only when it is the first
26+
option; use -w N instead
27+
Try 'fmt --help' for more information.
28+
fmt-error-read = read error
29+
fmt-error-invalid-width-malformed = invalid width: {$width}
30+
fmt-error-cannot-open-for-reading = cannot open {$file} for reading
31+
fmt-error-cannot-get-metadata = cannot get metadata for {$file}
32+
fmt-error-failed-to-write-output = failed to write output

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
fmt-about = Reformate les paragraphes depuis l'entrée (ou l'entrée standard) vers la sortie standard.
2+
fmt-usage = [OPTION]... [FICHIER]...
3+
4+
# Messages d'aide
5+
fmt-crown-margin-help = La première et la deuxième ligne d'un paragraphe peuvent avoir des indentations différentes, auquel cas l'indentation de la première ligne est préservée, et chaque ligne suivante correspond à l'indentation de la deuxième ligne.
6+
fmt-tagged-paragraph-help = Comme -c, sauf que la première et la deuxième ligne d'un paragraphe *doivent* avoir des indentations différentes ou elles sont traitées comme des paragraphes séparés.
7+
fmt-preserve-headers-help = Tente de détecter et préserver les en-têtes de courrier dans l'entrée. Attention en combinant ce drapeau avec -p.
8+
fmt-split-only-help = Divise les lignes seulement, ne les reformate pas.
9+
fmt-uniform-spacing-help = Insère exactement un espace entre les mots, et deux entre les phrases. Les fins de phrase dans l'entrée sont détectées comme [?!.] suivies de deux espaces ou d'une nouvelle ligne ; les autres ponctuations ne sont pas interprétées comme des fins de phrase.
10+
fmt-prefix-help = Reformate seulement les lignes commençant par PRÉFIXE, en rattachant PRÉFIXE aux lignes reformatées. À moins que -x soit spécifié, les espaces de début seront ignorés lors de la correspondance avec PRÉFIXE.
11+
fmt-skip-prefix-help = Ne reformate pas les lignes commençant par PSKIP. À moins que -X soit spécifié, les espaces de début seront ignorés lors de la correspondance avec PSKIP
12+
fmt-exact-prefix-help = PRÉFIXE doit correspondre au début de la ligne sans espace précédent.
13+
fmt-exact-skip-prefix-help = PSKIP doit correspondre au début de la ligne sans espace précédent.
14+
fmt-width-help = Remplit les lignes de sortie jusqu'à un maximum de WIDTH colonnes, par défaut 75. Cela peut être spécifié comme un nombre négatif dans le premier argument.
15+
fmt-goal-help = Largeur objectif, par défaut 93% de WIDTH. Doit être inférieur ou égal à WIDTH.
16+
fmt-quick-help = Divise les lignes plus rapidement au détriment d'un aspect potentiellement plus irrégulier.
17+
fmt-tab-width-help = Traite les tabulations comme TABWIDTH espaces pour déterminer la longueur de ligne, par défaut 8. Notez que ceci n'est utilisé que pour calculer les longueurs de ligne ; les tabulations sont préservées dans la sortie.
18+
19+
# Messages d'erreur
20+
fmt-error-invalid-goal = objectif invalide : {$goal}
21+
fmt-error-goal-greater-than-width = GOAL ne peut pas être supérieur à WIDTH.
22+
fmt-error-invalid-width = largeur invalide : {$width}
23+
fmt-error-width-out-of-range = largeur invalide : '{$width}' : Résultat numérique hors limites
24+
fmt-error-invalid-tabwidth = Spécification TABWIDTH invalide : {$tabwidth}
25+
fmt-error-first-option-width = option invalide -- {$option} ; -WIDTH n'est reconnu que lorsqu'il est la première
26+
option ; utilisez -w N à la place
27+
Essayez 'fmt --help' pour plus d'informations.
28+
fmt-error-read = erreur de lecture
29+
fmt-error-invalid-width-malformed = largeur invalide : {$width}
30+
fmt-error-cannot-open-for-reading = impossible d'ouvrir {$file} en lecture
31+
fmt-error-cannot-get-metadata = impossible d'obtenir les métadonnées pour {$file}
32+
fmt-error-failed-to-write-output = échec de l'écriture de sortie

0 commit comments

Comments
 (0)
0