Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Aug 2014 11:30:28 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Stefan Esser <se@freebsd.org>
Cc:        "Andrey V. Elsukov" <ae@freebsd.org>, Aleksandr Rybalko <ray@ddteam.net>, freebsd-stable stable <freebsd-stable@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Keymap definitions for VT / NEWCONS
Message-ID:  <CAPyFy2D0eUEiWtL-vvdv2P%2BmsEX7P5vkQNguzeZNob7W5QBuwA@mail.gmail.com>
In-Reply-To: <53ED2CCE.2030103@freebsd.org>
References:  <53EA0EC2.2070601@freebsd.org> <53EA1E5A.5020707@FreeBSD.org> <53EA2D00.7010307@freebsd.org> <CAPyFy2DMtFhwosD4z4sVHANB3Bp9_kECNrMWHOH=VpJiPyg2aQ@mail.gmail.com> <53EB0DA0.5000305@freebsd.org> <CAPyFy2BsMzvoYdNiYmRb6RTB_=TzDBoCW7PVETchuNirTJ%2BS2g@mail.gmail.com> <53EBEDC8.3080303@freebsd.org> <CAPyFy2DY20CJA6zc18%2Beie7%2BAm5UOV3ucu4vbirFhwcxgptttg@mail.gmail.com> <53ECA9CE.3070106@freebsd.org> <CAPyFy2B6bqiRnqv5kURUYhcGbtR-NqzUcuLDFntPXH4ChnS0mQ@mail.gmail.com> <53ED2CCE.2030103@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 14 August 2014 17:40, Stefan Esser <se@freebsd.org> wrote:
>
> Please look at the TAR file I prepared. I rank the symmetry
> in the format of the names higher than the shorter names.
> And in fact, keyboard layouts are often specific to a country,
> and not to a language. The 2-letter names hide the difference
> for the simple case ("fr" is really sufficient if "fr_FR" is
> meant), but if you look at syscons/keymaps there are examples
> of keymap files named after the language code and others named
> after the country code.

I've been thinking about it some more, and I think this point is
precisely why I'm not a fan of using the locale name.  You're correct
that keyboard layouts are mainly correlated with location, not
strictly language, and I think the names should reflect that. Most
keymaps don't require a specific language part, but the locale scheme
puts it first.

We should be able to offer an appropriate default layout based on a
user's locale.  I don't think it follows though that the keyboard
should be named the same as the locale. Using the locale name implies
a relationship between the locale and keymap that just doesn't exist.

You brought up Latin America (es_LA) as one exception so far, and the
Canadian Multilingual keyboard has a similar issue - what would we
call it?  Why is the Belgian keyboard fr_BE and not nl_BE? Presumably
because it's AZERTY, but naming it fr_BE seems to imply there should
be a separate Dutch Belgian layout. Other than consistency for its own
sake, what do we gain by requiring the ab_CD naming?

For comparison, I looked at the list of keymaps in Debian/Ubuntu. They
generally use the country code, with some non-ISO 3166 2-letter short
forms (e.g. "cf" for Canadian French). For the two examples above they
use the names la-latin1 and ca-multi.  I won't suggest we follow their
names in all cases since there's a lot of inconsistency (e.g. "sg" for
Swiss German, but fr_CH for Swiss French).  But as an overall scheme I
like starting with the ISO 3166 country code, and adding more specific
parts where necessary.

This could give us, as examples:

be    Belgian
ca-multi    Canadian Multilingual
ca-fr    French Canadian
ch-fr    Swiss French
ch-de    Swiss German
us    US

For layouts not specific to a single country (Latin America, Central
Europe) we could just use longer names as today.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2D0eUEiWtL-vvdv2P%2BmsEX7P5vkQNguzeZNob7W5QBuwA>