From: "rbuj at fedoraproject dot org" <sourceware-bugzilla@sourceware.org>
To: libc-locales@sourceware.org
Subject: [Bug localedata/23791] Wrong monetary format for ca_ES locale
Date: Fri, 26 Oct 2018 15:16:00 -0000 [thread overview]
Message-ID: <bug-23791-716-LLlL6aG7e9@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-23791-716@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=23791
--- Comment #12 from Robert Buj <rbuj at fedoraproject dot org> ---
Hi Sergi,
By default, grouping is disabled in locale.currency(val, symbol=True,
grouping=False, international=False)
https://docs.python.org/3/library/locale.html#locale.currency
Current result:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'ca_ES.UTF-8')
'ca_ES.UTF-8'
>>> locale.currency(-1234.5, grouping=True)
'-€ 1.234,50'
>>> locale.currency(-1234.5, grouping=True, international=True)
'-EUR 1.234,50'
>>> locale.setlocale(locale.LC_ALL, 'ca_ES.UTF-8')
'ca_ES.UTF-8'
>>> locale.currency(-1234.5, grouping=True)
'€ 1.234,50'
>>> locale.currency(-1234.5, grouping=True, international=True)
'EUR 1.234,50'
Expected result:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'ca_ES.UTF-8')
'ca_ES.UTF-8'
>>> locale.currency(-1234.5, grouping=True)
'-1.234,50 €'
>>> locale.currency(-1234.5, grouping=True, international=True)
'-1.234,50 EUR'
>>> locale.currency(1234.5, grouping=True)
'1.234,50 €'
>>> locale.currency(-1234.5, grouping=True, international=True)
'1.234,50 EUR'
The currency symbol succeeds the value. I agree with this:
p_cs_precedes 0 <<-- replace 1 with 0
n_cs_precedes 0 <<-- replace 1 with 0
You should also remove blank space in int_curr_symbol:
int_curr_symbol "EUR" <<-- replace "EUR " with "EUR"
You don't need to escape for the currency_symbol:
currency_symbol "€" <<-- replace "<U20AC>" with "€"
LC_NUMERIC is not used for LC_MONETARY, but you can keep this change for
numeric formatting.
grouping 3;3 <<-- replace 0;0 with 3;3
Regards,
Robert
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2018-10-26 15:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 9:46 [Bug localedata/23791] New: " sergi at koolpi dot com
2018-10-18 10:23 ` [Bug localedata/23791] " sergi at koolpi dot com
2018-10-18 10:23 ` sergi at koolpi dot com
2018-10-18 10:29 ` sergi at koolpi dot com
2018-10-18 18:10 ` keld at keldix dot com
2018-10-18 18:10 ` [Bug localedata/23791] New: " Keld Simonsen
2018-10-18 21:01 ` [Bug localedata/23791] " sergi at koolpi dot com
2018-10-21 9:03 ` Keld Simonsen
2018-10-18 21:01 ` sergi at koolpi dot com
2018-10-21 9:05 ` keld at keldix dot com
2018-10-22 11:09 ` jmontane at softcatala dot org
2018-10-22 11:54 ` jmontane at softcatala dot org
2018-10-22 15:12 ` sergi at koolpi dot com
2018-10-22 15:15 ` sergi at koolpi dot com
2018-10-26 12:06 ` rbuj at fedoraproject dot org
2018-10-26 15:16 ` rbuj at fedoraproject dot org [this message]
2018-10-26 15:46 ` rbuj at fedoraproject dot org
2018-10-26 19:25 ` rbuj at fedoraproject dot org
2018-10-29 12:31 ` sergi at koolpi dot com
2018-10-29 14:28 ` maiku.fabian at gmail dot com
2018-10-29 14:38 ` maiku.fabian at gmail dot com
2018-10-30 7:07 ` cvs-commit at gcc dot gnu.org
2018-10-30 8:29 ` maiku.fabian at gmail dot com
2018-10-30 8:31 ` maiku.fabian at gmail dot com
2019-01-31 17:18 ` cvs-commit at gcc dot gnu.org
2023-02-21 6:41 ` johnkaitlyn95 at gmail dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-23791-716-LLlL6aG7e9@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=libc-locales@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).