From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5636 Path: news.gmane.org!not-for-mail From: Wermut Newsgroups: gmane.linux.lib.musl.general Subject: locale fallback option Date: Sat, 26 Jul 2014 23:46:31 +0200 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1406411209 20753 80.91.229.3 (26 Jul 2014 21:46:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jul 2014 21:46:49 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-5641-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jul 26 23:46:44 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XB9ng-0001xF-3a for gllmg-musl@plane.gmane.org; Sat, 26 Jul 2014 23:46:44 +0200 Original-Received: (qmail 27825 invoked by uid 550); 26 Jul 2014 21:46:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27817 invoked from network); 26 Jul 2014 21:46:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bortis.ch; s=google; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=jxUN2Ni4SCjnXgo6HxFDHIqrPvKo7CJXB4SbmbD+V1E=; b=XTFD6mp+ukW799qQiosDjeuhEa+fCM1yDcnr4LsLuhu6pv6xu23Z7Vm7obqrUrKJYV 4HUhwTW0xC+9V/skzD5CkDZNVai1k8UVWHPLz27UoeQ5/8y2iX0CWrzgLjZBsXsYQhfJ D4gxapgfT8gUUakxWLZxOdK+w4XIZImg4+lwA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=jxUN2Ni4SCjnXgo6HxFDHIqrPvKo7CJXB4SbmbD+V1E=; b=mT24fa63LJcfxQvXPZue7LzFBpiRu7nYy4XKPEhUhAfgTeGMZ4AR+77TObPs8QWUUE HNPNZkF3y9145MfQAahDin39CCU4A8TuJb5Ji/e870nqms6nZ4rYxSp945P9OAcy5ojV iwkBx7jqnyRU/S0cvzkXkt3HS7zJ5eeHuwDM8lCJFVZQ4lu9sZdkaGPLhOxhPaQ7dK9s SAveZLR+L6bWX7/hxwjscO/roLuQhWXmnmiZgavMBVCmc7MC1Gww/1fwEwkQO83xJG3n kxEP/GRTmvU09Tz6kdcQSUjZefCgbzBefzSIqfFRaoRUMQFbBSGACTrP641evSMMZw4w oUCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=jxUN2Ni4SCjnXgo6HxFDHIqrPvKo7CJXB4SbmbD+V1E=; b=gGE44rO6H/NmjrpZYINDp5RvrkgInCmwErp4qyBqSgiSHH6OKdt3xSrwsZma3mpMq3 Bnh0pKShF0f34Hs2g7tjaNuDdWEgekEbo4AvHOj0m1R0/Ade3FNjaZkcIAx6D4MzLY/4 9owt0yXgPhYCoTL57EEENg+KfL5Mcbzl5Gu8bCxqNE1Mr7eItsAfly3BBnZYZmve5VAM Fq7lN4WDUjRH4/H1tuuJU5Bkw0DUauXUZogUfdQ/bPe0Q/xZwIE06KRGumlLHx2kd+lf UqjPLeIs4lhTrIRWtL55IpL6e8h2VRmvvV2bSMRkzKuRYxCIaYCIn7R8niiSbGUOHciZ 0hEg== X-Gm-Message-State: ALoCoQkAhX60PQavsvbshXvo2ywG1Ibo1sKiJMoUpBWe1LkSx6jO5xCnPjY7QZkOTlxD+7MSVmcE X-Received: by 10.236.207.33 with SMTP id m21mr36938260yho.71.1406411191100; Sat, 26 Jul 2014 14:46:31 -0700 (PDT) Original-Sender: kevin@bortis.ch X-Google-Sender-Auth: sjV-p64ood5FH1V-jKND8ocLR-0 Xref: news.gmane.org gmane.linux.lib.musl.general:5636 Archived-At: Hi I just read, that you committed the basic locale code and about the musl firsts and thought of one thing that I would really like to see in a modern implementation. Problem: User A speaks a language "xyz" and lives in country "AB". So he will set the relevant locale environment vars to "xyz_AB". The problem is, that the language "xyz" is only spoken by a minority of people and the translation of the software in his language is often not complete or non existend. The result is, that user A will have to read the most strings in plain english, because this is the standard fallback. Because our user A is a member of a minority, he knows also the language "ts" which is also spoken in "AB", but he does not know any english. Status quo: Because the translation "xyz_AB" is not really complete, the user A gives up, is frustrated and sets his locale to "ts_AB". What really should be possible: User A sets the locale "xyz_AB" and sets "ts_AB" as a fallback for definitions and strings not available in "xyz_AB". Only if a string is not defined in either "xyz_AB" or "ts_AB", the hardcoded english string is shown to him. This would require, that the locale definition would accept something like LANG=xyz_AB:ts_AB I have worked in the past with some of these translation problems and worked with people from a lot of minorities that have all the same problem: The locale subsystem is just no flexible enough. I know that the implementation is potentially expensive, because you could end up in looking into a lot of physical files on your hard drive, but it would definitive be a big improvement and would help that almost distinguished language would be used more often in computer translations. Thanks for reading. Regards Kevin