commit: d0149aa12c24184c1edc498f60d58cd66223c9e1
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Jan 10 01:29:38 2026 +0000
Commit: Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Sat Jan 10 01:29:38 2026 +0000
URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=d0149aa1
Rename normalize() to normalize_codeset()
The new name better describes its purpose and matches the name of the
equivalent function in the GNU localedef(1) codebase.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
locale-gen | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/locale-gen b/locale-gen
index 30b5e46..f2a6c65 100644
--- a/locale-gen
+++ b/locale-gen
@@ -91,9 +91,8 @@ umask 0022;
@locales = do {
my %requested_by;
grep {
- my $canonical = $_->[2];
- my $normal = normalize($canonical);
- ! $requested_by{$normal}++ && ! $installed_by{$normal};
+ my $canonical = normalize_codeset($_->[2]);
+ ! $requested_by{$canonical}++ && !
$installed_by{$canonical};
} @locales;
};
@@ -268,8 +267,8 @@ sub list_locales ($prefix) {
}
}
-sub normalize ($canonical) {
- # This is similar to the normalize_codeset() function of localedef(1).
+sub normalize_codeset ($canonical) {
+ # This function acts similarly to its namesake in localedef(1).
if ($canonical !~ m/(?<=\.)[^@]+/p) {
die "Can't normalize " . render_printable($canonical);
} else {