Repository navigation
Keep IANA identifiers in the es and es-MX time_zone lists - #3343
Open
yu2971512385-ui wants to merge 1 commit into
Open
yu2971512385-ui wants to merge 1 commit into
yu2971512385-ui wants to merge 1 commit into
Conversation
The Spanish locales translated the timezone identifiers themselves, so Faker::Address.time_zone hands back strings no timezone library can parse: es Europa/London, Europa/Madrid, Pacifico/Midway es-MX Africa/Nairobi, America/Nueva_York, Asia/Tokio Drawing 400 values per locale and resolving each through TZInfo: en 117 distinct, 0 unparseable sk 114 distinct, 0 unparseable es 121 distinct, 44 unparseable es-MX 117 distinct, 95 unparseable sk.yml settles what the convention is. It is a translated locale too, and its time_zone list is byte for byte the English one, identifiers untouched. Every valid entry in es and es-MX was already in that list, so both now carry it and nothing is lost. Separately, three identifiers were superseded by IANA and are updated in all four locales: Europe/Kiev to Europe/Kyiv, America/Godthab to America/Nuuk, Asia/Rangoon to Asia/Yangon. Asia/Kolkata and Asia/Kathmandu were already current, so the lists had been refreshed before and these were missed. After the change all four resolve cleanly: en 118, sk 119, es 120, es-MX 118 distinct, 0 unparseable each de.yml is left alone: its four entries are display names such as "MEZ" and "Central European Time", not identifiers, which is a different question. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two things in the locale
time_zonelists, both about identifiers rather than translations.1. The Spanish locales translated the identifiers
es.ymlandes-MX.ymltranslated the timezone identifiers themselves — continent prefixes and city names — soFaker::Address.time_zonereturns strings no timezone library can resolve:Drawing 400 values per locale and resolving each through
TZInfo::Timezone.get:sk.ymlsettles what the convention is. It is a translated locale too, and itstime_zonelist is byte for byte the English one — the identifiers were left alone. Every valid entry inesandes-MXwas already present in that list (0 of them unique), so both now carry it and nothing is lost.2. Three identifiers IANA has superseded
Updated in all four locales:
Europe/KievEurope/KyivAmerica/GodthabAmerica/NuukAsia/RangoonAsia/YangonAsia/KolkataandAsia/Kathmanduwere already current, so these lists had been refreshed before and these three were missed.After
All four locale files parse as YAML, and
address.time_zoneholds the same 143 entries in each,Pacific/MidwaythroughPacific/Apia.Left alone
de.ymlhas four entries that are display names —MEZ,Central European Time— not identifiers. That is a different question from this one, so I have not touched it.A note on running the tests
I could not get the suite to execute locally:
test_helper.rbrequires bothminitest/autorunandtest/unit, and on Ruby 4.0.7 the latter takes over the runner, so every file reports0 runs, 0 assertions. That happens on a clean checkout before my change too, so it looks like a Ruby-version thing rather than anything here — but it does mean the numbers above come from exercisingFaker::Address.time_zonedirectly againstTZInfo, not from the suite.🤖 Generated with Claude Code