Skip to content

fix(l10n): clear corrupted fa translation entries breaking compilemessages - #1812

Merged
AndyScherzinger merged 1 commit into
masterfrom
fix/l10n-msgfmt-fatal-errors
Jul 6, 2026
Merged

fix(l10n): clear corrupted fa translation entries breaking compilemessages#1812
AndyScherzinger merged 1 commit into
masterfrom
fix/l10n-msgfmt-fatal-errors

Conversation

@miaulalala

Copy link
Copy Markdown
Contributor

Summary

  • CI (test (postgres) / test (sqlite)) has been failing on master since the automated Transifex sync commit 8c9115fe98make dev-setupmake l10ndjango-admin compilemessages aborts with msgfmt: found 4 fatal errors before any test runs.
  • Root cause: three corrupted entries in locale/fa/LC_MESSAGES/django.po, not an encoding or RTL issue — the Farsi text itself is valid UTF-8 and other entries in the file compile fine:
    • locale/fa/LC_MESSAGES/django.po:769msgid/msgstr disagree on trailing \n
    • locale/fa/LC_MESSAGES/django.po:776msgstr is missing the %(site_domain)s format placeholder present in msgid
    • locale/fa/LC_MESSAGES/django.po:1766msgid/msgstr disagree on leading \n
  • These look like partial/truncated translations that landed via the Transifex sync bot. Rather than fabricate corrected Farsi text, this clears the three broken msgstr entries so they fall back to the English msgid (valid, untranslated gettext entries) until Transifex resupplies clean translations on its next sync.
  • Swept every other locale/*/LC_MESSAGES/django.po file with msgfmt -c — no other locale has this issue.

Test plan

  • msgfmt -c -v -o /dev/null locale/fa/LC_MESSAGES/django.po — 0 fatal errors (previously 4)
  • python manage.py compilemessages --settings nextcloudappstore.settings.development — completes without error across all locales
  • for f in locale/*/LC_MESSAGES/django.po; do msgfmt -c -o /dev/null "$f"; done — no fatal errors in any locale

🤖 Generated with Claude Code

…sages

Three entries in locale/fa/LC_MESSAGES/django.po were malformed after a
Transifex sync: mismatched leading/trailing newlines between msgid and
msgstr, and a msgstr missing a %(site_domain)s format placeholder present
in its msgid. msgfmt treats these as fatal errors, so 'make dev-setup'
(and therefore CI) failed for every branch before any tests could run.

Clear the three broken msgstr entries to make them untranslated (falling
back to the English msgid) until Transifex resupplies correct
translations on its next sync.

Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala

Copy link
Copy Markdown
Contributor Author

@rakekniven could you check on your end is you have time?

@marcelklehr marcelklehr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@rakekniven

rakekniven commented Jul 6, 2026

Copy link
Copy Markdown
Member

Translation takes place at Transifex.
So changes to source by this PR get overriden by next sync tomorrow morning.

From my understanding this PR does not help.

I had a look at the translations at Tx for persian (fa) and adapted 50 strings. Found named strings marked with error and removed translations seconds ago.
Should be fine tomorrow after next sync.

@miaulalala

Copy link
Copy Markdown
Contributor Author

Translation takes place at Transifex. So changes to source by this PR get overriden by next sync tomorrow morning.

From my understanding this PR does not help.

I had a look at the translations at Tx for persian (fa) and adapted 50 strings. Found named strings marked with error and removed translations seconds ago. Should be fine tomorrow after next sync.

Let's get CI green - if it's synced tomorrow it should be fine to have no translations for today

@AndyScherzinger
AndyScherzinger merged commit 02edebf into master Jul 6, 2026
13 of 17 checks passed
@AndyScherzinger
AndyScherzinger deleted the fix/l10n-msgfmt-fatal-errors branch July 6, 2026 16:36
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.

5 participants