D9793: Fall back to language name for translations lookup if locale name fails

Safa Alfulaij noreply at phabricator.kde.org
Thu Jan 11 16:20:31 UTC 2018


safaalfulaij added a comment.


  I went through Qt code, as Qt applications are opened with my language correctly where KF ones (those with QM) don't.
  The whole issue is that we have each locale's translations in a separate folder (`ar/LC_MESSAGES`, `en/LC_MESSAGES`, `de/LC_MESSAGES`, etc.)
  Qt uses internally `find_translation` <https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qtranslator.cpp#n631> which goes through a list of guesses to find the correct language, according to the LANGUAGE preferences and the locale itself.
  Maybe we can borrow that code and utilize it, that would be much better.
  
  Thanks for opening this, @wbauer!

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D9793

To: wbauer, #frameworks
Cc: safaalfulaij, #build_system
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20180111/26134c0b/attachment.html>


More information about the Kde-buildsystem mailing list