You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve parser.js to read ConditionalExpression to parse context.
Motivation
My project heavily uses i18n and sometimes context is necessary.
Problem is that each translation will have different values for the context and only a few of the keys actually use a context, and the current parser parses tOptions only when attr.value.type is one of: Literal, Identifier or ObjectExpression.
🚀 Feature Proposal
Improve
parser.js
to readConditionalExpression
to parsecontext
.Motivation
My project heavily uses i18n and sometimes
context
is necessary.Problem is that each translation will have different values for the context and only a few of the keys actually use a context, and the current parser parses
tOptions
only whenattr.value.type
is one of:Literal
,Identifier
orObjectExpression
.Example
What I would like to do is:
Then, I would modify the translation with context accordingly.
The text was updated successfully, but these errors were encountered: