oferkv / phototonic

Image Viewer and organizer
GNU General Public License v3.0
159 stars 43 forks source link

Idiomatic (and right) usage of QTranslator.load #242

Closed FreeSlave closed 6 years ago

FreeSlave commented 6 years ago

Manual concatenation did not work, because locale name is not only language, but also country code. It looks like lang_COUNTRY and there are no translation files in phototonic that follow this scheme so it never worked right.

The overload of QTranslator::load takes care about these things. It checks for existence of files with lang code and without country code in their names.