Skip to content
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

Handle diagnostics customization on the fluent side (for one specific diagnostic) #106971

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 17, 2023

@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 17, 2023
@davidtwco
Copy link
Member

I'm a little hesitant about adding functions like this - on the one hand, it reduces duplication we're seeing where a ty_is_static-esque field is added to branch on in the Fluent code, which just feels yucky when the ty field is there (similarly with opt_is_some fields). On the other hand, I don't know how this will look for translators and whether they'll know they need to branch like this to translate the entire error.

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 26, 2023

📌 Commit 64e5f91 has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 26, 2023
@est31
Copy link
Member

est31 commented Jan 26, 2023

I wonder where these functions should be documented, because there should be some documentation of them somewhere.

I think for translators of some piece of software, or even some document, the benchmark should always be: does the person, in addition to speaking both languages, understand what they are translating? A lot of words are jargon, e.g. the words that collins dictionary suggests for "compilation" are all wrong, "Zusammenstellung"/"Abfassung"/"Sammlung" are all not correct ("Übersetzung" is the correct translation, or the loanword). Similarly, binary can either be translated as "binär" or as "Binärdatei" depending on whether you mean the noun or the adjective. As an example of what happens when you don't know jargon, you can see what Google's non-human translator API has done to their Android documentation: they translate "Android Rust patterns" as "Android Rostmuster", and "Example C binary" as "Beispiel C binär".

So I think it should be safe to assume some capability for programming from translators, and thus, to use stuff like STREQ. But even people who know programming enjoy a specification of the functions available to them :).

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 26, 2023
Handle diagnostics customization on the fluent side (for one specific diagnostic)

r? `@davidtwco`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 26, 2023
Handle diagnostics customization on the fluent side (for one specific diagnostic)

r? ``@davidtwco``
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 26, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#106904 (Preserve split DWARF files when building archives.)
 - rust-lang#106971 (Handle diagnostics customization on the fluent side (for one specific diagnostic))
 - rust-lang#106978 (Migrate mir_build's borrow conflicts)
 - rust-lang#107150 (`ty::tls` cleanups)
 - rust-lang#107168 (Use a type-alias-impl-trait in `ObligationForest`)
 - rust-lang#107189 (Encode info for Adt in a single place.)
 - rust-lang#107322 (Custom mir: Add support for some remaining, easy to support constructs)
 - rust-lang#107323 (Disable ConstGoto opt in cleanup blocks)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4b97f07 into rust-lang:master Jan 26, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants