From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 15 15:30:50 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E159BEA1; Fri, 15 Aug 2014 15:30:49 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7472E7B; Fri, 15 Aug 2014 15:30:49 +0000 (UTC) Received: by mail-ig0-f177.google.com with SMTP id hn18so2112840igb.10 for ; Fri, 15 Aug 2014 08:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9ZMQ3XhT0oDwONBrsoW3Dz/+rHS1cCRiO3v0GON1iPM=; b=URtD/WQ1L8eAQ+o+wNNbDKh71o1DLE/lRqzFJcSlET8tGkJuEDS4ulstORaE6mLdMm 9DnGGTshkKzoeoKobUJaYuZNIx4Em3YUOxvNayplJsugzbKdIiZk2uxnSEH8rarpVpQY ObOm0aoJt9Xhd/HBygWa6ZUYApUMTGR7J5ulkxTWO5BWuyh0ZZh74s5kmwLKE977SdoS EEbZOnIVstRSEPOLuLRonHOb5Ief0LctDHDErtt0MzKq43KcdW2DXsCZkfufKIP8zTX5 dEsrOEtmNpA4BfuBeNxPzyCo0GlaDhHMAdpF0yWU1XuuV+7lpwD0/3JcqSURjvaTTZ+d s6JA== X-Received: by 10.50.28.75 with SMTP id z11mr67499905igg.11.1408116648464; Fri, 15 Aug 2014 08:30:48 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.131.38 with HTTP; Fri, 15 Aug 2014 08:30:28 -0700 (PDT) In-Reply-To: <53ED2CCE.2030103@freebsd.org> References: <53EA0EC2.2070601@freebsd.org> <53EA1E5A.5020707@FreeBSD.org> <53EA2D00.7010307@freebsd.org> <53EB0DA0.5000305@freebsd.org> <53EBEDC8.3080303@freebsd.org> <53ECA9CE.3070106@freebsd.org> <53ED2CCE.2030103@freebsd.org> From: Ed Maste Date: Fri, 15 Aug 2014 11:30:28 -0400 X-Google-Sender-Auth: uw5YGn3YLo8jwS1obPdwI1QVG8Q Message-ID: Subject: Re: Keymap definitions for VT / NEWCONS To: Stefan Esser Content-Type: text/plain; charset=UTF-8 Cc: "Andrey V. Elsukov" , Aleksandr Rybalko , freebsd-stable stable , "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 15:30:50 -0000 On 14 August 2014 17:40, Stefan Esser 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.