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

fix: ConfigProvider locale not working with Modal in some situation #18732

Merged
merged 1 commit into from Sep 9, 2019

Conversation

@afc163
Copy link
Member

commented Sep 9, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

close #18731

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix ConfigProvider locale not working with Modal in some situation.
🇨🇳 Chinese 修复 ConfigProvider locale 国际化在某些场景下对 Modal 不生效的问题。

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed
@pr-triage pr-triage bot added the PR: unreviewed label Sep 9, 2019
Copy link

left a comment

Could you please add tests to make sure this change works as expected?

@afc163 afc163 requested a review from yoyo837 Sep 9, 2019
@netlify

This comment has been minimized.

Copy link

commented Sep 9, 2019

Deploy preview for ant-design ready!

Built with commit 0effe96

https://deploy-preview-18732--ant-design.netlify.com

@@ -73,8 +73,8 @@ export default class LocaleProvider extends React.Component<LocaleProviderProps,
const { locale } = this.props;
if (prevProps.locale !== locale) {
setMomentLocale(locale);
changeConfirmLocale(locale && locale.Modal);

This comment has been minimized.

Copy link
@afc163

afc163 Sep 9, 2019

Author Member

还是需要判断一下是否变化。

@codecov

This comment has been minimized.

Copy link

commented Sep 9, 2019

Codecov Report

Merging #18732 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18732   +/-   ##
=======================================
  Coverage    96.9%    96.9%           
=======================================
  Files         281      281           
  Lines        7540     7540           
  Branches     2058     2100   +42     
=======================================
  Hits         7307     7307           
  Misses        231      231           
  Partials        2        2
Impacted Files Coverage Δ
components/locale-provider/index.tsx 100% <100%> (ø) ⬆️

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 c3ac730...0effe96. Read the comment docs.

@yoyo837
yoyo837 approved these changes Sep 9, 2019
@afc163 afc163 merged commit 7743967 into master Sep 9, 2019
30 of 32 checks passed
30 of 32 checks passed
Build
Details
Header rules - ant-design No header rules processed
Details
Pages changed - ant-design 215 new files uploaded
Details
DEP All dependencies are resolved
LGTM analysis: JavaScript No new or fixed alerts
Details
License Compliance All checks passed.
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No significant change
Details
bundlesize Total bundle size is 582.59KB/600KB (-null)
Details
ci/circleci: check_metadata Your tests passed on CircleCI!
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 96.9%)
Details
codecov/project 96.9% (+0%) compared to c3ac730
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected
@afc163 afc163 deleted the fix-locale branch Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.