about summary refs log tree commit diff
path: root/compiler/rustc_errors/messages.ftl
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-27 09:20:40 +0000
committerbors <bors@rust-lang.org>2023-07-27 09:20:40 +0000
commitf239bb6bea94d16d902c36d72b5cabdddefb3cab (patch)
treee2e2a65f5bdc56d5a83a25091384a408e4e16853 /compiler/rustc_errors/messages.ftl
parent2efa46dc159b2b4717eff487e2b653c263476aa9 (diff)
parent05c856a760ba058ccd45c899c9257f6f7d6f769f (diff)
downloadrust-f239bb6bea94d16d902c36d72b5cabdddefb3cab.tar.gz
rust-f239bb6bea94d16d902c36d72b5cabdddefb3cab.zip
Auto merge of #113281 - dayo05:master, r=davidtwco
Implement diagnostic translation for rustc-errors

This is my first PR to rustc yeah~

I'm going to implement diagnostic translation on rustc-errors crate.

This PR is WIP, the reason of opening this as draft, I want to show my code to prevent the issue caused by misunderstanding and also I have few questions.

Some error messages are processed by `pluralize!` macro which determines to use plural word or not. From now, I make two kinds of keys and combine with enum but I'm not sure is this best method to do it.

Is there any prefered method to do this? => This resolved on conversation on PR.

I'll remain to perform force-push until my first implementation looks good to me
Diffstat (limited to 'compiler/rustc_errors/messages.ftl')
-rw-r--r--compiler/rustc_errors/messages.ftl22
1 files changed, 22 insertions, 0 deletions
diff --git a/compiler/rustc_errors/messages.ftl b/compiler/rustc_errors/messages.ftl
index 8e8223c3cf8..d68dba0be5e 100644
--- a/compiler/rustc_errors/messages.ftl
+++ b/compiler/rustc_errors/messages.ftl
@@ -1,3 +1,25 @@
+errors_delayed_at_with_newline =
+    delayed at {$emitted_at}
+    {$note}
+
+errors_delayed_at_without_newline =
+    delayed at {$emitted_at} - {$note}
+
+errors_expected_lifetime_parameter =
+    expected lifetime {$count ->
+        [1] parameter
+        *[other] parameters
+    }
+
+errors_indicate_anonymous_lifetime =
+    indicate the anonymous {$count ->
+        [1] lifetime
+        *[other] lifetimes
+    }
+
+errors_invalid_flushed_delayed_diagnostic_level =
+    `flushed_delayed` got diagnostic with level {$level}, instead of the expected `DelayedBug`
+
 errors_target_inconsistent_architecture =
     inconsistent target specification: "data-layout" claims architecture is {$dl}-endian, while "target-endian" is `{$target}`