[v2] nl_NL locale: Correct the negative monetary format (bug 24614).

Message ID 165094442.1765746.1560203897884@poczta.nazwa.pl
State Committed
Headers

Commit Message

Rafal Luzynski June 10, 2019, 9:58 p.m. UTC
  Florian (and others), is this the patch you would like?

Regards,

Rafal


-- >8 --

According to CLDR 35.1 and the bug report the correct monetary format
for negative amounts should be "EUR -1 234,56" while previously it was
"EUR 1 234,56-".

This patch does not change the thousands (grouping) separator.

	[BZ #24614]
	* localedata/Makefile (LOCALES): Add nl_NL.UTF-8.
	* localedata/locales/nl_NL (n_sep_by_space): Set to 2 (a space
	between the currency symbol and the minus sign).
	(n_sign_posn): Set to 4 (the minus sign after the currency symbol).
	* localedata/tst-strfmon1.c (tests): Add test data for nl_NL.UTF-8.
---
 localedata/Makefile       | 1 +
 localedata/locales/nl_NL  | 4 ++--
 localedata/tst-strfmon1.c | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)
  

Comments

Florian Weimer June 17, 2019, 11:27 a.m. UTC | #1
* Rafal Luzynski:

> 	[BZ #24614]
> 	* localedata/Makefile (LOCALES): Add nl_NL.UTF-8.
> 	* localedata/locales/nl_NL (n_sep_by_space): Set to 2 (a space
> 	between the currency symbol and the minus sign).
> 	(n_sign_posn): Set to 4 (the minus sign after the currency symbol).
> 	* localedata/tst-strfmon1.c (tests): Add test data for nl_NL.UTF-8.

I do not have an opinion on the change itself, but the implementation
looks fine to me.

Thanks,
Florian
  
Rafal Luzynski June 17, 2019, 2:29 p.m. UTC | #2
17.06.2019 13:27 Florian Weimer <fweimer@redhat.com> wrote:
> 
> * Rafal Luzynski:
> 
> > 	[BZ #24614]
> > 	* localedata/Makefile (LOCALES): Add nl_NL.UTF-8.
> > 	* localedata/locales/nl_NL (n_sep_by_space): Set to 2 (a space
> > 	between the currency symbol and the minus sign).
> > 	(n_sign_posn): Set to 4 (the minus sign after the currency symbol).
> > 	* localedata/tst-strfmon1.c (tests): Add test data for nl_NL.UTF-8.
> 
> I do not have an opinion on the change itself, but the implementation
> looks fine to me.

Thank you, Florian.  Your answer is sufficient for me, I read it as
"no objections" and I'm going to push this patch tonight.

Regards,

Rafal
  
Rafal Luzynski June 17, 2019, 11:27 p.m. UTC | #3
The patch has been pushed.

Regards,

Rafal
  

Patch

diff --git a/localedata/Makefile b/localedata/Makefile
index 65079f9eb8..586a58e1b2 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -245,6 +245,7 @@  LOCALES := \
 	nan_TW.UTF-8@latin \
 	nb_NO.ISO-8859-1 \
 	nb_NO.UTF-8 \
+	nl_NL.UTF-8 \
 	nn_NO.ISO-8859-1 \
 	om_KE.UTF-8 \
 	os_RU.UTF-8 \
diff --git a/localedata/locales/nl_NL b/localedata/locales/nl_NL
index 1ab3277aa0..d0ba6c7283 100644
--- a/localedata/locales/nl_NL
+++ b/localedata/locales/nl_NL
@@ -83,9 +83,9 @@  frac_digits               2
 p_cs_precedes             1
 p_sep_by_space            1
 n_cs_precedes             1
-n_sep_by_space            1
+n_sep_by_space            2
 p_sign_posn               1
-n_sign_posn               2
+n_sign_posn               4
 END LC_MONETARY
 
 LC_NUMERIC
diff --git a/localedata/tst-strfmon1.c b/localedata/tst-strfmon1.c
index 8292a6cad5..abad43114a 100644
--- a/localedata/tst-strfmon1.c
+++ b/localedata/tst-strfmon1.c
@@ -12,7 +12,8 @@  static const struct
     { "de_DE.ISO-8859-1", "|-12,34 EUR|-12,34|" },
     { "da_DK.ISO-8859-1", "|kr. -12,34|-12,34|" },
     { "zh_TW.EUC-TW", "|-NT$12.34|-12.34|" },
-    { "sv_SE.ISO-8859-1", "|-12,34 kr|-12,34|" }
+    { "sv_SE.ISO-8859-1", "|-12,34 kr|-12,34|" },
+    { "nl_NL.UTF-8", "|\u20ac -12,34|-12,34|" },
   };
 #define ntests (sizeof (tests) / sizeof (tests[0]))