Pre-commit hook blocking commit for Gwenview Persian translation
Albert Astals Cid
aacid at kde.org
Thu Oct 30 23:30:46 GMT 2025
El dimecres, 29 d’octubre del 2025, a les 17:30:05 (Hora estàndard d’Europa central), Sohrab Behdani va escriure:
> Hi
>
> I’m having an issue with the pre-commit hook when trying to commit a Persian
> translation file. The hook blocks the commit with the following error:
>
> Commit blocked by pre-commit hook (exit code 1) with output:
> <stdin>:2351: 'msgstr' is not a valid KDE KUIT format string, unlike
> 'msgid'. Reason: error while parsing: Premature end of data in tag para
> line 1
>
> msgfmt: found 1 fatal error
>
> trunk/l10n-kf6/fa/messages/gwenview/gwenview.po:
> ERROR: There were syntax errors detected in a po file you committed.
> ERROR: Please correct them first.
>
> The translation was done using Lokalize, and I have already removed the
> problematic line mentioned in the error in lokalize which is the 401
> string, but the hook still prevents the commit. I’ve also verified that the
> file opens and saves fine in Lokalize without any apparent issues.
>
> Could you please advise how to resolve this issue or whether this might be a
> false positive from the pre-commit hook?
Your file is malformed, if you run msgfmt locally it will give you a line number
msgfmt --check gwenview.po
gwenview.po:2351: 'msgstr' is not a valid KDE KUIT format string, unlike 'msgid'. Reason: error while parsing: Opening and ending tag mismatch: list line 1 and gt:kuit
My brain does not know how to read RTL stuff mixed with non RTL stuff but i would say that
"یه نمایش با اندازه کوچکتر نمایش داده میشوند تا جا شوند.<item><item>تصاویر کو"
possibly needs to be
"یه نمایش با اندازه کوچکتر نمایش داده میشوند تا جا شوند.<item><item/>تصاویر کو"
Best Regards,
Albert
>
> Also this is the Translated file which i had attached here.
>
> Best regards,
>
> Sohrab
More information about the kde-i18n-doc
mailing list