You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to the application's QM files, you need to deploy the QM files for the Qt modules that you use in the application, unless they are installed on the system.
The QM files are split up by module and there is a so-called meta catalog file which includes the QM files of all modules. However, you only need to deploy the QM files for the modules that you use in the application.
You can use the lconvert tool in the deploy step to concatenate the required QM files into one file that matches the meta catalog file. For example, to create a German translation file for an application that uses the Qt Core, Qt GUI, and Qt Quick modules, run:
I'm in the process of migrating my project from linuxdeployqt to linuxdeploy with the linuxdeploy-plugin-qt plugin and have just spotted that the latter is including (in my particular case) qtbase_xx.qm and qtmultimedia_xx.qm for each locale whereas the former does produce the combined qt_xx.qm that the above suggests. I would point you to the shared.cpp file in that project but since it is GPL licenced whereas this one is MIT I don't want to lead anyone to precisely copy what is there as it can't be used here. I'm guessing that (inline bool) deployTranslations(appdir::AppDir&, const fs::path&, const std::vector<QtModule>&) is the place to fix this...
The text was updated successfully, but these errors were encountered:
If they are not merged together then in an application it has to find and load the Qt translations for each module individually - whereas if they are combined it only has to instantiate one QTranslator instance to hold all the Qt modules' translations. In my application I'd have to rewrite https://github.com/Mudlet/Mudlet/blob/development/src/mudlet.cpp#L1376 to find each module's corresponding locale translation and then load them all making for more complexity.
I've worked around things temporarily by running linuxdeploy twice - the first time with this plug in - to assembly all the translation files, then used a bit of bashery to combine them in the manner that Qt themselves suggest (with lconvert) and then delete the individual files leaving behind the combined ones before running linuxdeployagain (without this plugin) to merge the changes back into the AppDir. Running linuxdeploy is not a particularly fast process - even in the GitHub CI/CB process (it takes a couple of minutes on my Desktop) so having to run it twice is not nice...
The first run with this qt and the gstreamer plugins:
Fri, 11 Apr 2025 20:53:25 GMT to Fri, 11 Apr 2025 20:54:19 GMT = 55 seconds
The second run without either plugin just to update the translation files in the AppImage after combining them:
Fri, 11 Apr 2025 20:54:19 GMT to Fri, 11 Apr 2025 20:54:56 GMT = 35 seconds
https://doc.qt.io/qt-6/localization.html#deploy-translations mentions the following:
I'm in the process of migrating my project from
linuxdeployqt
tolinuxdeploy
with thelinuxdeploy-plugin-qt
plugin and have just spotted that the latter is including (in my particular case)qtbase_
xx.qm
andqtmultimedia_
xx.qm
for each locale whereas the former does produce the combinedqt_
xx.qm
that the above suggests. I would point you to theshared.cpp
file in that project but since it is GPL licenced whereas this one is MIT I don't want to lead anyone to precisely copy what is there as it can't be used here. I'm guessing that(inline bool) deployTranslations(appdir::AppDir&, const fs::path&, const std::vector<QtModule>&)
is the place to fix this...The text was updated successfully, but these errors were encountered: