fix(i18n): fix fa/el translation placeholders for config value errors - #14636
Closed
aryansk wants to merge 1 commit into
Closed
fix(i18n): fix fa/el translation placeholders for config value errors#14636aryansk wants to merge 1 commit into
aryansk wants to merge 1 commit into
Conversation
Fixes sphinx-doc#14347 fa: {permitted} -> {default.__name__} in defaults-to message (was copy-paste from expected-with-permitted). el: fix unterminated '{name]' -> '{name}', '[current__name__}' -> '{current.__name__}', and '{current__name__}'/'{default__name__}' -> '{current.__name__}'/ '{default.__name__}' (missing dot). Both now pass msgfmt -c, fixing fatal compile errors for Persian and Greek locales. Validation: msgfmt -c sphinx/locale/fa/.../sphinx.po and el/.../sphinx.po both pass (were fatal before); git diff --check clean.
Member
|
Closing this due to the contribution policy on translation files. The proper fix is outlined in this comment: #14347 (comment)
|
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.
Fixes #14347
Problem
msgfmt -cfails for Persian (fa) and Greek (el) locales, blockingdjango-admin compilemessages/sphinx.localecompilation for every user of those locales:fa:"{permitted}"should be"{default.__name__}"in thedefaults tomessage (copy-paste from theexpectedmessage)el: unterminated'{name]'→'{name}','[current__name__}'→'{current.__name__}', and'{current__name__}'/'{default__name__}'→'{current.__name__}'/'{default.__name__}'(missing dot)Both are fatal
python-brace-formaterrors.Change
sphinx/locale/fa/LC_MESSAGES/sphinx.po:599—{permitted}→{default.__name__}sphinx/locale/el/LC_MESSAGES/sphinx.po:591—'{name]'→'{name}','[current__name__}'→'{current.__name__}'sphinx/locale/el/LC_MESSAGES/sphinx.po:598—'{current__name__}'→'{current.__name__}','{default__name__}'→'{default.__name__}'Keep unrelated cleanup out of this PR.
Why this approach
The
msgidstrings use{name},{current.__name__},{permitted},{default.__name__}; themsgstrmust use the same brace-format placeholders. Fixing the placeholders to matchmsgidmakesmsgfmt -cpass and restores the correct interpolated values. No code change needed.Testing
Documentation and release impact
Review notes