diff options
| author | Eric Huss <eric@huss.org> | 2023-06-28 16:23:18 -0700 |
|---|---|---|
| committer | Tshepang Mbambo <tshepang@gmail.com> | 2023-06-29 06:43:19 +0200 |
| commit | fbd8796d3bb552b39e5f5434c8df9529a28d1ac7 (patch) | |
| tree | a3c611fa2e9d091d55deabe5eb0bf81008129277 /src/doc/rustc-dev-guide | |
| parent | 215ad4cb900ae8957cb87127ab84e06cc001d349 (diff) | |
| download | rust-fbd8796d3bb552b39e5f5434c8df9529a28d1ac7.tar.gz rust-fbd8796d3bb552b39e5f5434c8df9529a28d1ac7.zip | |
Reword `messages.ftl` example.
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/diagnostics/translation.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics/translation.md b/src/doc/rustc-dev-guide/src/diagnostics/translation.md index c4affb9f583..a42a15484d6 100644 --- a/src/doc/rustc-dev-guide/src/diagnostics/translation.md +++ b/src/doc/rustc-dev-guide/src/diagnostics/translation.md @@ -86,10 +86,10 @@ excellent examples of translating messages into different locales and the information that needs to be provided by the code to do so. ### Compile-time validation and typed identifiers -rustc's Fluent resources for the default locale (`en-US`) are in the -[`compiler/rustc_error_messages/messages.ftl`] file. Currently, each crate -which defines translatable diagnostics has its own Fluent resource in -a file named `messages.ftl`. +Currently, each crate which defines translatable diagnostics has its own +Fluent resource in a file named `messages.ftl`, such as +[`compiler/rustc_borrowck/messages.ftl`] and +[`compiler/rustc_parse/messages.ftl`]. rustc's `fluent_messages` macro performs compile-time validation of Fluent resources and generates code to make it easier to refer to Fluent messages in @@ -240,5 +240,6 @@ won't fail. Bundle loading can fail if a requested locale is missing, Fluent files are malformed, or a message is duplicated in multiple resources. [Fluent]: https://projectfluent.org -[`compiler/rustc_error_messages/messages.ftl`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_error_messages/messages.ftl +[`compiler/rustc_borrowck/messages.ftl`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_borrowck/messages.ftl +[`compiler/rustc_parse/messages.ftl`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_parse/messages.ftl [`rustc_error_messages::DiagnosticMessage`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_error_messages/enum.DiagnosticMessage.html |
