commit:     87b724f3b5bf14ade06d3a15123e08677d05efbe
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Aug 15 22:22:28 2025 +0000
Commit:     Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Fri Aug 15 22:22:28 2025 +0000
URL:        https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=87b724f3

mkconfig: marginally simplify the territory cleanup code

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 mkconfig | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/mkconfig b/mkconfig
index d79b3af..d69597e 100755
--- a/mkconfig
+++ b/mkconfig
@@ -83,10 +83,12 @@ sub map_locale_attributes ($prefix) {
                                        $ref->$* = to_ascii($ref->$*);
                                }
                        }
-                       if ($territory =~ m/^Myanmar/) {
-                               $territory = 'Myanmar/Burma';
-                       } elsif ($territory eq 'Turkiye') {
-                               $territory = 'Turkey';
+                       for ($territory) {
+                               if (m/^Myanmar/) {
+                                       $_ = 'Myanmar/Burma';
+                               } elsif (m/^Turkiye\z/) {
+                                       $_ = 'Turkey';
+                               }
                        }
                        $attr_by{$locale} = {
                                'language'  => $language,

Reply via email to