Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: fix duplicate messsages in po files #4722

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

neteler
Copy link
Member

@neteler neteler commented Nov 19, 2024

This PR deduplicates the message files (currently the compilation is broken), apparently introduced in #4710 .

I used the following command (inspired by @HuidaeCho in #1396 (comment)):

Edit: keeping the commented cruft in the PO files:

for i in $(ls grass*.po); do
    msguniq --use-first ${i} > $i.tmp
    rm -f ${i}
    mv $i.tmp ${i}
done

This PR deduplicates the message files. I used the following command (inspired by @HuidaeCho in OSGeo#1396 (comment)):

```
cd locale/po/
for pofile in $(ls grass*.po); do
    sed -n '{/^#~/!{p}}' ${pofile} > ${pofile}.tmp
    msguniq --use-first ${pofile}.tmp > ${pofile}
    rm -f ${pofile}.tmp
done
```
@neteler neteler added the translation Message translation related label Nov 19, 2024
@neteler neteler added this to the 8.5.0 milestone Nov 19, 2024
@neteler neteler self-assigned this Nov 19, 2024
@echoix
Copy link
Member

echoix commented Nov 20, 2024

It seems a lot of deletions (40k vs 20 (unit) ish additions). Has a spot check been made to be sure we aren't losing too much work?

@neteler
Copy link
Member Author

neteler commented Nov 20, 2024

Only comments have been removed. Again, I am following @HuidaeCho's advice (see reference above).

@echoix
Copy link
Member

echoix commented Nov 20, 2024

Would a full collection of new strings be appropriate? We never got it updated since I worked on fixing the python strings that formatted before calling gettext (INT003 and all)

@neteler
Copy link
Member Author

neteler commented Nov 20, 2024

Yes, but probably in a new PR.
The related server cronjobs are broken at time which I would like to see running again asap.

@neteler
Copy link
Member Author

neteler commented Nov 20, 2024

While I don't fully agree I have now reverted it and only deduplicated in 7e596dc to speed up merging of this PR.

@echoix please review.

Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

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

I checked them all. There were the two duplicates in russian, that have different translations, and there is in spanish and italian that the strings aren't translated to the same contents, but for spanish for example, that same string is also for 2 other source strings, and only one is fuzzy.

So, its fine for me to potentially degrade 2-6 strings for all languages.

@neteler
Copy link
Member Author

neteler commented Nov 20, 2024

Thanks for the thorough review!

@neteler neteler enabled auto-merge (squash) November 20, 2024 22:51
@echoix
Copy link
Member

echoix commented Nov 20, 2024

You disabled auto-merge for the PR?

@neteler
Copy link
Member Author

neteler commented Nov 21, 2024

I accidentally activated it, the deactivated it again since it will not run due to the current Travis CI bug.

@neteler neteler merged commit 55c0326 into OSGeo:main Nov 21, 2024
23 of 24 checks passed
@neteler neteler deleted the gettext_po_deduplicate branch November 21, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation Message translation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants