Skip to content

fix(i18n): fix fa/el translation placeholders for config value errors - #14636

Closed
aryansk wants to merge 1 commit into
sphinx-doc:masterfrom
aryansk:fix-fa-el-po-14347
Closed

fix(i18n): fix fa/el translation placeholders for config value errors#14636
aryansk wants to merge 1 commit into
sphinx-doc:masterfrom
aryansk:fix-fa-el-po-14347

Conversation

@aryansk

@aryansk aryansk commented Aug 24, 2026

Copy link
Copy Markdown

Fixes #14347

Problem

msgfmt -c fails for Persian (fa) and Greek (el) locales, blocking django-admin compilemessages / sphinx.locale compilation for every user of those locales:

  • fa: "{permitted}" should be "{default.__name__}" in the defaults to message (copy-paste from the expected message)
  • el: unterminated '{name]''{name}', '[current__name__}''{current.__name__}', and '{current__name__}'/'{default__name__}''{current.__name__}'/'{default.__name__}' (missing dot)

Both are fatal python-brace-format errors.

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 msgid strings use {name}, {current.__name__}, {permitted}, {default.__name__}; the msgstr must use the same brace-format placeholders. Fixing the placeholders to match msgid makes msgfmt -c pass and restores the correct interpolated values. No code change needed.

Testing

command: msgfmt -c sphinx/locale/fa/LC_MESSAGES/sphinx.po -o /tmp/fa.mo
result: ok (was fatal before)

command: msgfmt -c sphinx/locale/el/LC_MESSAGES/sphinx.po -o /tmp/el.mo
result: ok (was fatal: "a format specification for argument 'default.__name__' doesn't exist")

command: git diff --check
result: clean

Documentation and release impact

  • User-facing translation fixed
  • Changelog/release note needed: i18n fix
  • Migration or compatibility note needed
  • No documentation impact

Review notes

  • Known limitations: none
  • Follow-up issue, if any: none
  • Security/licensing considerations: none

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.
@jdillard

Copy link
Copy Markdown
Member

Closing this due to the contribution policy on translation files. The proper fix is outlined in this comment: #14347 (comment)

We do not accept pull requests altering the translation files directly. Instead, please contribute translations via the Transifex platform.

@jdillard jdillard closed this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translation issues detected when compiling fa and el locales

2 participants