File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 911911 "code" : " en_US" ,
912912 "name" : " English (United States)"
913913 },
914- {
915- "code" : " en_US_POSIX" ,
916- "name" : " English (United States, Computer)"
917- },
918914 {
919915 "code" : " en_VC" ,
920916 "name" : " English (St. Vincent & Grenadines)"
13991395 "code" : " ga" ,
14001396 "name" : " Irish"
14011397 },
1398+ {
1399+ "code" : " ga_GB" ,
1400+ "name" : " Irish (United Kingdom)"
1401+ },
14021402 {
14031403 "code" : " ga_IE" ,
14041404 "name" : " Irish (Ireland)"
Original file line number Diff line number Diff line change 2929 exit (1 );
3030}
3131
32- $ locales = array_map (function (string $ localeCode ) {
32+ require '../3rdparty/autoload.php ' ;
33+
34+ $ locales = array_map (static function (string $ localeCode ) {
3335 return [
3436 'code ' => $ localeCode ,
3537 'name ' => Locale::getDisplayName ($ localeCode , 'en ' )
3638 ];
3739}, ResourceBundle::getLocales ('' ));
3840
41+ $ locales = array_filter ($ locales , static function (array $ locale ) {
42+ return is_array (Punic \Data::explodeLocale ($ locale ['code ' ]));
43+ });
44+
45+ $ locales = array_values ($ locales );
46+
3947if (file_put_contents (__DIR__ . '/locales.json ' , json_encode ($ locales , JSON_PRETTY_PRINT )) === false ) {
4048 echo 'Failed to update locales.json ' ;
4149 exit (1 );
You can’t perform that action at this time.
0 commit comments