Enclose keywords in quotes in logging generator messages, to improve translation quality#124960
Open
svick wants to merge 1 commit intodotnet:mainfrom
Open
Enclose keywords in quotes in logging generator messages, to improve translation quality#124960svick wants to merge 1 commit intodotnet:mainfrom
svick wants to merge 1 commit intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-extensions-logging |
Contributor
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 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.