[Localization] Should I build the "ts_zh_TW_cleaned" to lupdate the qtcreator_zh_TW.ts?

Eike Ziller Eike.Ziller at qt.io
Wed May 10 09:09:58 CEST 2023


I can mainly tell you what I do:

The ts_<lang> target creates .ts files that are good for using Linguist, but not suitable for submitting to the repository.

The ts_<lang>_cleaned target creates .ts files that are acceptable for the repository, but less suitable for Linguist, because it doesn't contain the code locations and not the outdated translations that Linguist sometimes can use to suggest translations.

So what I do is:

- create a .ts file for updating the repository with ts_<lang>_cleaned and commit and push that to gerrit.
- I locally revert that commit (git revert HEAD)
- I create the .ts file for working with Linguist with ts_<lang> and commit that locally. After that the revert from the second step can be removed (git rebase -i)
- I do my translations and do separate commits for these

So I end up with commits

- translation of Y
- translation of X
- ts update with ts_<lang>
- ts update with ts_<lang>_cleaned

Before pushing the translation changes to gerrit, I rebase them to before the "full" ts update (the ts_<lang> one) with git rebase -i, so I end up with

- ts update with ts_<lang>
- translation of Y
- translation of X
- ts update with ts_<lang>_cleaned

and push the translations to gerrit with "git push gerrit HEAD~1:refs/for/<branch>". The "HEAD~1" means that it pushes everything except for the top commit, which in my case then is the ts update with ts_<lang> which I do not want on gerrit.

Br, Eike

> Am 10/05/2023 um 08:28 schrieb Haowei Hsu <hwhsu1231 at gmail.com>:
> 
> Hello Oswald and Eike,
> 
> Previously, I submitted a change for lupdating qtcreator_zh_TW.ts by running the cmake --build command with ts_zh_TW target:
> 
> cmake --build . --target ts_zh_TW <...>
> 
> However recently, I found that there are other targets available:
> 
> <image.png>
> 
> Should I use another two ts_zh_TW_xxx targets to lupdate the qtcreator_zh_TW.ts?
> Since I noticed that the current qtcreator_zh_TW.ts lupdated by ts_zh_TW target has many
> translation fields marked as "vanished" or "obsolete".
> 
> ---
> Haowei Hsu

-- 
Eike Ziller
Principal Software Engineer

Qt Group
Erich-Thilo-Straße 10
12489 Berlin, Germany
eike.ziller at qt.io
https://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Localization mailing list