From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7A831138E66 for ; Tue, 25 Feb 2014 10:09:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E811BE09FF; Tue, 25 Feb 2014 10:09:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 83547E09FF for ; Tue, 25 Feb 2014 10:09:13 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 777BC33F919 for ; Tue, 25 Feb 2014 10:09:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id E9C1618875 for ; Tue, 25 Feb 2014 10:09:10 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1393323055.7aaf43b23a0b9bc0bb4a2e726bda344409233176.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: /, modules/ X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog modules/news.eselect X-VCS-Directories: / modules/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 7aaf43b23a0b9bc0bb4a2e726bda344409233176 X-VCS-Branch: master Date: Tue, 25 Feb 2014 10:09:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: cd3b6f65-59ac-41ed-b567-dc4bd3b3d434 X-Archives-Hash: c95c700b7c1ae4f58cee399f2436180b commit: 7aaf43b23a0b9bc0bb4a2e726bda344409233176 Author: Ulrich Müller gentoo org> AuthorDate: Tue Feb 25 10:10:55 2014 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Tue Feb 25 10:10:55 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=7aaf43b2 Suppress C and POSIX as languages in news module; support _. * modules/news.eselect (accepted_languages): Suppress "C" and "POSIX" in output. Support _. --- ChangeLog | 5 +++++ modules/news.eselect | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c7a8cd..6aad604 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-02-25 Ulrich Müller + + * modules/news.eselect (accepted_languages): Suppress "C" + and "POSIX" in output. Support _. + 2014-02-18 Ulrich Müller * man/news.eselect.5: Update URI of GLEP 42. diff --git a/modules/news.eselect b/modules/news.eselect index 463cbbc..782f81c 100644 --- a/modules/news.eselect +++ b/modules/news.eselect @@ -87,9 +87,14 @@ find_repo_dir() { # return list of accepted languages accepted_languages() { - local lc=${LC_ALL:-${LANG}} - lc=${lc%%[^[:alpha:]]*} - [[ -n ${lc} && ${lc} != en ]] && echo ${lc} + local lc lct=${LC_ALL:-${LANG}} + lct=${lct%%[^[:alpha:]_]*} # strip .* @* etc. + lc=${lct%%_*} # strip _ + [[ ${lct} != "${lc}" ]] && echo "${lct}" + case ${lc} in + ""|C|POSIX|en) ;; + *) echo "${lc}" ;; + esac echo en }