Shopify / Shopify/worldwide

[Enhancement] Add short names for "countries"

Open
#52 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

[...] we're making a revised country selector [...] It has a search, and we're proposing including a few common acronyms - e.g. UK would find United Kingdom, US or USA would find United States, NZ would find New Zealand, UAE = United Arab Emirates.
Question: is there a way we could get a list of common country acronyms for our supported languages? E.g. in French RDC = la république démocratique du Congo = DRC in English.

The above use case is something that we could address with Region.short_name. Currently, that only does something useful for "provinces" of certain countries, e.g.

$ Worldwide.region(code: "CA-ON").short_name
=> "ON"

... and it just returns the same value as .full_name elsewhere. Hooking up some behaviour to return useful short names would be a nice enhancement.

I think a good way to come up with a list would be to look at the various Wikipedia pages for each country in each target language. E.g. that'll come up with 米国 , アメリカ and 米 for US in Japanese. It also points to ROK for KR in English.

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 the Region.short_name entry point and the Worldwide.region lookup examples in the issue. Inspect how country names and supported languages are represented, then define the scope of common short names and acronyms. Done means representative searches such as UK, US, NZ, UAE, and RDC return the intended country names.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
internationalization, localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.