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: parse template strings in t and defineMessage macros #862

Merged
merged 1 commit into from
Nov 14, 2020

Conversation

tricoder42
Copy link
Contributor

Closes #861

@vercel
Copy link

vercel bot commented Nov 13, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/lingui-js/js-lingui/eaicpzyqq
✅ Preview: https://js-lingui-git-feature-template-strings.lingui-js.vercel.app

@@ -36,19 +36,22 @@ export default [
`,
},
{
name: "should left string message intact - template literal",
name: "should transform template literals",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Normally thiw would be a breaking change, but since the code didn't work as described in documentation, I believe it's just a fix ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

I hope so 🤪

@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #862 (3e3f03b) into main (7cdcd61) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #862   +/-   ##
=======================================
  Coverage   83.05%   83.05%           
=======================================
  Files          51       51           
  Lines        1422     1422           
  Branches      390      391    +1     
=======================================
  Hits         1181     1181           
  Misses        140      140           
  Partials      101      101           
Impacted Files Coverage Δ
packages/macro/src/macroJs.ts 89.39% <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 7cdcd61...3e3f03b. Read the comment docs.

@tricoder42
Copy link
Contributor Author

Also we should improve the extract plugin so it throws a warning/error when it tries to extract message with undefine id.

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.

Function t macros do not extract template strings
2 participants