[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Request: better override functionality in locale settings
From:       Martin Klapetek <martin.klapetek () gmail ! com>
Date:       2014-08-28 8:48:20
Message-ID: CAPLgePrFPXZ8q0JyJa_Du7XBGP9nMhmjUG+n3gZiR1wxS=3y5g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Aug 28, 2014 at 10:37 AM, John Layt <john@layt.net> wrote:

> On 28 August 2014 09:28, Martin Klapetek <martin.klapetek@gmail.com>
> wrote:
> > On Wed, Aug 27, 2014 at 11:34 AM, Sebastian Kügler <sebas@kde.org>
> wrote:
> >>
> >>
> >> There's more than just metric and imperial. This page gives you a slight
> >> impression of the complexity:
> >>
> http://en.wikipedia.org/wiki/Imperial_units#Current_use_of_imperial_units
> >>
> >> A binary combobox is just not enough to portray this correctly.
> >
> >
> > I'm actually quite curious what does QLocale do with this complexity. Do
> > they really do
> >
> > if (en_GB) {
> >     beer_unit = pint;
> >     milk_unit = liter;
> >     etc...
> > }
> >
> > That would be quite strange. I'll investigate and post back.
>
> Yes, the locale code for each each category does determine what
> translations will get used for that category.  While Qt doesn't (yet)
> have that level of complexity, other toolkits may, such as glibc or
> gtk or Java or ICU.  We're setting a desktop-wide setting here, not
> just something for KDE/Qt apps only to use.
>

Oh right, the translations.

Well QLocale itself has only 3 values for measurements[1]:

 * Metric
 * ImperialUK
 * ImperialUS

So the complexity as described on the wiki seems to be "taken care of" by
QLocale. However there's no way to set that other than the LC variable,
which brings us back to square one :)

[1] - http://qt-project.org/doc/qt-5/qlocale.html#MeasurementSystem-enum

Cheers
-- 
Martin Klapetek | KDE Developer

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 28, 2014 \
at 10:37 AM, John Layt <span dir="ltr">&lt;<a href="mailto:john@layt.net" \
target="_blank">john@layt.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div class=""><div class="h5">On 28 August 2014 09:28, Martin Klapetek &lt;<a \
href="mailto:martin.klapetek@gmail.com">martin.klapetek@gmail.com</a>&gt; wrote:<br> \
&gt; On Wed, Aug 27, 2014 at 11:34 AM, Sebastian Kügler &lt;<a \
href="mailto:sebas@kde.org">sebas@kde.org</a>&gt; wrote:<br> &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; There&#39;s more than just metric and imperial. This page gives you a \
slight<br> &gt;&gt; impression of the complexity:<br>
&gt;&gt; <a href="http://en.wikipedia.org/wiki/Imperial_units#Current_use_of_imperial_units" \
target="_blank">http://en.wikipedia.org/wiki/Imperial_units#Current_use_of_imperial_units</a><br>
 &gt;&gt;<br>
&gt;&gt; A binary combobox is just not enough to portray this correctly.<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m actually quite curious what does QLocale do with this complexity. Do<br>
&gt; they really do<br>
&gt;<br>
&gt; if (en_GB) {<br>
&gt;        beer_unit = pint;<br>
&gt;        milk_unit = liter;<br>
&gt;        etc...<br>
&gt; }<br>
&gt;<br>
&gt; That would be quite strange. I&#39;ll investigate and post back.<br>
<br>
</div></div>Yes, the locale code for each each category does determine what<br>
translations will get used for that category.   While Qt doesn&#39;t (yet)<br>
have that level of complexity, other toolkits may, such as glibc or<br>
gtk or Java or ICU.   We&#39;re setting a desktop-wide setting here, not<br>
just something for KDE/Qt apps only to use.<br></blockquote><div><br></div><div>Oh \
right, the translations.</div><div><br></div><div>Well QLocale itself has only 3 \
values for measurements[1]:</div><div><br></div><div>  * Metric</div>

<div>  * ImperialUK</div><div>  * ImperialUS</div><div><br></div><div>So the \
complexity as described on the wiki seems to be &quot;taken care of&quot; by QLocale. \
However there&#39;s no way to set that other than the LC variable, which brings us \
back to square one :)</div>

<div><br></div><div>[1] - <a \
href="http://qt-project.org/doc/qt-5/qlocale.html#MeasurementSystem-enum">http://qt-pr \
oject.org/doc/qt-5/qlocale.html#MeasurementSystem-enum</a><br></div><div><br></div></div><div>Cheers</div>


-- <br><div><span style="color:rgb(102,102,102)">Martin Klapetek | KDE  \
Developer</span></div> </div></div>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic