Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update i18n docs to reflect v7 changes #705

Merged
merged 2 commits into from Mar 31, 2020

Conversation

mwistrand
Copy link
Contributor

Type: feature

The following has been addressed in the PR:

Description:

Resolves #698

Unfortunately, as I cannot read Chinese, the corresponding zh-CN docs are left untouched.

  • Replace references of the old i18n function with localizeBundle().
  • Remove references to CLDR data as these data are now injected at build time.
  • Remove references to setLocaleMessages and getCachedMessages.
  • Replace message formatter examples with format examples.
  • Update documentation on reading the current locale.

@mwistrand mwistrand requested a review from agubler March 27, 2020 20:39
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 27, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d751903:

Sandbox Source
nervous-bhaskara-iydkk Configuration

@codecov
Copy link

codecov bot commented Mar 27, 2020

Codecov Report

Merging #705 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #705   +/-   ##
=======================================
  Coverage   97.76%   97.76%           
=======================================
  Files         119      119           
  Lines        6929     6929           
  Branches     1573     1573           
=======================================
  Hits         6774     6774           
  Misses        155      155           
Impacted Files Coverage Δ
src/i18n/i18n.ts 98.90% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2d7b9d...d751903. Read the comment docs.

@xiaohulu
Copy link
Contributor

@mwistrand I will update zh-CN docs.

@agubler
Copy link
Member

agubler commented Mar 31, 2020

@mwistrand Do you think we need to keep a section on the build tooling? Covering the locale and supportedLocales options, as this is what is used to automatically inject the required CLDR data?

- Replace references of the old `i18n` function with `localizeBundle()`.
- Remove references to CLDR data as these data are now injected at build
time.
- Remove references to `setLocaleMessages` and `getCachedMessages`.
- Replace message formatter examples with `format` examples.
- Update documentation on reading the current locale.
@mwistrand
Copy link
Contributor Author

@agubler There is already a "Configuring supported application locales" section beneath the top-level "Internationalizing a Dojo application" page that describes the locale and supportedLocales values in the .dojorc.

@agubler
Copy link
Member

agubler commented Mar 31, 2020

Should we mention on that page that without the locale then i18n will only use root bundles and do non icu message formatting? Or do we think that's enough?

@mwistrand
Copy link
Contributor Author

That's not a bad idea. I'll update to include that warning.

@mwistrand mwistrand merged commit 3064b7c into dojo:master Mar 31, 2020
@mwistrand mwistrand deleted the 698-i18n-reference branch March 31, 2020 20:18
agubler pushed a commit to agubler/framework that referenced this pull request Apr 3, 2020
- Replace references of the old `i18n` function with `localizeBundle()`.
- Remove references to CLDR data as these data are now injected at build
time.
- Remove references to `setLocaleMessages` and `getCachedMessages`.
- Replace message formatter examples with `format` examples.
- Update documentation on reading the current locale.
- Include warning about failing to specify a default locale.
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.

Update i18n Reference Docs
4 participants