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

Added Russian translation. #521

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Added Russian translation. #521

merged 2 commits into from
Mar 4, 2024

Conversation

dchapyshev
Copy link
Contributor

No description provided.

@dail8859
Copy link
Owner

dail8859 commented Mar 4, 2024

Thanks for the PR! I'm curious about qtbase_ru. This makes me wonder if qtbase_XXX needs included for other languages. Do you happen to know what parts of the application this translates?

@dchapyshev
Copy link
Contributor Author

dchapyshev commented Mar 4, 2024

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.
image

@dail8859
Copy link
Owner

dail8859 commented Mar 4, 2024

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

if (translatorQt.load(locale, QString("qt"), QString("_"), path)) {

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.

@dchapyshev
Copy link
Contributor Author

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.

@dail8859
Copy link
Owner

dail8859 commented Mar 4, 2024

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.

@dail8859
Copy link
Owner

dail8859 commented Mar 4, 2024

Resolved conflict. Once the CI checks pass, I'll merge this in.

Thanks!

@dail8859 dail8859 merged commit dd12ffa into dail8859:master Mar 4, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants