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 multiple run #81

Merged
merged 3 commits into from
May 6, 2017
Merged

Fix multiple run #81

merged 3 commits into from
May 6, 2017

Conversation

AlexMost
Copy link
Member

@AlexMost AlexMost commented May 6, 2017

There was a problem while using multiple presets (es2015 and react). c-3po plugin was processing ngettext call twice. And it was failing while validation ngettext because es6 syntax was converted to es5:

 1) Extract ngettext with multiple presets should extract ngettext with multiple presets:
     SyntaxError: unknown: First argument must be tagged template expression. You should use 'msgid' tag
  > 1 | <div>{ngettext(msgid`test`, `test`, n)}</div>

Because on a second run msgid was transformed to a function call already.

This problem was not reproducing before because we used to transform to default after extract phase, so ngettext was replaced with _tag_ngettext fun and didn't match on a second run.

@codecov
Copy link

codecov bot commented May 6, 2017

Codecov Report

Merging #81 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage   96.11%   96.03%   -0.08%     
==========================================
  Files          13       13              
  Lines        1055     1059       +4     
  Branches      150      151       +1     
==========================================
+ Hits         1014     1017       +3     
- Misses         41       42       +1
Impacted Files Coverage Δ
src/plugin.js 94.55% <100%> (-1.95%) ⬇️
src/extract.js 100% <0%> (+3.92%) ⬆️

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 597b48d...99f7e6a. Read the comment docs.

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

1 participant