localedata: Fix currency symbol position for eu_ES and gl_ES [BZ #34762]
Checks
| Context |
Check |
Description |
| redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
| linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
| redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
| linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
The Basque (eu_ES) and Galician (gl_ES) locales placed the currency
symbol before the amount (e.g. "€ 123,45") instead of after it
("123,45 €"). Both are languages of Spain and follow Spanish euro
conventions, where the symbol trails the amount, as reflected by CLDR
and by the existing es_ES and ca_ES locales.
Add tests to tst-fmon.data covering positive and negative values for
both these locales.
Reference:
gl - https://st.unicode.org/cldr-apps/v#r_compact/gl//
eu - https://st.unicode.org/cldr-apps/v#r_compact/eu//
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
---
I am not sure if more tests should be added (and where). I found similar tests
in tst-fmon.data and added my tests there.
localedata/Makefile | 2 ++
localedata/locales/eu_ES | 4 ++--
localedata/locales/eu_ES@euro | 4 ++--
localedata/locales/gl_ES | 4 ++--
localedata/tst-fmon.data | 8 ++++++++
5 files changed, 16 insertions(+), 6 deletions(-)
@@ -339,6 +339,7 @@ LOCALES := \
eo.UTF-8 \
es_ES.UTF-8 \
et_EE.UTF-8 \
+ eu_ES.UTF-8 \
fa_IR.UTF-8 \
fi_FI.UTF-8 \
fil_PH.UTF-8 \
@@ -347,6 +348,7 @@ LOCALES := \
fr_FR.UTF-8 \
fur_IT.UTF-8 \
gez_ER.UTF-8@abegede \
+ gl_ES.UTF-8 \
ha_NG.UTF-8 \
hr_HR.ISO-8859-2 \
hr_HR.UTF-8 \
@@ -79,9 +79,9 @@ positive_sign ""
negative_sign "-"
int_frac_digits 2
frac_digits 2
-p_cs_precedes 1
+p_cs_precedes 0
p_sep_by_space 1
-n_cs_precedes 1
+n_cs_precedes 0
n_sep_by_space 1
p_sign_posn 1
n_sign_posn 1
@@ -65,9 +65,9 @@ positive_sign ""
negative_sign "-"
int_frac_digits 0
frac_digits 0
-p_cs_precedes 1
+p_cs_precedes 0
p_sep_by_space 1
-n_cs_precedes 1
+n_cs_precedes 0
n_sep_by_space 1
p_sign_posn 1
n_sign_posn 1
@@ -75,9 +75,9 @@ positive_sign ""
negative_sign "-"
int_frac_digits 2
frac_digits 2
-p_cs_precedes 1
+p_cs_precedes 0
p_sep_by_space 1
-n_cs_precedes 1
+n_cs_precedes 0
n_sep_by_space 1
p_sign_posn 1
n_sign_posn 1
@@ -133,6 +133,14 @@ en_US.ISO-8859-1 %#5n 123.45 $ 123.45
en_US.ISO-8859-1 %#5n -123.45 -$ 123.45
en_US.ISO-8859-1 %#5n 3456.781 $ 3,456.78
#
+# check Basque (Spain) has currency symbol after the amount
+eu_ES.UTF-8 %n 123.45 123,45 €
+eu_ES.UTF-8 %n -123.45 -123,45 €
+#
+# check Galician (Spain) has currency symbol after the amount
+gl_ES.UTF-8 %n 123.45 123,45 €
+gl_ES.UTF-8 %n -123.45 -123,45 €
+#
# check all cs_precedes/sign_posn/sep_by_space combinations using
# special test locales. The six characters after the "_" indicate
# these three values for positive and then negative quantities.