D25599: Fix plugin-metadata translations on windows

2019-12-08 Thread Albert Astals Cid
aacid added a comment. In D25599#573581 , @sars wrote: > Yes it works :) > > (I added QLocale::setDefault(QLocale(QString::fromLatin1(languageCode))); to the end of the if statement in initializeLanguages()) > > Hmm... For an application

D25599: Fix plugin-metadata translations on windows

2019-12-07 Thread Kåre Särs
sars added a comment. Yes it works :) (I added QLocale::setDefault(QLocale(QString::fromLatin1(languageCode))); to the end of the if statement in initializeLanguages()) Hmm... For an application like Kate it is totally fine to set the language through kxmlgui, but kxmlgui is tier 3

D25599: Fix plugin-metadata translations on windows

2019-12-04 Thread Albert Astals Cid
aacid added a comment. In D25599#572013 , @sars wrote: > I would agree that a UNIX/POSIX env var is not the most logical thing to use on Windows, but how do we ensure that we are in sync with ki18n? The usage of QLocale in ki18n looks like it is

D25599: Fix plugin-metadata translations on windows

2019-12-04 Thread Kåre Särs
sars added a comment. I would agree that a UNIX/POSIX env var is not the most logical thing to use on Windows, but how do we ensure that we are in sync with ki18n? The usage of QLocale in ki18n looks like it is just adding extra languages to a list of languages, not actually using QLocale to

D25599: Fix plugin-metadata translations on windows

2019-12-04 Thread Hannah von Reth
vonreth added a comment. In D25599#571880 , @sars wrote: > So the conclusion is that we are not using setDefault() yet and ki18n & gettext uses the LANGUAGE env so the logical thing, for now, is to also use LANGUAGE env here in KCoreAddons for t

D25599: Fix plugin-metadata translations on windows

2019-12-04 Thread Kåre Särs
sars added a comment. So the conclusion is that we are not using setDefault() yet and ki18n & gettext uses the LANGUAGE env so the logical thing, for now, is to also use LANGUAGE env here in KCoreAddons for the plugin metadata translations? REPOSITORY R244 KCoreAddons REVISION DETAIL ht

D25599: Fix plugin-metadata translations on windows

2019-12-03 Thread Albert Astals Cid
aacid added a comment. In D25599#571398 , @vonreth wrote: > In D25599#571158 , @aacid wrote: > > > In D25599#570678 , @vonreth wrote: > > > > > Are you

D25599: Fix plugin-metadata translations on windows

2019-12-03 Thread Hannah von Reth
vonreth added a comment. In D25599#571158 , @aacid wrote: > In D25599#570678 , @vonreth wrote: > > > Are you sure? https://github.com/KDE/ki18n/blob/a5477f812c563ffd7fb08b6ec4bd573bc49bb76a/src/kloc

D25599: Fix plugin-metadata translations on windows

2019-12-02 Thread Albert Astals Cid
aacid added a comment. In D25599#570678 , @vonreth wrote: > Are you sure? https://github.com/KDE/ki18n/blob/a5477f812c563ffd7fb08b6ec4bd573bc49bb76a/src/klocalizedstring.cpp#L146 Sure about what? I don't know what that link is suppos

D25599: Fix plugin-metadata translations on windows

2019-12-02 Thread Hannah von Reth
vonreth added a comment. Are you sure? https://github.com/KDE/ki18n/blob/a5477f812c563ffd7fb08b6ec4bd573bc49bb76a/src/klocalizedstring.cpp#L146 REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D25599 To: sars, aacid, vonreth Cc: kde-frameworks-devel, LeGast00n, GB

D25599: Fix plugin-metadata translations on windows

2019-12-01 Thread Albert Astals Cid
aacid added a comment. In D25599#570372 , @sars wrote: > ki18n does not seem to use QLocale to get the language for translation It already does that on non unix appendLanguagesFromQLocale(localeLanguages, QLocale::system()); the

D25599: Fix plugin-metadata translations on windows

2019-12-01 Thread Hannah von Reth
vonreth added a comment. Well it sounds to me like we might need both. But the issue this pr tries to tackle would probably be gone with setDefault REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D25599 To: sars, aacid, vonreth Cc: kde-frameworks-devel, LeGast00

D25599: Fix plugin-metadata translations on windows

2019-12-01 Thread Kåre Särs
sars added a comment. ki18n does not seem to use QLocale to get the language for translation, but uses LANGUAGE env. Also gettext uses the env variable. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D25599 To: sars, aacid, vonreth Cc: kde-frameworks-devel, LeGa

D25599: Fix plugin-metadata translations on windows

2019-12-01 Thread Albert Astals Cid
aacid added a comment. To be honest i don't remember why we don't use setDefault. It's a solution we could investigate REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D25599 To: sars, aacid, vonreth Cc: kde-frameworks-devel, LeGast00n, GB_2, sdepiets, michael

D25599: Fix plugin-metadata translations on windows

2019-12-01 Thread Hannah von Reth
vonreth added a comment. Why can't we use setDefault? Your linked patch does not look like it would change the behaviour on Windows? REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D25599 To: sars, aacid, vonreth Cc: kde-frameworks-devel, LeGast00n, GB_2, sdepie

D25599: Fix plugin-metadata translations on windows

2019-12-01 Thread Albert Astals Cid
aacid added a comment. Right, but we set it in initializeLanguages. https://github.com/KDE/kxmlgui/blob/master/src/kswitchlanguagedialog_p.cpp#L81 I think the bug is that initializeLanguages should set the proper stuff in QLocale for windows too. I had this that fixes part of a

D25599: Fix plugin-metadata translations on windows

2019-12-01 Thread Hannah von Reth
vonreth added a comment. The doc doesn't mention the LANGUAGE var. QLocale::QLocale() Constructs a QLocale object initialized with the default locale. If no default locale was set using setDefault(), this locale will be the same as the one returned by system(). See al

D25599: Fix plugin-metadata translations on windows

2019-11-30 Thread Kåre Särs
sars added reviewers: aacid, vonreth. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D25599 To: sars, aacid, vonreth Cc: kde-frameworks-devel, LeGast00n, GB_2, sdepiets, michaelh, ngraham, bruns, cullmann, kfunk

D25599: Fix plugin-metadata translations on windows

2019-11-28 Thread Kåre Särs
sars created this revision. sars added a project: Windows. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. sars requested review of this revision. REVISION SUMMARY On Windows, the plugin metadata always follows the current region setting and any language set