Skip to content

rustc: Streamline error messages for i18n, using plural whenever possible #12678

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
merged 1 commit into from
Mar 4, 2014

Conversation

lifthrasiir
Copy link
Contributor

While we are not yet ready for compiler i18n, this also keeps the error handling code clean. The set of altered error messages was obtained by grepping for "s" and (s), so there might be some missing messages.

@alexcrichton
Copy link
Member

Stylistically, {, plural, ...} looks a little jarring (specifically the {,). What would you think about naming or numbering these arguments?

This seems like a nice improvement though, thanks!

out_type_size,
pluralize(out_type_size)));
format!("transmute called on types with different sizes: \
{} ({, plural, =1{# bit} other{# bits}}) to \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a point against this change; but is it ever possible to have 1 bit type in Rust?

@lifthrasiir
Copy link
Contributor Author

@alexcrichton Indeed. I wanted to avoid changing them in this PR though since larger stylistic changes are required for consistency, but I have no hard feeling about that. I'll try to sort them out then.

bors added a commit that referenced this pull request Mar 4, 2014
While we are not yet ready for compiler i18n, this also keeps the error handling code clean. The set of altered error messages was obtained by grepping for `"s"` and `(s)`, so there might be some missing messages.
@bors bors closed this Mar 4, 2014
@bors bors merged commit 2145445 into rust-lang:master Mar 4, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
fix: Trigger flyimport completions in item lists again

Fixes rust-lang/rust-analyzer#12656
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 18, 2024
Bump nightly version -> 2024-04-05

r? `@ghost`

changelog: none

This should unblock CI without doing a full sync. Proper sync on Thursday.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants