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

Haowei Hsu hwhsu1231 at gmail.com
Wed May 10 14:03:53 CEST 2023


Alternatively, just provide another configure preset called
*"cmake-plugin-all"*, which includes
all the possible plugins in the BUILD_PLUGINS cache variables?

---
Haowei Hsu

Haowei Hsu <hwhsu1231 at gmail.com> 於 2023年5月10日 週三 下午8:00寫道:

> Excuse me, Eike.
>
> If I'm not mistaken, it is related to what items we specified in
> *BUILD_PLUGINS* cache variables, right?
> Since I use the default configurePreset *"cmake-plugin-minimal"* to
> configure the project,
> only those plugins specified in BUILD_PLUGINS cache variables will be
> enabled, right?
> If so, then why not qtcreator adds all the possible plugins into the
> BUILD_PLUGINS in "cmake-plugin-minimal"?
> Is there any reason not to do that? Or is it just that Qt Team forgot to
> modify CMakePresets.json?
>
> [image: image.png]
> ---
> Haowei Hsu
>
> Haowei Hsu <hwhsu1231 at gmail.com> 於 2023年5月10日 週三 下午7:52寫道:
>
>> BTW, The following screenshot lists some packages which are not found:
>>
>> [image: image.png]
>>
>> Do I have to install all of them by Qt Maintenance Tools or other
>> approaches?
>> ---
>> Haowei Hsu
>>
>> Eike Ziller <Eike.Ziller at qt.io> 於 2023年5月10日 週三 下午7:30寫道:
>>
>>>
>>>
>>> > Am 10/05/2023 um 13:12 schrieb Haowei Hsu <hwhsu1231 at gmail.com>:
>>> >
>>> > Hello Eike.
>>> >
>>> > After using "ts_zh_TW_cleaned" target to lupdate the
>>> qtcreator_zh_TW.ts,
>>> > those "vanished" and "obsolete" strings indeed disappeared.
>>> >
>>> > However, I noticed that the total components in this lupdated
>>> qtcreator_zh_TW.ts
>>> > is way less than the current qtcreator_de.ts.
>>> >     •
>>> > The lupdated qtcreator_zh_TW.ts: about 36 components
>>> >     • The current qtcreator_de.ts: over 100 components
>>> >
>>> > And one of the biggest differences between them is that the former
>>> > (lupdated qtcreator_zh_TW.ts) doesn't have QmlDesigner::XXXX
>>> components.
>>> >
>>> > What happened? Is it normal? If not, what do I miss?
>>>
>>> It looks like when you configured Qt Creator with CMake, your Qt missed
>>> support for QmlDesigner.
>>> The prerequisites are Qt >= 6.2.0 and the QtQuickWidgets and QtSvg
>>> modules.
>>>
>>> CMake prints a long list of "enabled" and "disabled" features after
>>> configuring, one of them is
>>> * Plugin QmlDesigner, with CONDITION Qt6_VERSION VERSION_GREATER_EQUAL
>>> 6.2.0 AND TARGET Qt::QuickWidgets AND TARGET Qt::Svg
>>> and that can be in a section "-- The following features have been
>>> enabled:" or "-- The following features have been disabled:".
>>>
>>> You could just ignore this for the time being, and start with the
>>> components ("contexts") that you have.
>>>
>>> Br, Eike
>>>
>>> >
>>> > <image.png>
>>> > <image.png>
>>> > ---
>>> > Haowei Hsu
>>> >
>>> > Haowei Hsu <hwhsu1231 at gmail.com> 於 2023年5月10日 週三 下午5:43寫道:
>>> > BTW,
>>> >
>>> > If the ts file generated by "ts_zh_TW_cleaned" is the one suitable to
>>> be pushed to the repo,
>>> > does that mean I should abandon the current pushed changes related to
>>> "ts_zh_TW"?
>>> >
>>> > l10n(zh_TW): Update translations (Id8be4390) · Gerrit Code Review (
>>> qt-project.org)
>>> > l10n(zh_TW): lupdate qtcreator_zh_TW.ts (Ibbf9fd4f) · Gerrit Code
>>> Review (qt-project.org)
>>> >
>>> > And then re-push a new qtcreator_zh_TW.ts lupdated by
>>> "ts_zh_TW_cleaned"?
>>> >
>>> > ---
>>> > Haowei Hsu
>>> >
>>> > Haowei Hsu <hwhsu1231 at gmail.com> 於 2023年5月10日 週三 下午5:37寫道:
>>> > Got it!!
>>> >  It leaves obsolete translations in the file, but does not include
>>> source code locations. Do not use ;)
>>> >
>>> > Then what about the following proposal?
>>> >
>>> > If I "don't need the suggestions" from Qt Linguist, then I can
>>> simply:   • use "ts_zh_TW_cleaned" target to lupdate the qtcreator_zh_TW.ts
>>> >  • do translations in qtcreator_zh_TW.ts
>>> >  • push the changes to Gerrit for review
>>> >  without using "ts_zh_TW" target and those complicated Git operations.
>>> Right?
>>> >
>>> > ---
>>> > Haowei Hsu
>>> >
>>> > Eike Ziller <Eike.Ziller at qt.io> 於 2023年5月10日 週三 下午5:27寫道:
>>> >
>>> >
>>> > > Am 10/05/2023 um 10:15 schrieb Haowei Hsu <hwhsu1231 at gmail.com>:
>>> > >
>>> > > By the way, what about this target "ts_zh_TW_no_locations"?
>>> > > What's the difference from the other two targets?
>>> >
>>> > It leaves obsolete translations in the file, but does not include
>>> source code locations. Do not use ;)
>>> >
>>> > Br, Eike
>>> >
>>> > >
>>> > > <image.png>
>>> > > ---
>>> > > Haowei Hsu
>>> > >
>>> > > Haowei Hsu <hwhsu1231 at gmail.com> 於 2023年5月10日 週三 下午4:12寫道:
>>> > > Thanks for your detailed reply, Eike!!
>>> > >
>>> > > According to what you said,
>>> > >
>>> > > 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
>>> > >
>>> > > If I "don't need the suggestions" from Qt Linguist, then I can
>>> simply:
>>> > >     •
>>> > > use "ts_zh_TW_cleaned" target to lupdate the qtcreator_zh_TW.ts
>>> > >     • do translations in qtcreator_zh_TW.ts
>>> > >     • push the changes to Gerrit for review
>>> > >
>>> > > without using "ts_zh_TW" target and those complicated Git
>>> operations. Right?
>>> > >
>>> > > ---
>>> > > Haowei Hsu
>>> > >
>>> > > Eike Ziller <Eike.Ziller at qt.io> 於 2023年5月10日 週三 下午3:10寫道:
>>> > > 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
>>> > >
>>> > >
>>> >
>>> > --
>>> > 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
>>> >
>>> >
>>>
>>> --
>>> 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
>>>
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/localization/attachments/20230510/9a424a1a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 82410 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/localization/attachments/20230510/9a424a1a/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 100004 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/localization/attachments/20230510/9a424a1a/attachment-0003.png>


More information about the Localization mailing list