You might want to take a look at KLocale or talk to John Layt about this. He is the KDE guy to go about Locales. He's currently on vacation, but we might get a hold of him here and there.<br><br>Please continue this discussion on the list, as the patch is already commited. At least until there's code to review again.<br>
<br><div class="gmail_quote">On Tue, Jan 4, 2011 at 9:43 PM, Allan Anderson <span dir="ltr"><<a href="mailto:agander93@gmail.com">agander93@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div style="font-family: Verdana,Arial,Helvetica,Sans-Serif;"><div class="im">
<table style="border: 1px solid rgb(201, 195, 153);" bgcolor="#f9f3c9" cellpadding="8" width="100%">
<tbody><tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/6238/" target="_blank">http://svn.reviewboard.kde.org/r/6238/</a>
</td>
</tr>
</tbody></table>
<br>
</div><blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;"><div class="im">
<p style="margin-top: 0pt;">On January 4th, 2011, 12:38 p.m., <b>Cristian Onet</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">I don't know if this ever worked but now that I can import my bank statement with this patch I have a problem with the amounts.
My bank has '.' as a decimal separator and ',' as thousands separator it seems that the plugin can't handle that. The text delimiter option seems to work fine.</pre>
</blockquote>
</div><p>On January 4th, 2011, 12:54 p.m., <b>Allan Anderson</b> wrote:</p><div class="im">
<blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">That's strange - those are my settings too. Also, in the file you sent, there is an item with a thousand separator and decimal point and that imports for me OK.
My first thought was your locale settings, but obviously that's daft as you'd have noticed that many moons ago.
What exactly happens? Can you import the file you sent to me? When I import it, all I have to do is set the field separator to ";" and it displays and imports perfectly.
If you are able to anonimize your file in question, I'd better have a look.
</pre>
</blockquote>
<p>On January 4th, 2011, 1:57 p.m., <b>Allan Anderson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">An after-thought. It looks like your bank and your locale aren't on speaking terms. If you haven't already tried this, could you temporarily switch to UK locale and try again, please?</pre>
</blockquote>
<p>On January 4th, 2011, 2:42 p.m., <b>Cristian Onet</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">Setting the decimal separator in locale to '.' fixes this problem but it leaves my system with a strange locale. AFAIK the MyMoneyMoney object takes the decimal/thousand separator decision based on which one is first (if they are both present) in the string.</pre>
</blockquote>
<p>On January 4th, 2011, 2:47 p.m., <b>Cristian Onet</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">Locale should matter when displaying data not when importing it.</pre>
</blockquote>
<p>On January 4th, 2011, 3:17 p.m., <b>Allan Anderson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">< Locale should matter when displaying data not when importing it.
But, how can it display correctly if it hasn't been imported correctly?
I've imported several files in 'EU' locale, by setting my locale appropriately, so to my naive thinking, it looks like the locale is involved.
What do you suggest? I would think that in the majority of cases, a user's file will be in his native locale, but obviously that can't now be taken for granted. The present UI already is pretty busy, and copes with most cases. What about, in the exceptional circumstance, allowing specification of the decimal separator in the resource file, so it's invisible in normal use?
</pre>
</blockquote>
</div><div class="im"><p>On January 4th, 2011, 3:51 p.m., <b>Cristian Onet</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid rgb(208, 208, 208); padding-left: 10px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">I would prefer autodetection but leave it as it is for now. Please submit the patch.</pre>
</blockquote>
</div></blockquote>
<pre style="white-space: pre-wrap; word-wrap: break-word;">Now that the patches are out of the way, I've had a quick and dirty first hack at this. With a file having 'EU' type ','
decimal separator, I've inserted a replace(',', 'locale version'), which does the trick. Needs more thought because the
decimal separator has now become a thousand separator, and I don't want to convert it back! How fussy are we about
thousand separators? Could I just remove them? Or, use my brain a bit more?
Then there's the question I raised about how to specify the separator. A couple of extra boxes could go in the UI,
but I don't like that idea as it's more for users to wade through. I would go for a flag in the resource file.
Normally it would not be set and no-one would be any the wiser. Except, when it's needed, the user specifies what
character/s need/s changing into the current locale equivalent.
Should I proceed?</pre>
<br><font color="#888888">
<p>- Allan</p></font><div><div></div><div class="h5">
<br>
<p>On December 30th, 2010, 7:05 p.m., Allan Anderson wrote:</p>
<table style="background-repeat: repeat-x; border: 1px solid black;" bgcolor="#fefadf" cellpadding="8" cellspacing="0" width="100%">
<tbody><tr>
<td>
<div>Review request for kmymoney.</div>
<div>By Allan Anderson.</div>
<p style="color: grey;"><i>Updated 2010-12-30 19:05:47</i></p>
<h1 style="color: rgb(87, 80, 18); font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table style="border: 1px solid rgb(184, 181, 160);" bgcolor="#ffffff" cellpadding="10" cellspacing="0" width="100%">
<tbody><tr>
<td>
<pre style="margin: 0pt; padding: 0pt; white-space: pre-wrap; word-wrap: break-word;">Wish-list Items:
Addition of UI text delimiter (" or ').
Addition of handling of line breaks within payee and memo fields.
Addition of handling of amount sign via a code in another field.
Bug fixes:
A much as possible, I've tried to preserve the user's column choices. With further testing and
live work, it was found that column choices from one file, could, in some circumstances, adversely
affect a following file having a different format. This in two cases led to KMM crashing or stack
corruption, through indexes going out of range. It was necessary to drop the preservation of memo
column settings between files, as the memo field is optional and not guaranteed to be wanted for
the following file. Also, better range checking of column choices.
Improved detection of conflicting columns during repeated changing of selections.
A couple of translation issues addressed.
Improvement:
Allow dates with no separators to be handled.
Tidy up (with white space changes, I'm afraid.
</pre>
</td>
</tr>
</tbody></table>
<h1 style="color: rgb(87, 80, 18); font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table style="border: 1px solid rgb(184, 181, 160);" bgcolor="#ffffff" cellpadding="10" cellspacing="0" width="100%">
<tbody><tr>
<td>
<pre style="margin: 0pt; padding: 0pt; white-space: pre-wrap; word-wrap: break-word;">Intensive stress testing of UI column choices. Many different format files used. Unit test improved.</pre>
</td>
</tr>
</tbody></table>
<h1 style="color: rgb(87, 80, 18); font-size: 10pt; margin-top: 1.5em;">Diffs </h1>
<ul style="margin-left: 3em; padding-left: 0pt;">
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/convdate.h <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/convdate.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvdatetest.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlgdecl.ui <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterplugin.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvprocessing.h <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvprocessing.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvutil.h <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvutil.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investmentdlg.h <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investmentdlg.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investmentdlgdecl.ui <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investprocessing.h <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investprocessing.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/redefinedlg.h <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/redefinedlg.cpp <span style="color: grey;">(1210268)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/redefinedlgdecl.ui <span style="color: grey;">(1210268)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/6238/diff/" style="margin-left: 3em;" target="_blank">View Diff</a></p>
</td>
</tr>
</tbody></table>
</div></div></div>
</div>
<br>_______________________________________________<br>
KMyMoney-devel mailing list<br>
<a href="mailto:KMyMoney-devel@kde.org">KMyMoney-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kmymoney-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kmymoney-devel</a><br>
<br></blockquote></div><br>