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

2018-01-18 Thread Wolfgang Bauer
This revision was automatically updated to reflect the committed changes. Closed by commit R240:78443e0f0373: Fall back to language name for translations lookup if locale name fails (authored by wbauer). REPOSITORY R240 Extra CMake Modules CHANGES SINCE LAST UPDATE

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

2018-01-17 Thread Albert Astals Cid
aacid accepted this revision. This revision is now accepted and ready to land. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D9793 To: wbauer, #frameworks, aacid Cc: aacid, safaalfulaij, #build_system

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

2018-01-17 Thread Wolfgang Bauer
wbauer updated this revision to Diff 25536. wbauer edited the summary of this revision. wbauer edited the test plan for this revision. wbauer added a comment. Leave bcp47Name() in for compatibility, add const. REPOSITORY R240 Extra CMake Modules CHANGES SINCE LAST UPDATE

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

2018-01-17 Thread Wolfgang Bauer
wbauer marked an inline comment as done. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D9793 To: wbauer, #frameworks Cc: aacid, safaalfulaij, #build_system

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

2018-01-14 Thread Albert Astals Cid
aacid added inline comments. INLINE COMMENTS > ECMQmLoader.cpp.in:68 > if (!loadTranslation(locale.name())) { > -loadTranslation(locale.bcp47Name()); > +int i = locale.name().indexOf(QLatin1Char('_')); > +if (i > 0) { I agree that

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

2018-01-11 Thread Wolfgang Bauer
wbauer added a comment. In https://phabricator.kde.org/D9793#189595, @safaalfulaij wrote: > > Why is this an issue? > > There's no difference really in loading ar/LC_MESSAGES/xxx.qm and LC_MESSAGES/xxx_ar.qm (or something like that), i.e. you would have the same problem if all

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

2018-01-11 Thread Safa Alfulaij
safaalfulaij added a comment. > Why is this an issue? > There's no difference really in loading ar/LC_MESSAGES/xxx.qm and LC_MESSAGES/xxx_ar.qm (or something like that), i.e. you would have the same problem if all translations would be in the same folder. Well, we were to simplify

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

2018-01-11 Thread Wolfgang Bauer
wbauer added a comment. In https://phabricator.kde.org/D9793#189494, @safaalfulaij wrote: > I went through Qt code, as Qt applications are opened with my language correctly where KF ones (those with QM) don't. I tested with your ar_BH locale meanwhile, and it is fixed too, i.e.

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

2018-01-11 Thread Safa Alfulaij
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.)

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

2018-01-10 Thread Wolfgang Bauer
wbauer added a comment. I don't think bcp47Name makes any sense here. According to the Qt documentation, this "Returns the dash-separated language, script and country (and possibly other BCP47 fields) of this locale as a string" (and "Unlike the uiLanguages() the returned value of the

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

2018-01-10 Thread Wolfgang Bauer
wbauer created this revision. wbauer added a reviewer: Frameworks. wbauer added a project: Frameworks. Restricted Application added a project: Build System. Restricted Application added a subscriber: Build System. wbauer requested review of this revision. REVISION SUMMARY For locales like