Locale settings in Plasma Next

Martin Klapetek martin.klapetek at gmail.com
Mon Mar 10 09:11:05 UTC 2014


Hey John,

On Sun, Feb 23, 2014 at 8:10 PM, John Layt <jlayt at kde.org> wrote:

> Hi,
>
> With the countdown to Plasma Next underway, I thought I'd better outline
> what
> needs to be done for locale settings, in particular the KCM, in case I
> don't
> find the time to do it.
>

Thanks for that ;)


> In KF5 we have switched to QLocale to remove the heavy dependency for KF5
> users and to better integrate with Qt apps and the host workspace.  I've
> been
> working on bringing QLocale up to scratch, but it doesn't yet have the
> ability
> to load and use the custom KDE settings when running under Plasma Next, it
> will only use the standard POSIX envvars.  This means that any changes
> made in
> the existing Locale KCM will be applied to KDE4 apps only, not KF5 apps
> that
> have removed the kde4support version of KLocale.  We need to decide the
> best
> way to deal with this.
>

Any ETA on the QLocale changes? Any particular plans with which we can
help? I'd be happy to help out there.


> What we can do in Plasma Next is allow users to separately choose which
> locale
> code to apply for each of the standard unix envars (LC_ALL, LC_NUMERIC,
> LC_TIME, LC_MONETARY, LC_MESSAGES, LC_MEASUREMENT, LANG), and have these
> apply
> to *all* apps running under Plasma Next by having kdeinit set them at
> start-
> up.  But how do we present that in a usable way in a KCM, and what do we do
> with the KDE4 settings and KCM?
>

Some sort of temporary/transient KCM comes to mind...we could simply list
the locale items ("Numeric system", "Time", "Money formatting"...) and
combobox next to it with available locales, presented as countries ("Czech
Republic", "Germany", "USA"...). It would be a bit ugly tho, but it would
serve its purpose. Or have no KCM at all...I imagine the percentage of
people setting different locales for each thing will be quite
minimal...plus we can advertise that this will come back later (whenever
QLocale is ready).


> For KDE4 apps running under Plasma Next, I wonder if it will be too
> confusing
> having them using different locale settings than the KF5 apps?  Perhaps on
> migrating from KDE4 to Plasma Next we delete any old user locale settings
> in
> kdeglobals and as a consequence the apps will use the same settings as all
> other apps under Plasma Next?  If we do keep the old settings, then we will
> probably also need to keep the old KCM available.
>

I'd be all for that, except that if people will have two sessions on their
PCs, one for KDE4 and the other for Next, try out Next one time and this
will nuke their KDE4 session settings, I imagine this will make them
unhappy. And I think this will be quite common use case from the beginning
as people will want to try things out. We could put a warning there, but
that might scare some people off = less testing. Can we just override the
KDE4 kdeglobals from Next? We could simply change the path or something and
then the KDE4 apps won't be reading the KDE4 session kdeglobals file.


> For the new Locale KCM we will need to remove the separate Numbers, Money,
> Calendar, Date & Time and Other tabs for now.  I'd suggest we no longer
> refer
> to the "Languages" tab but call it "Translations" instead, as that is what
> they really are, it configures how KLocalizedString works.  Referring to
> them
> as Languages has created a lot of confusion, as has the current gui, but
> I'm
> not sure how to make it better.  I'd also suggest changing the "Country"
> tab
> to "Formats", with a series of combo boxes to select the "Number Format",
> "Money Format", etc.  We may be able to merge the Formats and Translations
> tabs into one layout but I suspect that will be too crowded, so instead
> perhaps we should have them as separate KCMs so they appear listed
> separately
> in the System Settings Locale group and sidebar as Formats, Translations,
> and
> Spell-Checker.
>

Sounds good.


> One question is when these changes to the envvars will get applied, and the
> action required to apply them to the apps.  I believe Gnome forces you to
> log
> out and in again before the new envvars are applied.  In KDE4 you could
> simply
> restart individual apps, but to update Plasma itself you had to log out and
> in.  Do we update the envars as soon as the KCM changes are saved, which
> would
> allow apps to simply be restarted, or would that be considered dangerous
> for
> running apps that assume the envvars won't change, e.g. would something
> like
> glibc immediately pick up the change and return inconsistent results?
>

I think restarting Plasma while running would be easy. As to if it should
be considered dangerous, I'm not educated enough to answer that.


> I guess another obvious question is where to save the envvar settings, I
> guess
> kdeglobals still?  Or somewhere new?
>

Not sure about this either...


> Longer term we will need to restore the ability to edit the individual
> settings and I have a roadmap for that, but I'm expecting some negative
> user
> feedback in the meantime :-)
>

Will there be QLocale/QML Locale support for that too? That'd be great ;)

Cheers
-- 
Martin Klapetek | KDE Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140310/77ad9d00/attachment.html>


More information about the Plasma-devel mailing list