Skip to content

Enclose keywords in quotes in logging generator messages, to improve translation quality#124960

Open
svick wants to merge 1 commit intodotnet:mainfrom
svick:logging-strings-keywords
Open

Enclose keywords in quotes in logging generator messages, to improve translation quality#124960
svick wants to merge 1 commit intodotnet:mainfrom
svick:logging-strings-keywords

Conversation

@svick
Copy link
Member

@svick svick commented Feb 27, 2026

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.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-extensions-logging
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants