Skip to content

support unescaped variables in TypeScript #2233

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

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

aaronrosenthal
Copy link
Contributor

Support unescaped variables in TypeScript when parsing actual values.

Without this fix, the variable names parsed in TypeScript will include the unescaped prefix/suffix, for example:

"locale": "Something {{- var}}"
t("locale", { "- var": value })

instead of:

t("locale", { var: value })

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

Checklist (for documentation change)

  • only relevant documentation part is changed (make a diff before you submit the PR)
  • motivation/reason is provided
  • commit message and code follows the Developer's Certification of Origin

@coveralls
Copy link

Coverage Status

coverage: 96.199%. remained the same
when pulling 7c7e7be on aaronrosenthal:parse-unescaped-actual-value
into 0083b3a on i18next:master.

@adrai adrai merged commit f0768a1 into i18next:master Sep 9, 2024
9 checks passed
@adrai
Copy link
Member

adrai commented Sep 9, 2024

Thank you very much... it's included in v23.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants