Enclose keywords in quotes in logging generator messages, to improve translation quality#124960
Conversation
|
Tagging subscribers to this area: @dotnet/area-extensions-logging |
There was a problem hiding this comment.
Pull request overview
This PR improves translation quality for the logging generator by enclosing C# keywords and similar terms in single quotes within diagnostic messages. The motivation comes from poor Czech translations in PR #124957, where keywords like "out", "partial", "void", "static", "params", "scoped", and "ref struct" were being mistranslated. By marking these as quoted literals, translation engines should recognize them as code keywords that shouldn't be translated.
Changes:
- Updated source strings in Strings.resx to enclose C# keywords in single quotes
- Updated all 13 localization (.xlf) files to reflect the new source strings and mark translations as needing review
- Fixed ordering of LoggingMethodHasAllowsRefStructConstraintMessage entry in Strings.resx to match .xlf file ordering
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Strings.resx | Added single quotes around C# keywords ('out', 'partial', 'void', 'static', 'params', 'scoped', 'ref struct', 'allows ref struct', 'Info:', 'Warning:', 'Error:') in diagnostic messages; reordered one entry to match .xlf ordering |
| Strings.cs.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.de.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.es.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.fr.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.it.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.ja.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.ko.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.pl.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.pt-BR.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.ru.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.tr.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.zh-Hans.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
| Strings.zh-Hant.xlf | Updated source strings with quoted keywords and marked target translations as needs-review-translation |
|
/ba-g failures are known and were fixed by #124962 |
Some of the Czech language translations in #124957 are quite bad.
This PR updates the messages to enclose C# keywords (and similar) in single quotes, hoping this will improve translation quality.