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

chore: deprecate isTranslated prop #1772

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

vonovak
Copy link
Collaborator

@vonovak vonovak commented Sep 27, 2023

Description

Small maintenance PR: this prop is not really documented and it's buggy, as seen in #1643 (comment)

I tried to print a console warning when user accesses the prop so they get a message. However, React itself reads the props when calling createElement and so even if users don't use the prop, the warning would be logged. We'd need to do some heuristic on the stack trace to determine when to not print the warning and it wouldn't be pretty.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Fixes # (issue)

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Sep 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2023 9:29am

@vonovak vonovak force-pushed the chore/deprecate-is-translated branch from 04e5966 to e4f2604 Compare September 27, 2023 09:26
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

size-limit report 📦

Path Size
./packages/core/dist/index.mjs 2.83 KB (0%)
./packages/detect-locale/dist/index.mjs 721 B (0%)
./packages/react/dist/index.mjs 1.68 KB (0%)
./packages/remote-loader/dist/index.mjs 7.24 KB (0%)

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (242f10b) 76.26% compared to head (e4f2604) 76.26%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1772   +/-   ##
=======================================
  Coverage   76.26%   76.26%           
=======================================
  Files          81       81           
  Lines        2069     2069           
  Branches      528      528           
=======================================
  Hits         1578     1578           
  Misses        379      379           
  Partials      112      112           
Files Coverage Δ
packages/react/src/TransNoContext.tsx 90.32% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@vonovak thank you!

@andrii-bodnar andrii-bodnar merged commit d6501e3 into lingui:main Sep 27, 2023
14 checks passed
@vonovak vonovak deleted the chore/deprecate-is-translated branch September 27, 2023 10:16
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.

2 participants