From 856d772d7f54045dbd78ef73f1d22c1bfe78e165 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 26 Apr 2017 23:21:48 +0200 Subject: [PATCH] countries: abbreviate West and East names Western Sahara and East Timor to W-Sah and E-Tim. --- tools/mkcountries-geonames | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames index 209653e..56f85c4 100755 --- a/tools/mkcountries-geonames +++ b/tools/mkcountries-geonames @@ -90,11 +90,13 @@ for (values %cc) { s/ and / & /g and s/(?<=.)[a-z ]+//g; s/ of / /g; s/\bsa?int /st /gi; - s/United /Un. /gi; + s/Un\Kited /. /gi; s/South(?:ern)? /S-/g; s/North(?:ern)? /N-/g; + s/West(?:ern)? /W-/g; + s/East(?:ern)? /E-/g; s/New /n./g; - s/(\S)(\S+)-/$1-/g; # strip most chars preceding dash + s/(\w)(\w+)-/$1-/g; # strip most chars preceding dash s/(\S{4}[b-df-hj-np-tv-xz])((?