Added definition for new locale en_EU

Message ID 20240109232320.8942-1-yingxiang.yao@kasumi321.de
State New
Headers
Series Added definition for new locale en_EU |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed

Commit Message

Yingxiang Yao Jan. 9, 2024, 11:23 p.m. UTC
  Hello,

I am writing to propose the definition of new locale en_EU, intended to use as a common locale code for the english language used in continental Europe.


Regards,

Yingxiang Yao

---
 localedata/locales/en_EU | 163 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 163 insertions(+)
 create mode 100644 localedata/locales/en_EU
  

Comments

Vincent Lefevre Jan. 10, 2024, 1:07 a.m. UTC | #1
Hi,

On 2024-01-10 00:23:21 +0100, Yingxiang Yao wrote:
> I am writing to propose the definition of new locale en_EU, intended to use as a common locale code for the english language used in continental Europe.
[...]
> +mon_decimal_point    ","
> +mon_thousands_sep    "."

AFAIK, the use of the dot for the thousands separator is nowadays
strongly discouraged as it can be confused with the decimal point
in an international context.

See also https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping
  
Andreas K. Huettel Jan. 11, 2024, 3:10 p.m. UTC | #2
This sounds like an excellent idea.

Am Mittwoch, 10. Januar 2024, 00:23:21 CET schrieb Yingxiang Yao:
> Hello,
> 
> I am writing to propose the definition of new locale en_EU, intended to use as a common locale code for the english language used in continental Europe.
> 
> 
> Regards,
> 
> Yingxiang Yao
> 
> ---
>  localedata/locales/en_EU | 163 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 163 insertions(+)
>  create mode 100644 localedata/locales/en_EU
> 
> diff --git a/localedata/locales/en_EU b/localedata/locales/en_EU
> new file mode 100644
> index 0000000000..5c84a1ef9e
> --- /dev/null
> +++ b/localedata/locales/en_EU
> @@ -0,0 +1,163 @@
> +comment_char %
> +escape_char /
> +
> +% This file is part of the GNU C Library and contains locale data.
> +% The Free Software Foundation does not claim any copyright interest
> +% in the locale data contained in this file.  The foregoing does not
> +% affect the license of the GNU C Library as a whole.  It does not
> +% exempt you from the conditions of the license if your use would
> +% otherwise be governed by that license.
> +
> +% English language locale for the European Union
> +% Contact "Yingxiang Yao"
> +% Email "yingxiang.yao@kasumi321.de"
> +% Written according to POSIX.2
> +% ISO/IEC 9945-2:1993 specifications
> +% Based on implementation of en-DK
> +
> +
> +LC_IDENTIFICATION
> +title      "English locale for European Union"
> +source     "Free Software Foundation, Inc."
> +address    "https:////www.gnu.org//software//libc//"
> +contact    ""
> +email      "bug-glibc-locales@gnu.org"
> +tel        ""
> +fax        ""
> +language   "English"
> +territory  "European Union"
> +revision   "1.0"
> +date       "2024-01-09"
> +
> +category "i18n:2012";LC_IDENTIFICATION
> +category "i18n:2012";LC_CTYPE
> +category "i18n:2012";LC_COLLATE
> +category "i18n:2012";LC_TIME
> +category "i18n:2012";LC_NUMERIC
> +category "i18n:2012";LC_MONETARY
> +category "i18n:2012";LC_MESSAGES
> +category "i18n:2012";LC_PAPER
> +category "i18n:2012";LC_NAME
> +category "i18n:2012";LC_ADDRESS
> +category "i18n:2012";LC_TELEPHONE
> +category "i18n:2012";LC_MEASUREMENT
> +END LC_IDENTIFICATION
> +
> +LC_COLLATE
> +copy "iso14651_t1"
> +END LC_COLLATE
> +
> +LC_CTYPE
> +copy "en_GB"
> +END LC_CTYPE
> +
> +% Actually not all EU countries are using Euro, but to keep the stuff not to complex, I still make it as following
> +LC_MONETARY
> +int_curr_symbol      "EUR "
> +currency_symbol      "€"
> +mon_decimal_point    ","
> +mon_thousands_sep    "."
> +mon_grouping         3;3
> +positive_sign        ""
> +negative_sign        "-"
> +int_frac_digits      2
> +frac_digits          2
> +p_cs_precedes        1
> +p_sep_by_space       0
> +n_cs_precedes        1
> +n_sep_by_space       0
> +p_sign_posn          1
> +n_sign_posn          1
> +END LC_MONETARY
> +
> +LC_NUMERIC
> +decimal_point        ","
> +thousands_sep        "."
> +grouping             3;3
> +END LC_NUMERIC
> +
> +LC_TIME
> +abday    "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
> +day      "Sunday";/
> +	 "Monday";/
> +	 "Tuesday";/
> +	 "Wednesday";/
> +	 "Thursday";/
> +	 "Friday";/
> +	 "Saturday"
> +abmon    "Jan";"Feb";/
> +	 "Mar";"Apr";/
> +	 "May";"Jun";/
> +	 "Jul";"Aug";/
> +	 "Sep";"Oct";/
> +	 "Nov";"Dec"
> +mon      "January";/
> +	 "February";/
> +	 "March";/
> +	 "April";/
> +	 "May";/
> +	 "June";/
> +	 "July";/
> +	 "August";/
> +	 "September";/
> +	 "October";/
> +	 "November";/
> +	 "December"
> +% date formats following ISO 8601-1988
> +d_t_fmt  "%Y-%m-%dT%T %Z"
> +date_fmt "%Y-%m-%dT%T %Z"
> +d_fmt    "%Y-%m-%d"
> +t_fmt    "%T"
> +am_pm    "";""
> +t_fmt_ampm  ""
> +week    7;19971130;4
> +first_weekday 2
> +END LC_TIME
> +
> +LC_MESSAGES
> +% en_EU is used as some sort of generic continental
> +% European English locale. Therefore, it makes sense to have matches
> +% for more than just English in yesexpr:
> +% + is used in many applications for yes (- for no)
> +% 1 is common yes, 0 is common no, - langage neutral
> +% Jj is Danish/German/Swedish/Norwegian/Dutch "ja"
> +% sS is Spanish/Italian "si"
> +% yY is English "yes"
> +% oO is French "oui"
> +yesexpr "^[+1yYjJsSoO]"
> +noexpr  "^[-0nN]"
> +yesstr  "yes"
> +nostr   "no"
> +END LC_MESSAGES
> +
> +LC_PAPER
> +copy "i18n"
> +END LC_PAPER
> +
> +LC_TELEPHONE
> +tel_int_fmt    "+%c %a %l"
> +tel_dom_fmt    "%A %l"
> +int_select     "00"
> +END LC_TELEPHONE
> +
> +LC_MEASUREMENT
> +copy "i18n"
> +END LC_MEASUREMENT
> +
> +LC_NAME
> +name_fmt    "%d%t%g%t%m%t%f"
> +END LC_NAME
> +
> +
> +LC_ADDRESS
> +postal_fmt    "%f%N%a%N%d%N%b%N%s %h %e %r%N%z %T%N%c%N"
> +country_name "European Union"
> +country_ab2 "EU"
> +% country_ab3 "EUU" no 3 digit code is defined for EU
> +% country_num 208 no country number is defined for EU
> +% country_car    "EU" no car plate code is defined for EU
> +lang_name     "English"
> +lang_ab      "en"
> +lang_term    "eng"
> +lang_lib    "eng"
> +END LC_ADDRESS
>
  
Florian Weimer Jan. 11, 2024, 6:45 p.m. UTC | #3
* Yingxiang Yao:

> I am writing to propose the definition of new locale en_EU, intended
> to use as a common locale code for the english language used in
> continental Europe.

Should it be en_EZ, given that it uses the Euro sign?

> +% date formats following ISO 8601-1988
> +d_t_fmt  "%Y-%m-%dT%T %Z"
> +date_fmt "%Y-%m-%dT%T %Z"

I think the correct syntax is "%Y-%m-%dT%T%:z"
(lowercase z instead of Z).

Some people will prefer a space instead of T, although that's
not ISO 8601 syntax.

> +d_fmt    "%Y-%m-%d"
> +t_fmt    "%T"
> +am_pm    "";""
> +t_fmt_ampm  ""
> +week    7;19971130;4
> +first_weekday 2

Not sure about the mechanics for those.  What do others think?

Thanks,
Florian
  
Yingxiang Yao Jan. 19, 2024, 1:35 p.m. UTC | #4
Hello Florian,

I adapted the change for thousands separator. For the locale name, I would like keep it to en_EU instead of en_EZ for a better understanding, since there
is no (official) abbreviation for Euro Zone.




Yingxiang Yao (1):
  Change thousands separator to space

 localedata/locales/en_EU | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  
Vincent Lefevre Jan. 19, 2024, 1:45 p.m. UTC | #5
Hi,

On 2024-01-19 14:31:25 +0100, Yingxiang Yao wrote:
> I adapted the change for thousands separator.
[...]
> Yingxiang Yao (1):
>   Change thousands separator to space

A normal space may be an issue when reading numbers as data are often
separated by whitespace. FYI, a (non-breaking) thin space is usually
recommended. Following this practice, the fr_FR.utf8 locale currently
uses U+202F NARROW NO-BREAK SPACE (e2 80 af).
  

Patch

diff --git a/localedata/locales/en_EU b/localedata/locales/en_EU
new file mode 100644
index 0000000000..5c84a1ef9e
--- /dev/null
+++ b/localedata/locales/en_EU
@@ -0,0 +1,163 @@ 
+comment_char %
+escape_char /
+
+% This file is part of the GNU C Library and contains locale data.
+% The Free Software Foundation does not claim any copyright interest
+% in the locale data contained in this file.  The foregoing does not
+% affect the license of the GNU C Library as a whole.  It does not
+% exempt you from the conditions of the license if your use would
+% otherwise be governed by that license.
+
+% English language locale for the European Union
+% Contact "Yingxiang Yao"
+% Email "yingxiang.yao@kasumi321.de"
+% Written according to POSIX.2
+% ISO/IEC 9945-2:1993 specifications
+% Based on implementation of en-DK
+
+
+LC_IDENTIFICATION
+title      "English locale for European Union"
+source     "Free Software Foundation, Inc."
+address    "https:////www.gnu.org//software//libc//"
+contact    ""
+email      "bug-glibc-locales@gnu.org"
+tel        ""
+fax        ""
+language   "English"
+territory  "European Union"
+revision   "1.0"
+date       "2024-01-09"
+
+category "i18n:2012";LC_IDENTIFICATION
+category "i18n:2012";LC_CTYPE
+category "i18n:2012";LC_COLLATE
+category "i18n:2012";LC_TIME
+category "i18n:2012";LC_NUMERIC
+category "i18n:2012";LC_MONETARY
+category "i18n:2012";LC_MESSAGES
+category "i18n:2012";LC_PAPER
+category "i18n:2012";LC_NAME
+category "i18n:2012";LC_ADDRESS
+category "i18n:2012";LC_TELEPHONE
+category "i18n:2012";LC_MEASUREMENT
+END LC_IDENTIFICATION
+
+LC_COLLATE
+copy "iso14651_t1"
+END LC_COLLATE
+
+LC_CTYPE
+copy "en_GB"
+END LC_CTYPE
+
+% Actually not all EU countries are using Euro, but to keep the stuff not to complex, I still make it as following
+LC_MONETARY
+int_curr_symbol      "EUR "
+currency_symbol      "€"
+mon_decimal_point    ","
+mon_thousands_sep    "."
+mon_grouping         3;3
+positive_sign        ""
+negative_sign        "-"
+int_frac_digits      2
+frac_digits          2
+p_cs_precedes        1
+p_sep_by_space       0
+n_cs_precedes        1
+n_sep_by_space       0
+p_sign_posn          1
+n_sign_posn          1
+END LC_MONETARY
+
+LC_NUMERIC
+decimal_point        ","
+thousands_sep        "."
+grouping             3;3
+END LC_NUMERIC
+
+LC_TIME
+abday    "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
+day      "Sunday";/
+	 "Monday";/
+	 "Tuesday";/
+	 "Wednesday";/
+	 "Thursday";/
+	 "Friday";/
+	 "Saturday"
+abmon    "Jan";"Feb";/
+	 "Mar";"Apr";/
+	 "May";"Jun";/
+	 "Jul";"Aug";/
+	 "Sep";"Oct";/
+	 "Nov";"Dec"
+mon      "January";/
+	 "February";/
+	 "March";/
+	 "April";/
+	 "May";/
+	 "June";/
+	 "July";/
+	 "August";/
+	 "September";/
+	 "October";/
+	 "November";/
+	 "December"
+% date formats following ISO 8601-1988
+d_t_fmt  "%Y-%m-%dT%T %Z"
+date_fmt "%Y-%m-%dT%T %Z"
+d_fmt    "%Y-%m-%d"
+t_fmt    "%T"
+am_pm    "";""
+t_fmt_ampm  ""
+week    7;19971130;4
+first_weekday 2
+END LC_TIME
+
+LC_MESSAGES
+% en_EU is used as some sort of generic continental
+% European English locale. Therefore, it makes sense to have matches
+% for more than just English in yesexpr:
+% + is used in many applications for yes (- for no)
+% 1 is common yes, 0 is common no, - langage neutral
+% Jj is Danish/German/Swedish/Norwegian/Dutch "ja"
+% sS is Spanish/Italian "si"
+% yY is English "yes"
+% oO is French "oui"
+yesexpr "^[+1yYjJsSoO]"
+noexpr  "^[-0nN]"
+yesstr  "yes"
+nostr   "no"
+END LC_MESSAGES
+
+LC_PAPER
+copy "i18n"
+END LC_PAPER
+
+LC_TELEPHONE
+tel_int_fmt    "+%c %a %l"
+tel_dom_fmt    "%A %l"
+int_select     "00"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "i18n"
+END LC_MEASUREMENT
+
+LC_NAME
+name_fmt    "%d%t%g%t%m%t%f"
+END LC_NAME
+
+
+LC_ADDRESS
+postal_fmt    "%f%N%a%N%d%N%b%N%s %h %e %r%N%z %T%N%c%N"
+country_name "European Union"
+country_ab2 "EU"
+% country_ab3 "EUU" no 3 digit code is defined for EU
+% country_num 208 no country number is defined for EU
+% country_car    "EU" no car plate code is defined for EU
+lang_name     "English"
+lang_ab      "en"
+lang_term    "eng"
+lang_lib    "eng"
+END LC_ADDRESS