Shopify / Shopify/worldwide

Missing time zone i18n for Rails 8.1.x zones America/Nuuk and America/Asuncion

Open
#421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
97
Forks
17
Avg merge
13h 33m
Merged PRs (30d)
11

Description

Rails 8.1.x / Activesupport 8.1.x adds/renames IANA identifiers in ActiveSupport::TimeZone::MAPPING to include America/Nuuk and America/Asuncion.

When using Worldwide’s timezone translations with Rails’ time_zone_options_for_select (as shown in Worldwide readme), upgrading from Rails/ActiveSupport 8.0.4 → 8.1.2 raises missing translation errors because Worldwide does not include keys for these identifiers.

Environment

  • Rails version 8.1.2
  • Worldwide version 1.21.1
  • config.i18n.raise_on_missing_translations = true
<%= form.ui_select :timezone,
      time_zone_options_for_select(
        @shop.timezone.name,
        nil,
        Worldwide::TimeZone
      ),
      {},
      label: t('shop_identity.views.admin.settings.general.timezone_label') %>

With raise_on_missing_translations, this emits errors after upgrading from Activesupport 8.0.4 -> 8.1.2.

ActionView::Template::Error: Translation missing: en.timezones.America/Asuncion

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Worldwide’s timezone translations used by time_zone_options_for_select and compare them with ActiveSupport::TimeZone::MAPPING in activesupport/lib/active_support/values/time_zone.rb. Reproduce the Rails 8.1.2 case with raise_on_missing_translations=true; done means America/Nuuk and America/Asuncion no longer produce missing translation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
localization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.