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

Dynamic translation unification #814

Merged

Conversation

corubba
Copy link
Contributor

@corubba corubba commented Jun 20, 2023

Remove UnicodeMod

Replaced the QString compatible UnicodeMod and its arg method with plain Qt translations and python formatting.

Migrate UnicodeMod translations

Simple search&replace across the *.ts files to turn any %[0-9] placeholders into {}, plus some manual fixes to prevent changed whitespace from obsoleting translations.

Remove printf-style formatting from translations

Replaced the % operator with str.format, so there is exactly one way we do dynamic translations.

Migrate printf-style translations

Simple search&replace across the *.ts files to turn any %[sd] placeholders into {}, plus some manual fixes to prevent changed whitespace from obsoleting translations.

Update translations

Since all translations were migrated ealier, this only changes the lines. No translations are added or removed.

$ ./update_translations.py de

Compile translations

$ lrelease translations/*.ts

Regenerate resource.py

$ pyrcc5 puddlestuff/resource.qrc -o puddlestuff/resource.py

Replaced the QString compatible UnicodeMod and its `arg` method with
plain Qt translations and python formatting.
Simple search&replace across the `*.ts` files to turn any `%[0-9]` into
`{}`, plus some manual fixes to prevent changed whitespace from
obsoleting translations.
Replaced the `%` operator with `str.format`, so there is exactly one
way we do dynamic translations.
Simple search&replace across the `*.ts` files to turn any `%[sd]` into
`{}`, plus some manual fixes to prevent changed whitespace from
obsoleting translations.
Since all translations were migrated ealier, this only changes the
lines. No translations are added or removed.

$ ./update_translations.py de
$ lrelease translations/*.ts
$ pyrcc5 puddlestuff/resource.qrc -o puddlestuff/resource.py
@corubba corubba added the enhancement Requests to enhance puddletag, one way or another label Jan 6, 2024
@sandrotosi sandrotosi merged commit 461b670 into puddletag:master Jan 14, 2024
@corubba corubba deleted the feature/translation-insert-rework branch January 14, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to enhance puddletag, one way or another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants