[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-06-29 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

Julien Nabet  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |serval2...@yahoo.fr
   |desktop.org |
 Status|NEW |ASSIGNED

--- Comment #12 from Julien Nabet  ---
(In reply to Mike Kaganski from comment #11)
> (In reply to Julien Nabet from comment #10)
> 
> Please proceed with this - it is most likely the correct thing to do, and my
> code back then was overly defensive thinking, not knowing such facts.

Thank you for the feedback, I've submitted this on gerrit:
https://gerrit.libreoffice.org/c/core/+/153732

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-06-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

--- Comment #11 from Mike Kaganski  ---
(In reply to Julien Nabet from comment #10)

Please proceed with this - it is most likely the correct thing to do, and my
code back then was overly defensive thinking, not knowing such facts.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-06-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

--- Comment #10 from Julien Nabet  ---
Just for the record, with this patch, it works:
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx
b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 756866ad846e..62a7e75278bf 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -586,15 +586,11 @@ OUString getNumberText(const Locale& rLocale, const
OUString& rNumberString,
 for (i = 0; i < len; i++)
 {
 sal_Unicode ch = src[i];
-if (isNumber(ch))
+if (isNumber(ch) || ch == aSeparators.DecimalSeparator)
 {
 ++count;
 sBuf.append(ch);
 }
-else if (ch == aSeparators.DecimalSeparator)
-// Convert any decimal separator to point - in case libnumbertext
has a different one
-// for this locale (it seems that point is supported for all
locales in libnumbertext)
-sBuf.append('.');
 else if (ch == aSeparators.ThousandSeparator && count > 0)
 continue;
 else if (isMinus(ch) && count == 0)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-06-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

Mike Kaganski  changed:

   What|Removed |Added

 CC||er...@redhat.com

--- Comment #9 from Mike Kaganski  ---
(In reply to Julien Nabet from comment #8)

:)

https://gerrit.libreoffice.org/c/core/+/54375/ starts with:

> Eike: this is addressing your comment wrt decimals

... and I definitely am unable to recall what was that about. Maybe Eike has an
idea?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-06-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

--- Comment #8 from Julien Nabet  ---
Mike: I noticed this:
commit 7b5f5d77d56ee494647d9e7868546b3f2140896e
Author: Mike Kaganski 
Date:   Tue May 15 14:46:18 2018 +0100

NatNum spelling: also spell decimals

we got this in i18npool/source/nativenumber/nativenumbersupplier.cxx:
594 else if (ch == aSeparators.DecimalSeparator)
595 // Convert any decimal separator to point - in case
libnumbertext has a different one
596 // for this locale (it seems that point is supported for
all locales in libnumbertext)
597 sBuf.append('.');


see
https://opengrok.libreoffice.org/xref/core/i18npool/source/nativenumber/nativenumbersupplier.cxx?r=2a1d2d42#594

So it seems we replaced locale decimal separator by "." on purpose.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-06-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

--- Comment #7 from Mike Kaganski  ---
The issue is inside LibreOffice, because:

1. libnumbertext language data [1] has a distinctive feature for Spanish
(choose "es" in "Load" selector on that page, and examine the "regex" data in
'# decimals' section). For 'de', for example, both '.' and ',' are handled
together, showing 'Komma'; but for 'es', they are handled separately, showing
'punto' and 'coma', respectively.
2. NUMBERTEXT function from extension takes the number formatted using the cell
locale, which gives the correct separator, resulting in correct output.
3. In internal case, it seems, the number is formatted using the default
formatter, and relies on the libnumbertext library to process decimal point.
But here, as we see, it fails.

Two options:

1. Split 'es' into 'es-Country1', 'es-Country2', etc., to allow each variant
have own unified handling of both dot and comma. This should be in
libnumbertext, but is not desirable IMO, because it would produce mostly
duplicating data, put additional load on that project, which doesn't enjoy much
volunteer attention.

2. In LibreOffice, change the code that passes the number string to
libnumbertext, and at least replace the dot with the current locale decimal
separator. This is much easier, and IMO is superior solution.

[1] https://numbertext.github.io/Soros.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-06-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

Julien Nabet  changed:

   What|Removed |Added

 CC||mikekagan...@hotmail.com,
   ||serval2...@yahoo.fr

--- Comment #6 from Julien Nabet  ---
László/Mike: it works if in instdir/share/numbertext/es.sor I replace:
([-−]?\d+)[.] $1| punto
([-−]?\d+)[,] $1| coma
by:
"([-−]?\d+)[.,]" "$1| coma"

I took example on French file:
"([-−]?\d+)[.,]" "$1| virgule"

Now I don't know how to deal the fact that some expect "punto" others expect
"coma".
If I put:
"([-−]?\d+)[.]" "$1| punto"
"([-−]?\d+)[,]" "$1| coma"
it still displays "punto" whereas the number has been typed with ",".

I suppose there's an internal conversion into English format which uses "."

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-04-03 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

BogdanB  changed:

   What|Removed |Added

 CC||buzea.bog...@libreoffice.or
   ||g
 Blocks||113477


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=113477
[Bug 113477] [META] Decimal separator key bugs and enhancements
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-03-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

--- Comment #5 from ady  ---
I should add that some Spanish-speaking countries use point as decimal
separator ([1]) whereas others use comma.

Is "[NatNum12]" able to discern between countries according to cell's locale?
Or is it adjusting results depending on language of locale alone?

So, _if_ "[NatNum12]" number format has no way of distinguishing between
countries (only by language of locale), then there would be no effective way to
satisfy all users simultaneously by using the "[NatNum12]" format alone.

[1]:
https://en.wikipedia.org/wiki/Decimal_separator#Countries_using_decimal_point

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-03-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

ady  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #4 from ady  ---
Using attachment 184390 I can confirm that English, German and French all seem
correct for USA, Germany and France.

Both Spanish cells for the two respective countries shown in attachment 184390
are incorrect and should be as described in comment 0.

My doubt: is this really a LO bug? I don't have the extension mentioned in
comment 3 ATM.

I am inclined to set this to NEW for now, until proven differently. Doing so.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-01-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

--- Comment #3 from m.a.riosv  ---
Created attachment 184600
  --> https://bugs.documentfoundation.org/attachment.cgi?id=184600=edit
Format cell vs NUMBERTEXT function

Hi @raal, thanks.
But the issue doesn't happen with the extension and NUMBERTEXT() function.
To see the file, the extension is needed. The last 1.0.11 2022-11-13.
https://extensions.libreoffice.org/en/extensions/show/numbertext-1

So not clear for me where the issue happens. The UI English/Spanish does not
affect.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2023-01-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

raal  changed:

   What|Removed |Added

 CC||nem...@numbertext.org,
   ||r...@post.cz

--- Comment #2 from raal  ---
as I know, it uses library libnumbertext
https://github.com/Numbertext/libnumbertext and it's probably bug in this
library.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales that have comma as decimal separator, the format spell out point not coma.

2022-12-29 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

m.a.riosv  changed:

   What|Removed |Added

Summary|NatNum12 modifier, in the   |NatNum12 modifier, in the
   |Spanish locales, that have  |Spanish locales that have
   |comma as decimal separator, |comma as decimal separator,
   |the format spell out point  |the format spell out point
   |not coma.   |not coma.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152723] NatNum12 modifier, in the Spanish locales, that have comma as decimal separator, the format spell out point not coma.

2022-12-29 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152723

--- Comment #1 from m.a.riosv  ---
Created attachment 184390
  --> https://bugs.documentfoundation.org/attachment.cgi?id=184390=edit
Sample file showing the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.