Skip to content

Export subdivisions#46

Merged
froyomuffin merged 1 commit intoruby-i18n:masterfrom
froyomuffin:export_subdivisions
Mar 26, 2019
Merged

Export subdivisions#46
froyomuffin merged 1 commit intoruby-i18n:masterfrom
froyomuffin:export_subdivisions

Conversation

@froyomuffin
Copy link
Copy Markdown
Collaborator

@froyomuffin froyomuffin commented Mar 15, 2019

This PR exports the subdivisions (provinces, states, prefectures etc) from CLDR. :)

Essentially, we define a Subdivisions off Base and:

  1. override path since subdivisions are defined off {root}/subdivisions/ instead of {root}/main/
  2. override doc to no-op the case where the locale xml doesn't exist. This is an issue when we export subdivisions on all locales, we do so using Cldr::Export::Data.locales which is defined off of {root}/main/*. I'm still using main locales as reference so I added a test to make sure the subdivisions locales < main locales.

I also made some updates because of failing tests:

  1. Removed en-GB and en-US from test languages :de since those entries have been removed in CLDR 34
  2. Made sure that all calls to ParentLocales.new provides an argument (even if not used)

@froyomuffin froyomuffin force-pushed the export_subdivisions branch from c55eefc to c780ddd Compare March 17, 2019 18:31
Copy link
Copy Markdown
Collaborator

@Korri Korri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the test fixed from that PR now as they are on master.

@froyomuffin froyomuffin force-pushed the export_subdivisions branch from c780ddd to e97bdfb Compare March 26, 2019 14:38
end

#
# test "extract subdivisions for #{locale}" do
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just following an existing pattern where we have this kind of tests commented out 🤷‍♂️. Honestly, I think we should just have something that runs all exports. It takes like 5 mins.

Copy link
Copy Markdown
Collaborator

@Korri Korri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@froyomuffin froyomuffin merged commit 50cdade into ruby-i18n:master Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants