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

Add an env var to set the init locale code on startup #10081

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

alexandrebodin
Copy link
Member

What does it do?

Add an env var to set the init locale code on startup

@alexandrebodin alexandrebodin force-pushed the i18n/allow-env-var-default-locale branch from c103a93 to e939a2a Compare April 20, 2021 07:43
@codecov
Copy link

codecov bot commented Apr 20, 2021

Codecov Report

Merging #10081 (7669b52) into features/i18n (e54d83e) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##           features/i18n   #10081      +/-   ##
=================================================
+ Coverage          59.18%   59.24%   +0.05%     
=================================================
  Files                180      180              
  Lines               5574     5582       +8     
  Branches            1050     1052       +2     
=================================================
+ Hits                3299     3307       +8     
  Misses              1812     1812              
  Partials             463      463              
Flag Coverage Δ
front ∅ <ø> (∅)
unit 59.24% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/strapi-plugin-i18n/constants/index.js 100.00% <100.00%> (ø)

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 e54d83e...7669b52. Read the comment docs.

Copy link
Contributor

@petersg83 petersg83 left a comment

Choose a reason for hiding this comment

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

LGTM, just a few things


if (!matchingLocale) {
throw new Error(
'Unknown locale code provided in the envrionment variable STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE'
Copy link
Contributor

Choose a reason for hiding this comment

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

environment*

Copy link
Contributor

@petersg83 petersg83 left a comment

Choose a reason for hiding this comment

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

LGTM !

@alexandrebodin alexandrebodin merged commit dbcaad3 into features/i18n Apr 20, 2021
@alexandrebodin alexandrebodin deleted the i18n/allow-env-var-default-locale branch April 20, 2021 11:53
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.

None yet

3 participants