qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.5k stars 4k forks source link

Add ability to use external language (.qm) files instead of default translations #18405

Open b-user opened 1 year ago

b-user commented 1 year ago

Suggestion

I would like to be able to use an external language file for the GUI. For example, if there is a file "qbittorrent_xx_YY.ts" "qbittorrent_xx_YY.qm" in the "translations" folder exist and if the language "xx_YY" was selected in the program interface, the result will be the use of an external language file "qbittorrent_xx_YY.ts" "qbittorrent_xx_YY.qm" for the GUI.

Use case

using updated and custom translations (without recompilation). https://github.com/qbittorrent/qBittorrent/issues/18304

Extra info/examples/attachments

No response

glassez commented 1 year ago

For example, if there is a file "qbittorrent_xx_YY.ts" in the "translations" folder exist and if the language "xx_YY" was selected in the program interface, the result will be the use of an external language file "qbittorrent_xx_YY.ts" for the GUI.

You probably mean "qbittorrent_xx_YY.qm" since *.ts files are "translation sources" that need to be transformed in binary form using lrelease tool.

b-user commented 1 year ago

You probably mean "qbittorrent_xx_YY.qm

Yes, .qm

lrelease

or lconvert . it does not matter

luzpaz commented 1 year ago

I recall knowing about this...something about Qt allowing for this feature by adding a translations/ subdirectory in the qbit config directory ?

luzpaz commented 1 year ago

FreeCAD project has documentation on this: https://github.com/FreeCAD/FreeCAD-translations/#testing

The difference is that FreeCAD uses Crowdin and qBittorrent uses Transifex. What they have in common though is both are built on Qt. So we'd need to modify those instructions for the users to get latest translation sources from Transifex, make modifications, convert them in to .qm files and move them in to the qBittorrent user config directory so qBit can find said translations and use them instead of the default translations in the current qBit version.

b-user commented 1 year ago

The difference is that FreeCAD

can use external language files, but Bittorrent can't.

luzpaz commented 1 year ago

@b-user you've confirmed this how ?

glassez commented 1 year ago

@b-user you've confirmed this how ?

qBittorrent have no such feature implemented.

luzpaz commented 1 year ago

I thought this was a Qt feature available by default

b-user commented 1 month ago

@glassez, please tell me, what is the probability that it will appear in version 5.1?

glassez commented 1 month ago

@glassez, please tell me, what is the probability that it will appear in version 5.1?

It's undetermined.

glassez commented 1 month ago

@qbittorrent/bug-handlers What do you think about this feature? How useful could it be?

thalieht commented 1 month ago

@qbittorrent/bug-handlers What do you think about this feature? How useful could it be?

Doesn't affect me so if all i have at hand to decide is OP's use case of incomplete translations, it would be hard for me to justify its usefulness.

b-user commented 1 month ago

Guys, have you fixed this situation? https://github.com/qbittorrent/qBittorrent/discussions/18400