<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 29, 2018 at 2:11 PM, Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias@opengis.ch" target="_blank">matthias@opengis.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span class="">
On 06/29/2018 07:01 AM, Alessandro Pasotti wrote:<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Fri, Jun 29, 2018 at 12:28 PM,
Tobias Wendorff <span dir="ltr"><<a href="mailto:tobias.wendorff@tu-dortmund.de" target="_blank">tobias.wendorff@tu-dortmund.<wbr>de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Am Fr, 29.06.2018, 12:20 schrieb Alessandro
Pasotti:<br>
> No: not yet, for now you need to change your
operating system<br>
> settings but nothing prevents us to implement this
as an override<br>
> in the QGIS options locale section.<br>
<br>
</span>I've give an +1.0000E+12 on this :D<br>
<span><br>
>> The new settings<br>
>> are damn annoying... My FIDs look like
1.000.400 :(<br>
>><br>
> This is how numbers are supposed to look in your
(german?) locale.<br>
<br>
</span>Exactly, f.e. locale for money "1.000.000,00 Euro"<br>
<br>
</blockquote>
</div>
<br>
</div>
<div class="gmail_extra">I looked into this: the problem is that
you can customize the group separator (thousands) and/or omit
it completely but you cannot customize the decimal point
without changing the whole locale (the locale also defines
currency and other settings that are not currently used by
QGIS).</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">So, the best solution here would
probably be:</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">- allow the user to override system
locale as a whole (same widget that we have for the
translations)</div>
<div class="gmail_extra">- add an option to omit the group
separator</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">This way you could set QGIS to have the
decimal point from your locale or from any other locale and
you could set it to omit the group separator, but you would
not be able to choose a group separator different from the
locale you selected.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">How does it sound?<br>
</div>
<div class="gmail_extra"><br>
</div>
</div>
</blockquote>
<br></span>
What do you think about a radio button for Number formatting<br></div></blockquote><div><br></div><div>The problem is that QLocale does not allow to only format numbers: you get all from a locale (date, currency etc.) or none, which is not currently a big problem because we only format dates and numbers (AFAIK), but using QLocale::setDefault at the application level seems to me the right solution for the long term.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<br>
- "According to system locale"<br>
- "According to locale [combobox]"<br>
- "No formatting"<br></div></blockquote><div><br></div><div><br></div><div>I'm afraid that the last one requires changes through all the code and the implementation of custom validators and custom widgets, so I believe it's a no go, unless we wanted to go back to UI inconsistencies where some widgets use system locale (scale and coordinates to cite some) and some other don't and get back to a certain number of bugs that this implementation fixed.</div><div><br></div><br></div><div class="gmail_quote">I'm working on my proposed solution, let's see if that suit all needs (I think it should: at least you should have the "old" behavior with dot and no group separator without the old inconsistencies).</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Btw, there is already a workaround: change your number formatting options at the operating system level and QGIS will respect your choices.<br></div></div><div class="gmail_extra"><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div></div>