Closed dchapyshev closed 8 months ago
I think you can navigate by file size. For example, for the Russian language, file qt_ru.ts is empty, and file qtbase_ru.ts contains translations (but there are languages where this is the other way around). Files like qt_ru.ts are old translation files, before Qt started dividing it into modules. To be on the safe side, you can include both files to have a universal approach. You must also include translations of all other Qt modules that the project uses. These files contain translations of dialogs (for example print dialog), buttons in dialogs (QMessageBox), descriptions of errors, etc.
That is very helpful to know. I'm not sure how all Qt loads translations. This application is only looking for qt_XXX
and not qtbase_XXX
According to the qt_ru.ts
file it has a dependency on qtbase_ru
I'm not sure if this means when it loads qt_ru
it will find the qtbase_ru
or what. This may mean qt_ru
also needs included even though it is mostly empty, that may satisfy the need to load the qtbase
translation.
I'll need to do some testing and reading up to make sure all possible translations are included and properly loaded.
Files qt_ru and qtbase_ru must be loaded separately. When you load one of the files, the other will not automatically load. I have already done loading translations in my project. This code has an example of universal language loading, you could use a similar approach. Maybe this will help you.
I have already done loading translations in my project.
Oh awesome! Thanks!
I'll go ahead and merge this knowing that it won't actually be loading the qtbase file yet. I'll look into adding that in the future soon.
Resolved conflict. Once the CI checks pass, I'll merge this in.
Thanks!
Thanks for the PR! I'm curious about
qtbase_ru
. This makes me wonder ifqtbase_XXX
needs included for other languages. Do you happen to know what parts of the application this translates?