This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: locale-source validation script
- From: Mike FABIAN <mfabian at redhat dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Mike FABIAN <maiku dot fabian at gmail dot com>, Rafal Luzynski <digitalfreak at lingonborough dot com>, "Carlos O'Donell" <carlos at redhat dot com>, Florian Weimer <fweimer at redhat dot com>
- Date: Wed, 26 Jul 2017 14:44:48 +0200
- Subject: Re: RFC: locale-source validation script
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mfabian at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6CA06659B6
- References: <CAKCAbMj54Dq5gAvKrC1JXLU9fknoDVjbtK0iJutMvqhUOsjVhA@mail.gmail.com>
Zack Weinberg <zackw@panix.com> wrote:
> - The complaints about "inappropriate character '\t'" are all caused
> by _unintentional_ tabs inside strings. If you write
>
> message "xyz/
> abc"
>
> the whitespace on the second line gets included in the string, which
> is not what you want.
Yes, at the moment we get for example:
$ LC_ALL=et_EE.UTF-8 locale -k postal_fmt
postal_fmt="%a%N %f%N %d%N %b%N %s%t%h%t%e%t%r%N %C-%z %T%N %c%N"
I’ll fix it like this, this is far more readable as well:
diff --git a/localedata/locales/et_EE b/localedata/locales/et_EE
index 93392659f4..7f68dabc18 100644
--- a/localedata/locales/et_EE
+++ b/localedata/locales/et_EE
@@ -2229,13 +2229,7 @@ name_fmt "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
END LC_NAME
LC_ADDRESS
-postal_fmt "<U0025><U0061><U0025><U004E>/
- <U0025><U0066><U0025><U004E>/
- <U0025><U0064><U0025><U004E>/
- <U0025><U0062><U0025><U004E>/
- <U0025><U0073><U0025><U0074><U0025><U0068><U0025><U0074><U0025><U0065><U0025><U0074><U0025><U0072><U0025><U004E>/
- <U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025><U004E>/
- <U0025><U0063><U0025><U004E>"
+postal_fmt "%a%N%f%N%d%N%b%N%s%t%h%t%e%t%r%N%C-%z %T%N%c%N"
country_name "<U0045><U0065><U0073><U0074><U0069>"
country_post "<U0045><U0045>"
country_ab2 "<U0045><U0045>"
And it seems to work correctly:
bash-4.4# LC_ALL=et_EE.UTF-8 locale -k postal_fmt
postal_fmt="%a%N%f%N%d%N%b%N%s%t%h%t%e%t%r%N%C-%z %T%N%c%N"
> The linter currently only detects this when
> that indentation is done with tabs, but I think it should probably
> detect spaces as well. If you _mean_ to put a tab in a string write
> <U0009>. :-)
--
Mike FABIAN <mfabian@redhat.com>