From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E711515827B for ; Sun, 10 Aug 2025 22:22:37 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id D0E47342015 for ; Sun, 10 Aug 2025 22:22:37 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id CF9DC110280; Sun, 10 Aug 2025 22:22:36 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id C5F08110280 for ; Sun, 10 Aug 2025 22:22:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 429F2342015 for ; Sun, 10 Aug 2025 22:22:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB51529AA for ; Sun, 10 Aug 2025 22:22:34 +0000 (UTC) From: "Kerin Millar" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kerin Millar" Message-ID: <1754860640.882fce549fd5ea663b0bf550f9da4433332353c5.kfm@gentoo> Subject: [gentoo-commits] proj/locale-gen:master commit in: / X-VCS-Repository: proj/locale-gen X-VCS-Files: locale-gen locale.gen.5 X-VCS-Directories: / X-VCS-Committer: kfm X-VCS-Committer-Name: Kerin Millar X-VCS-Revision: 882fce549fd5ea663b0bf550f9da4433332353c5 X-VCS-Branch: master Date: Sun, 10 Aug 2025 22:22:34 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fd4602ed-e1d8-491a-873d-b550640d77d7 X-Archives-Hash: bc0def136e3c60910dd86b2c5c556ba6 commit: 882fce549fd5ea663b0bf550f9da4433332353c5 Author: Kerin Millar plushkava net> AuthorDate: Sun Aug 10 21:08:11 2025 +0000 Commit: Kerin Millar plushkava net> CommitDate: Sun Aug 10 21:17:20 2025 +0000 URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=882fce54 Allow for locale declarations to have trailing comments The two fields that form a locale definition may now be followed by a comment, provided that its leading character is enclosed by characters. Signed-off-by: Kerin Millar plushkava.net> locale-gen | 3 +++ locale.gen.5 | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/locale-gen b/locale-gen index 948ee59..3a1dadf 100755 --- a/locale-gen +++ b/locale-gen @@ -329,6 +329,9 @@ sub parse_config ($fh, $path, $locale_by, $charmap_by) { # " " and "\t", since the input stream is not being decoded. next if $line =~ m/^\h*($|#)/; + # Permit comments trailing locale declarations. + $line =~ s/\h\K#\h.*//; + # Expect for two fields, separated by horizontal whitespace. my @fields; chomp $line; diff --git a/locale.gen.5 b/locale.gen.5 index 5a56e60..f5e6edf 100644 --- a/locale.gen.5 +++ b/locale.gen.5 @@ -13,9 +13,12 @@ considered as a \fIlocalename\fR and the second field as a \fIcharmap\fR. The combinations. .P Lines that are empty, or which contain only characters, shall be -disregarded. Also, lines that begin with zero or more characters, -followed by a character, shall be considered as comments and -disregarded. +disregarded. Lines that begin with zero or more characters, followed by +a character, shall be considered as comments and disregarded. +Further, the two fields that form a locale definition may be followed by a +comment, provided that its leading character is enclosed by + characters. + .P The definition of a character is that it is either the or character. @@ -53,7 +56,8 @@ en_US.UTF\-8 UTF\-8 zh_CN.UTF\-8 UTF\-8 de_DE.UTF\-8 UTF\-8 hi_IN.UTF\-8 UTF\-8 -ja_JP.UTF\-8 UTF\-8 +ja_JP.UTF\-8 UTF\-8 # trailing comments are permitted + .sp # This is invalid because the charmap field is missing. en_US.UTF\-8