[Intl] Excludes locale from language codes (split localized language names)

by @ro0NL

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/33148/f56d9ca2363bd7e17c65176fb077cc607bfc0ff0/cs.diff | patch -p0
diff -ru src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php
--- src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php	2019-08-14 12:48:25.124047757 +0000
+++ src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php	2019-08-14 12:48:30.827992334 +0000
@@ -176,7 +176,7 @@
         asort($alpha3ToAlpha2);
 
         $alpha3Codes = array_keys(array_flip(array_filter($this->languageCodes, static function (string $language): bool {
-            return 3 === strlen($language);
+            return 3 === \strlen($language);
         })) + $alpha3ToAlpha2);
         sort($alpha3Codes);
 
diff -ru src/Symfony/Component/Intl/Languages.php src/Symfony/Component/Intl/Languages.php
--- src/Symfony/Component/Intl/Languages.php	2019-08-14 12:48:25.300046047 +0000
+++ src/Symfony/Component/Intl/Languages.php	2019-08-14 12:48:30.893991692 +0000
@@ -65,7 +65,7 @@
                 return self::readEntry(['LocalizedNames', $language], $displayLocale);
             } catch (MissingResourceException $e) {
                 if (false !== $i = strpos($language, '_')) {
-                    return self::readEntry(['Names', substr($language, 0,  $i)], $displayLocale);
+                    return self::readEntry(['Names', substr($language, 0, $i)], $displayLocale);
                 }
 
                 throw $e;
@@ -125,7 +125,7 @@
 
             return true;
         } catch (MissingResourceException $e) {
-            return 3 === strlen($language) && self::exists($language);
+            return 3 === \strlen($language) && self::exists($language);
         }
     }
 
@@ -139,7 +139,7 @@
         try {
             return self::getName(self::getAlpha2Code($language), $displayLocale);
         } catch (MissingResourceException $e) {
-            if (3 === strlen($language)) {
+            if (3 === \strlen($language)) {
                 return self::getName($language, $displayLocale);
             }
 
@@ -159,7 +159,7 @@
         $alpha2Names = self::getNames($displayLocale);
         $alpha3Names = [];
         foreach ($alpha2Names as $alpha2Code => $name) {
-            if (3 === strlen($alpha2Code)) {
+            if (3 === \strlen($alpha2Code)) {
                 $alpha3Names[$alpha2Code] = $name;
                 continue;
             }

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/33148/f56d9ca2363bd7e17c65176fb077cc607bfc0ff0/typos.diff | patch -p0
diff -ru src/Symfony/Component/Intl/Resources/data/languages/ar.json src/Symfony/Component/Intl/Resources/data/languages/ar.json
--- src/Symfony/Component/Intl/Resources/data/languages/ar.json	2019-08-14 12:48:26.061038653 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/ar.json	2019-08-14 12:48:31.264988087 +0000
@@ -107,7 +107,7 @@
         "doi": "الدوجرية",
         "dsb": "صوربيا السفلى",
         "dua": "الديولا",
-        "dum": "الهولندية الوسطى",
+        "dumb": "الهولندية الوسطى",
         "dv": "المالديفية",
         "dyo": "جولا فونيا",
         "dyu": "الدايلا",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/az.json src/Symfony/Component/Intl/Resources/data/languages/az.json
--- src/Symfony/Component/Intl/Resources/data/languages/az.json	2019-08-14 12:48:26.936030151 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/az.json	2019-08-14 12:48:31.534985464 +0000
@@ -99,7 +99,7 @@
         "doi": "doqri",
         "dsb": "aşağı sorb",
         "dua": "duala",
-        "dum": "orta holland",
+        "dumb": "orta holland",
         "dv": "maldiv",
         "dyo": "diola",
         "dyu": "dyula",
@@ -419,7 +419,7 @@
         "syr": "suriya",
         "ta": "tamil",
         "te": "teluqu",
-        "tem": "timne",
+        "tem": "time",
         "teo": "teso",
         "ter": "tereno",
         "tet": "tetum",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/bg.json src/Symfony/Component/Intl/Resources/data/languages/bg.json
--- src/Symfony/Component/Intl/Resources/data/languages/bg.json	2019-08-14 12:48:27.562024068 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/bg.json	2019-08-14 12:48:31.718983676 +0000
@@ -98,7 +98,7 @@
         "doi": "догри",
         "dsb": "долнолужишки",
         "dua": "дуала",
-        "dum": "средновековен холандски",
+        "dumb": "средновековен холандски",
         "dv": "дивехи",
         "dyo": "диола-фони",
         "dyu": "диула",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/bn.json src/Symfony/Component/Intl/Resources/data/languages/bn.json
--- src/Symfony/Component/Intl/Resources/data/languages/bn.json	2019-08-14 12:48:27.975020055 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/bn.json	2019-08-14 12:48:31.837982520 +0000
@@ -98,7 +98,7 @@
         "doi": "ডোগরি",
         "dsb": "নিম্নতর সোর্বিয়ান",
         "dua": "দুয়ালা",
-        "dum": "মধ্য ডাচ",
+        "dumb": "মধ্য ডাচ",
         "dv": "দিবেহি",
         "dyo": "জোলা-ফনী",
         "dyu": "ডিউলা",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/br.json src/Symfony/Component/Intl/Resources/data/languages/br.json
--- src/Symfony/Component/Intl/Resources/data/languages/br.json	2019-08-14 12:48:28.492015032 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/br.json	2019-08-14 12:48:32.004980897 +0000
@@ -106,7 +106,7 @@
         "doi": "dogri",
         "dsb": "izelsorabeg",
         "dua": "douala",
-        "dum": "nederlandeg krenn",
+        "dumb": "nederlandeg krenn",
         "dv": "divehi",
         "dyo": "diola",
         "dyu": "dyula",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/bs.json src/Symfony/Component/Intl/Resources/data/languages/bs.json
--- src/Symfony/Component/Intl/Resources/data/languages/bs.json	2019-08-14 12:48:28.735012671 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/bs.json	2019-08-14 12:48:32.062980334 +0000
@@ -106,7 +106,7 @@
         "doi": "dogri",
         "dsb": "donjolužičkosrpski",
         "dua": "duala",
-        "dum": "srednjovjekovni holandski",
+        "dumb": "srednjovjekovni holandski",
         "dv": "divehi",
         "dyo": "jola-foni",
         "dyu": "diula",
@@ -432,7 +432,7 @@
         "syr": "sirijski",
         "ta": "tamilski",
         "te": "telugu",
-        "tem": "timne",
+        "tem": "time",
         "teo": "teso",
         "ter": "tereno",
         "tet": "tetum",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json
--- src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json	2019-08-14 12:48:28.930010776 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json	2019-08-14 12:48:32.123979741 +0000
@@ -88,7 +88,7 @@
         "doi": "догри",
         "dsb": "ниски сорбијански",
         "dua": "дуала",
-        "dum": "средњи холандски",
+        "dumb": "средњи холандски",
         "dv": "дивехијски",
         "dyu": "ђула",
         "dz": "џонга",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/ca.json src/Symfony/Component/Intl/Resources/data/languages/ca.json
--- src/Symfony/Component/Intl/Resources/data/languages/ca.json	2019-08-14 12:48:29.099009134 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/ca.json	2019-08-14 12:48:32.235978653 +0000
@@ -116,7 +116,7 @@
         "doi": "dogri",
         "dsb": "baix sòrab",
         "dua": "douala",
-        "dum": "neerlandès mitjà",
+        "dumb": "neerlandès mitjà",
         "dv": "divehi",
         "dyo": "diola",
         "dyu": "jula",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/cs.json src/Symfony/Component/Intl/Resources/data/languages/cs.json
--- src/Symfony/Component/Intl/Resources/data/languages/cs.json	2019-08-14 12:48:29.459005636 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/cs.json	2019-08-14 12:48:32.514975942 +0000
@@ -67,7 +67,7 @@
         "bkm": "kom",
         "bla": "siksika",
         "bm": "bambarština",
-        "bn": "bengálština",
+        "bn": "beingálština",
         "bo": "tibetština",
         "bpy": "bišnuprijskomanipurština",
         "bqi": "bachtijárština",
@@ -127,7 +127,7 @@
         "dsb": "dolnolužická srbština",
         "dtp": "kadazandusunština",
         "dua": "dualština",
-        "dum": "holandština (středověká)",
+        "dumb": "holandština (středověká)",
         "dv": "maledivština",
         "dyo": "jola-fonyi",
         "dyu": "djula",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/cy.json src/Symfony/Component/Intl/Resources/data/languages/cy.json
--- src/Symfony/Component/Intl/Resources/data/languages/cy.json	2019-08-14 12:48:29.623004042 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/cy.json	2019-08-14 12:48:32.636974756 +0000
@@ -105,7 +105,7 @@
         "doi": "Dogri",
         "dsb": "Sorbeg Isaf",
         "dua": "Diwaleg",
-        "dum": "Iseldireg Canol",
+        "dumb": "Iseldireg Canol",
         "dv": "Difehi",
         "dyo": "Jola-Fonyi",
         "dz": "Dzongkha",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/da.json src/Symfony/Component/Intl/Resources/data/languages/da.json
--- src/Symfony/Component/Intl/Resources/data/languages/da.json	2019-08-14 12:48:29.802002303 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/da.json	2019-08-14 12:48:32.707974066 +0000
@@ -107,7 +107,7 @@
         "doi": "dogri",
         "dsb": "nedersorbisk",
         "dua": "duala",
-        "dum": "middelhollandsk",
+        "dumb": "middelhollandsk",
         "dv": "divehi",
         "dyo": "jola-fonyi",
         "dyu": "dyula",
diff -ru src/Symfony/Component/Intl/Resources/data/languages/de.json src/Symfony/Component/Intl/Resources/data/languages/de.json
--- src/Symfony/Component/Intl/Resources/data/languages/de.json	2019-08-14 12:48:29.958000787 +0000
+++ src/Symfony/Component/Intl/Resources/data/languages/de.json	2019-08-14 12:48:32.773973425 +0000
@@ -126,7 +126,7 @@
         "dsb": "Niedersorbisch",
         "dtp": "Zentral-Dusun",
         "dua": "Duala",
-        "dum": "Mittelniederländisch",
+        "dumb": "Mittelniederländisch",
         "dv": "Dhivehi",
         "dyo": "Diola",
         "dyu": "Dyula",

0
License Headers

0
Pull Request Contributor Headers

0
JSON Files Syntax

0
File Permissions

0
Merge Commits