Debian Codegraph @

l10n/README.md

raw
1 # uutils Coreutils — translation repository
2
3 This repository stores the [Fluent](https://projectfluent.org/) (`.ftl`) files used
4 to translate the Rust implementation of the GNU Coreutils.
5
6 English reference files come from the main repository:
7 https://github.com/uutils/coreutils
8
9 ## How to contribute
10
11 Translations can be contributed two ways:
12
13 - **Via [Weblate](https://hosted.weblate.org/projects/rust-coreutils/)** (recommended) —
14 the web UI handles syntax and syncs back here automatically.
15 - **Directly via pull requests** editing the `.ftl` files.
16
17 ## Layout
18
19 - `src/uu/<utility>/locales/<locale>.ftl` — per-utility translations (~100 utilities).
20 - `src/uucore/locales/<locale>.ftl` — shared strings used across utilities.
21
22 `en-US.ftl` is the source/reference locale in every `locales/` directory; every other
23 file (including `fr-FR.ftl`) is a translation of it.
24
25 > **Note:** `base32`, `base64`, and `basenc` share one set of translations —
26 > `base64/locales` and `basenc/locales` are symlinks to `base32/locales`.
27
28 ## Editing translations
29
30 Each `.ftl` file is monolingual: a complete set of `key = value` message definitions.
31
32 - Change only the right-hand side (the value). Keep the keys identical to `en-US.ftl` —
33 missing keys fall back to English, extra keys are dead.
34 - Copy placeables such as `{$file}` or `{$count}` **verbatim**; never translate the
35 variable name inside `{...}`.
36 - Every file must end with a trailing newline.
37
38 Don't edit `en-US.ftl` here: it is overwritten daily from upstream uutils/coreutils.
39 Change the English source strings there instead. French (`fr-FR.ftl`) is translated
40 here like any other locale — via Weblate or pull requests.
41
42 ## Validating before a pull request
43
44 ```sh
45 pip install pre-commit moz-fluent-linter
46
47 pre-commit run --all-files
48 moz-fluent-lint --config .github/fluent_linter_config.yml src/uu/
49 ```
50
51 CI runs the same two checks on every push and pull request.