Fix typos in LC_TELEPHONE in i18n locale

Message ID s9d4mh6wner.fsf@ari.site
State Superseded
Headers

Commit Message

Mike FABIAN Nov. 1, 2015, 12:53 a.m. UTC
  There seem to be two typos in tel_int_fmt in LC_TELEPHONE
in glibc/localedata/locales/i18n. The attached patch fixes this.
  

Comments

Mike Frysinger Nov. 3, 2015, 2:24 a.m. UTC | #1
On 01 Nov 2015 09:53, Mike FABIAN wrote:
>     * locales/i18n: fix typos (tel_int_fmt "+%c +a +l" -> "+%c %a %l")

this looks correct

>  % This is the ISO/IEC 14652 "i18n" definition for
>  % the LC_TELEPHONE category.
>  %
> -tel_int_fmt    "<U002B><U0025><U0063><U0020><U002B><U0061><U0020><U002B>/
> +tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
>  <U006C>"

when i look up the spec, i find:
http://www.open-std.org/jtc1/SC22/WG20/docs/n972-14652ft.pdf

% "+%c %a%t%l"
tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0025><U0074><U0025><U006C>"

any idea why it says to use %t but we use a space instead ?
-mike
  
Mike FABIAN Nov. 3, 2015, 5:19 a.m. UTC | #2
Mike Frysinger <vapier@gentoo.org> wrote:

> On 01 Nov 2015 09:53, Mike FABIAN wrote:
>>     * locales/i18n: fix typos (tel_int_fmt "+%c +a +l" -> "+%c %a %l")
>
> this looks correct
>
>>  % This is the ISO/IEC 14652 "i18n" definition for
>>  % the LC_TELEPHONE category.
>>  %
>> -tel_int_fmt    "<U002B><U0025><U0063><U0020><U002B><U0061><U0020><U002B>/
>> +tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
>>  <U006C>"
>
> when i look up the spec, i find:
> http://www.open-std.org/jtc1/SC22/WG20/docs/n972-14652ft.pdf
>
> % "+%c %a%t%l"
> tel_int_fmt
> "<U002B><U0025><U0063><U0020><U0025><U0061><U0025><U0074><U0025><U006C>"
>
> any idea why it says to use %t but we use a space instead ?
> -mike

I have no idea either. The spec you quote says:

%a area code without nationwide prefix (prefix is often <0>).
%A area code including nationwide prefix (prefix is often <0>).
%l local number (within area code).
%e extension (to local number)
%c country code
%C alternate carrier service code used for dialling abroad
%t Insert a <space> if the previous descriptor’s value was not an empty
   string; otherwise ignore.

So the %t would make a difference if %a happens to be empty, it
would avoid a double space then. I don't know whether it is possible
for %a to be empty. Sounds weird, are there countries which have
no area code?

Shall I make a new patch with the %t? The %t cannot hurt.
  
keld@keldix.com Nov. 3, 2015, 7:37 a.m. UTC | #3
On Tue, Nov 03, 2015 at 02:19:45PM +0900, Mike FABIAN wrote:
> Mike Frysinger <vapier@gentoo.org> wrote:
> 
> > On 01 Nov 2015 09:53, Mike FABIAN wrote:
> >>     * locales/i18n: fix typos (tel_int_fmt "+%c +a +l" -> "+%c %a %l")
> >
> > this looks correct
> >
> >>  % This is the ISO/IEC 14652 "i18n" definition for
> >>  % the LC_TELEPHONE category.
> >>  %
> >> -tel_int_fmt    "<U002B><U0025><U0063><U0020><U002B><U0061><U0020><U002B>/
> >> +tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
> >>  <U006C>"
> >
> > when i look up the spec, i find:
> > http://www.open-std.org/jtc1/SC22/WG20/docs/n972-14652ft.pdf
> >
> > % "+%c %a%t%l"
> > tel_int_fmt
> > "<U002B><U0025><U0063><U0020><U0025><U0061><U0025><U0074><U0025><U006C>"
> >
> > any idea why it says to use %t but we use a space instead ?
> > -mike
> 
> I have no idea either. The spec you quote says:
> 
> %a area code without nationwide prefix (prefix is often <0>).
> %A area code including nationwide prefix (prefix is often <0>).
> %l local number (within area code).
> %e extension (to local number)
> %c country code
> %C alternate carrier service code used for dialling abroad
> %t Insert a <space> if the previous descriptor???s value was not an empty
>    string; otherwise ignore.
> 
> So the %t would make a difference if %a happens to be empty, it
> would avoid a double space then. I don't know whether it is possible
> for %a to be empty. Sounds weird, are there countries which have
> no area code?
> 
> Shall I make a new patch with the %t? The %t cannot hurt.

Yes, there are countries without area codes, such as Denmark and Norway.

Best regards
keld
  
Mike FABIAN Nov. 3, 2015, 7:44 a.m. UTC | #4
keld@keldix.com wrote:

> On Tue, Nov 03, 2015 at 02:19:45PM +0900, Mike FABIAN wrote:
>> Mike Frysinger <vapier@gentoo.org> wrote:
>> 
>> > On 01 Nov 2015 09:53, Mike FABIAN wrote:
>> >>     * locales/i18n: fix typos (tel_int_fmt "+%c +a +l" -> "+%c %a %l")
>> >
>> > this looks correct
>> >
>> >>  % This is the ISO/IEC 14652 "i18n" definition for
>> >>  % the LC_TELEPHONE category.
>> >>  %
>> >> -tel_int_fmt    "<U002B><U0025><U0063><U0020><U002B><U0061><U0020><U002B>/
>> >> +tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
>> >>  <U006C>"
>> >
>> > when i look up the spec, i find:
>> > http://www.open-std.org/jtc1/SC22/WG20/docs/n972-14652ft.pdf
>> >
>> > % "+%c %a%t%l"
>> > tel_int_fmt
>> > "<U002B><U0025><U0063><U0020><U0025><U0061><U0025><U0074><U0025><U006C>"
>> >
>> > any idea why it says to use %t but we use a space instead ?
>> > -mike
>> 
>> I have no idea either. The spec you quote says:
>> 
>> %a area code without nationwide prefix (prefix is often <0>).
>> %A area code including nationwide prefix (prefix is often <0>).
>> %l local number (within area code).
>> %e extension (to local number)
>> %c country code
>> %C alternate carrier service code used for dialling abroad
>> %t Insert a <space> if the previous descriptor???s value was not an empty
>>    string; otherwise ignore.
>> 
>> So the %t would make a difference if %a happens to be empty, it
>> would avoid a double space then. I don't know whether it is possible
>> for %a to be empty. Sounds weird, are there countries which have
>> no area code?
>> 
>> Shall I make a new patch with the %t? The %t cannot hurt.
>
> Yes, there are countries without area codes, such as Denmark and Norway.

Good, I’ll make a new patch adding the %t then.
  
Mike Frysinger March 5, 2016, 5:08 p.m. UTC | #5
On 03 Nov 2015 16:44, Mike FABIAN wrote:
> Good, I’ll make a new patch adding the %t then.

were you able to get around to this ? :)
-mike
  
Mike FABIAN March 7, 2016, 7:58 a.m. UTC | #6
Mike Frysinger <vapier@gentoo.org> さんはかきました:

> On 03 Nov 2015 16:44, Mike FABIAN wrote:
>> Good, I’ll make a new patch adding the %t then.
>
> were you able to get around to this ? :)
> -mike

I thought I did, but apparently I forgot to I posted the patch now.
  

Patch

From c0437ba76412cf0c8a1a6222f7a2efa812c29207 Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com>
Date: Sun, 1 Nov 2015 09:44:07 +0900
Subject: [PATCH] Fix typos in LC_TELEPHONE in i18n locale

for  localedata/ChangeLog

    * locales/i18n: fix typos (tel_int_fmt "+%c +a +l" -> "+%c %a %l")
---
 localedata/locales/i18n | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/localedata/locales/i18n b/localedata/locales/i18n
index 453cedf..09de63a 100644
--- a/localedata/locales/i18n
+++ b/localedata/locales/i18n
@@ -2495,7 +2495,7 @@  LC_TELEPHONE
 % This is the ISO/IEC 14652 "i18n" definition for
 % the LC_TELEPHONE category.
 %
-tel_int_fmt    "<U002B><U0025><U0063><U0020><U002B><U0061><U0020><U002B>/
+tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
 <U006C>"
 END LC_TELEPHONE
 
-- 
2.5.0