Skip to content

Commit 37905eb

Browse files
Update translation documentation
1 parent 3a652af commit 37905eb

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

src/diagnostics/translation.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ active redesign proposals (as of
1313
Please see the tracking issue <https://github.com/rust-lang/rust/issues/132181>
1414
for status updates.
1515

16-
We have downgraded the internal lints `untranslatable_diagnostic` and
17-
`diagnostic_outside_of_impl`. Those internal lints previously required new code
18-
to use the current translation infrastructure. However, because the translation
19-
infra is waiting for a yet-to-be-proposed redesign and thus rework, we are not
16+
The translation infra is waiting for a yet-to-be-proposed redesign and thus rework, we are not
2017
mandating usage of current translation infra. Use the infra if you *want to* or
2118
otherwise makes the code cleaner, but otherwise sidestep the translation infra
2219
if you need more flexibility.
@@ -40,11 +37,6 @@ There are two ways of writing translatable diagnostics:
4037
When adding or changing a translatable diagnostic,
4138
you don't need to worry about the translations.
4239
Only updating the original English message is required.
43-
Currently,
44-
each crate which defines translatable diagnostics has its own Fluent resource,
45-
which is a file named `messages.ftl`,
46-
located in the root of the crate
47-
(such as`compiler/rustc_expand/messages.ftl`).
4840

4941
## Fluent
5042

@@ -118,11 +110,8 @@ information that needs to be provided by the code to do so.
118110

119111
### Compile-time validation and typed identifiers
120112

121-
rustc's `fluent_messages` macro performs compile-time validation of Fluent
122-
resources and generates code to make it easier to refer to Fluent messages in
123-
diagnostics.
124-
125-
Compile-time validation of Fluent resources will emit any parsing errors
113+
rustc's `#[derive(Diagnostic)]` macro performs compile-time validation of Fluent
114+
messages. Compile-time validation of Fluent resources will emit any parsing errors
126115
from Fluent resources while building the compiler, preventing invalid Fluent
127116
resources from causing panics in the compiler. Compile-time validation also
128117
emits an error if multiple Fluent messages have the same identifier.

0 commit comments

Comments
 (0)