Automattic / wp-cldr

Use CLDR localization data in WordPress
GNU General Public License v2.0
23 stars 6 forks source link

Update wp-cldr to version 1.2 #100

Closed sdnunca closed 4 months ago

sdnunca commented 10 months ago

This diff updates the CLDR version to 45.0.0.

Since version 43, timezone data cannot be enumerated from timezone.json.

In order to get the list of English timezones and exemplar cities, this diff extracts the data from cldr-bcp47/bcp47/timezone.json, which has been added to the supplemental folder.

Testing instructions

  1. Run ./get-cldr-files.sh
  2. Confirm that a new 45.0.0 folder was created in the data folder
  3. Run php prune-cldr-files.php to delete unneeded files.
  4. Confirm that the size of the 45.0.0 folder is similar to the already existing 41.0.0
  5. Run unit tests
  6. https://github.com/Automattic/wp-cldr/pull/101 has been created to add the data.
dlind1 commented 9 months ago

I got two errors while running the tests:

1) WP_CLDR_Tests::test_get_time_zone_cities
Failed asserting that an array has the key 'America/Los_Angeles'.

/Users/dlind/Documents/wp-cldr/tests/wp-cldr-tests.php:291

2) WP_CLDR_Tests::test_get_time_zone_city
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Paris'
+''

/Users/dlind/Documents/wp-cldr/tests/wp-cldr-tests.php:305
sdnunca commented 4 months ago

The PR has been updated to use CLDR 45.

d-alleyne commented 4 months ago

Confirm that the size of the 45.0.0 folder is similar to the already existing 41.0.0

@sdnunca My data folder only contains 29.0.0 and 45.0.0

sdnunca commented 4 months ago

Thanks @d-alleyne, I've rebased the branch, you should now see data version 41.0.0

sdnunca commented 4 months ago

@d-alleyne thank you, I've updated the script to work with white spaces in the path.