Gentoo Archives: gentoo-dev

From: "Chí-Thanh Christopher Nguyễn" <chithanh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] News item: LINGUAS USE_EXPAND renamed to L10N
Date: Mon, 06 Jun 2016 15:18:11
Message-Id: 57559438.2070103@gentoo.org
In Reply to: Re: [gentoo-dev] News item: LINGUAS USE_EXPAND renamed to L10N by Ulrich Mueller
1 Ulrich Mueller schrieb:
2 >>>>>> On Mon, 6 Jun 2016, Chí-Thanh Christopher Nguyễn wrote:
3 >> Ulrich Mueller schrieb:
4 >>> Question related to this, do we take the opportunity to standardise
5 >>> the values? Looks like the vast majority follows
6 >>> language[_territory][@modifier] specified by POSIX [1] but some
7 >>> don't.
8 >> What do we do with locales that don't fit into this scheme? Catalan
9 >> Valencian is one such locale.
10 >> Packages currently use modifiers (ca@valencia) or ISO 3166-1
11 >> reserved area (ca_XV) or something entirely different (ca_valencia).
12 > According to [1], "valencia" is a valid variant subtag, therefore
13 > ca@valencia should be fine.
14 >
15 >> ISO 3166-1:ES defines ES-VC as region code, so maybe ca_ES-VC would
16 >> be best. Though a quick Google search didn't find any major usage of
17 >> that either.
18 > Neither XV nor ES-VC are registered as a subtag though, so presumably
19 > these should be avoided.
20
21 I'm not totally convinced yet.
22 Following the BCP-47 spec the format is
23
24 Language-Tag = langtag ; normal language tags
25 langtag = language
26 ["-" script]
27 ["-" region]
28 *("-" variant)
29 *("-" extension)
30 ["-" privateuse]
31
32 So using the language ca, region es, and variant valencia, the BCP-47
33 language tag is ca-es-valencia (or ca-valencia if you omit the region).
34
35 POSIX.1-2008[2] as you mentioned defines a slightly different format for
36 locales
37
38 language[_territory][.codeset]
39
40 Only LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, and
41 LC_TIME additionally accept specification of a modifier.
42
43 [language[_territory][.codeset][@modifier]]
44
45 Where territory is implementation defined and the modifier "select[s] a
46 specific instance of localization data within a single category". Which
47 I think does not match what we want with "valencia" variant of the "ca"
48 language.
49
50 Hence I think POSIX locale cannot handle Catalan Valencian, unless
51 territory is made accept ISO3166-2 region subdivisions.
52
53
54 Best regards,
55 Chí-Thanh Christopher Nguyễn
56
57 [1] https://tools.ietf.org/rfc/bcp/bcp47.txt
58 [2]
59 http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02

Replies

Subject Author
Re: [gentoo-dev] News item: LINGUAS USE_EXPAND renamed to L10N Ulrich Mueller <ulm@g.o>