-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Replace - with _ in fluent slugs to improve developer workflows #100377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+443
−384
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
borrowck-move-unsized = | ||
borrowck_move_unsized = | ||
cannot move a value of type `{$ty}` | ||
.label = the size of `{$ty}` cannot be statically determined | ||
borrowck-higher-ranked-lifetime-error = | ||
borrowck_higher_ranked_lifetime_error = | ||
higher-ranked lifetime error | ||
borrowck-could-not-prove = | ||
borrowck_could_not_prove = | ||
could not prove `{$predicate}` | ||
borrowck-could-not-normalize = | ||
borrowck_could_not_normalize = | ||
could not normalize `{$value}` | ||
borrowck-higher-ranked-subtype-error = | ||
borrowck_higher_ranked_subtype_error = | ||
higher-ranked subtype error | ||
generic-does-not-live-long-enough = | ||
generic_does_not_live_long_enough = | ||
`{$kind}` does not live long enough |
4 changes: 2 additions & 2 deletions
4
compiler/rustc_error_messages/locales/en-US/builtin_macros.ftl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
builtin-macros-requires-cfg-pattern = | ||
builtin_macros_requires_cfg_pattern = | ||
macro requires a cfg-pattern as an argument | ||
.label = cfg-pattern required | ||
builtin-macros-expected-one-cfg-pattern = expected 1 cfg-pattern | ||
builtin_macros_expected_one_cfg_pattern = expected 1 cfg-pattern |
26 changes: 13 additions & 13 deletions
26
compiler/rustc_error_messages/locales/en-US/const_eval.ftl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
const-eval-unstable-in-stable = | ||
const_eval_unstable_in_stable = | ||
const-stable function cannot use `#[feature({$gate})]` | ||
.unstable-sugg = if it is not part of the public API, make this function unstably const | ||
.bypass-sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks | ||
.unstable_sugg = if it is not part of the public API, make this function unstably const | ||
.bypass_sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks | ||
const-eval-thread-local-access = | ||
const_eval_thread_local_access = | ||
thread-local statics cannot be accessed at compile-time | ||
const-eval-static-access = | ||
const_eval_static_access = | ||
{$kind}s cannot refer to statics | ||
.help = consider extracting the value of the `static` to a `const`, and referring to that | ||
.teach-note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable. | ||
.teach-help = To fix this, the value can be extracted to a `const` and then used. | ||
.teach_note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable. | ||
.teach_help = To fix this, the value can be extracted to a `const` and then used. | ||
const-eval-raw-ptr-to-int = | ||
const_eval_raw_ptr_to_int = | ||
pointers cannot be cast to integers during const eval | ||
.note = at compile-time, pointers do not have an integer value | ||
.note2 = avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior | ||
const-eval-raw-ptr-comparison = | ||
const_eval_raw_ptr_comparison = | ||
pointers cannot be reliably compared during const eval | ||
.note = see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information | ||
const-eval-panic-non-str = argument to `panic!()` in a const context must have type `&str` | ||
const_eval_panic_non_str = argument to `panic!()` in a const context must have type `&str` | ||
const-eval-mut-deref = | ||
const_eval_mut_deref = | ||
mutation through a reference is not allowed in {$kind}s | ||
const-eval-transient-mut-borrow = mutable references are not allowed in {$kind}s | ||
const_eval_transient_mut_borrow = mutable references are not allowed in {$kind}s | ||
const-eval-transient-mut-borrow-raw = raw mutable references are not allowed in {$kind}s | ||
const_eval_transient_mut_borrow_raw = raw mutable references are not allowed in {$kind}s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
expand-explain-doc-comment-outer = | ||
expand_explain_doc_comment_outer = | ||
outer doc comments expand to `#[doc = "..."]`, which is what this macro attempted to match | ||
expand-explain-doc-comment-inner = | ||
expand_explain_doc_comment_inner = | ||
inner doc comments expand to `#![doc = "..."]`, which is what this macro attempted to match |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
parser-struct-literal-body-without-path = | ||
parser_struct_literal_body_without_path = | ||
struct literal body without path | ||
.suggestion = you might have forgotten to add the struct literal inside the block | ||
parser-maybe-report-ambiguous-plus = | ||
parser_maybe_report_ambiguous_plus = | ||
ambiguous `+` in a type | ||
.suggestion = use parentheses to disambiguate | ||
parser-maybe-recover-from-bad-type-plus = | ||
parser_maybe_recover_from_bad_type_plus = | ||
expected a path on the left-hand side of `+`, not `{$ty}` | ||
parser-add-paren = try adding parentheses | ||
parser_add_paren = try adding parentheses | ||
parser-forgot-paren = perhaps you forgot parentheses? | ||
parser_forgot_paren = perhaps you forgot parentheses? | ||
parser-expect-path = expected a path | ||
parser_expect_path = expected a path | ||
parser-maybe-recover-from-bad-qpath-stage-2 = | ||
parser_maybe_recover_from_bad_qpath_stage_2 = | ||
missing angle brackets in associated item path | ||
.suggestion = try: `{$ty}` | ||
parser-incorrect-semicolon = | ||
parser_incorrect_semicolon = | ||
expected item, found `;` | ||
.suggestion = remove this semicolon | ||
.help = {$name} declarations are not followed by a semicolon | ||
parser-incorrect-use-of-await = | ||
parser_incorrect_use_of_await = | ||
incorrect use of `await` | ||
.parentheses-suggestion = `await` is not a method call, remove the parentheses | ||
.postfix-suggestion = `await` is a postfix operation | ||
.parentheses_suggestion = `await` is not a method call, remove the parentheses | ||
.postfix_suggestion = `await` is a postfix operation | ||
parser-in-in-typo = | ||
parser_in_in_typo = | ||
expected iterable, found keyword `in` | ||
.suggestion = remove the duplicated `in` |
228 changes: 114 additions & 114 deletions
228
compiler/rustc_error_messages/locales/en-US/passes.ftl
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# `foo` isn't provided by this diagnostic so it is expected that the fallback message is used. | ||
parser-struct-literal-body-without-path = this is a {$foo} message | ||
parser_struct_literal_body_without_path = this is a {$foo} message | ||
.suggestion = this is a test suggestion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# `parser-struct-literal-body-without-path` isn't provided by this resource at all, so the | ||
# `parser_struct_literal_body_without_path` isn't provided by this resource at all, so the | ||
# fallback should be used. | ||
foo = bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
parser-struct-literal-body-without-path = this is a test message | ||
parser_struct_literal_body_without_path = this is a test message | ||
.suggestion = this is a test suggestion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
some_slug = hi | ||
.label-has-hyphens = test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
missing-message = | ||
missing_message = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this-slug-has-hyphens = hi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you submit a PR to the dev guide documenting this and updating the examples there too? Please ping me on it :)
(this can be after this lands, just so that it happens)