Skip to content

Commit

Permalink
Reword messages.ftl example.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss authored and tshepang committed Jun 29, 2023
1 parent dda77e0 commit 2cbc4c1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/diagnostics/translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 2cbc4c1

Please sign in to comment.