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

A translation that has the '@' symbol in the JSON translation file an error will occur #206

Open
4 tasks done
KishSiva opened this issue Mar 2, 2022 · 1 comment
Open
4 tasks done
Labels
Status: Review Needed Request for review comments

Comments

@KishSiva
Copy link

KishSiva commented Mar 2, 2022

Reporting a bug?

If there is a translation in a translation file (e.g. 'en.json') that contains the symbol @ the loader will return the error Module build failed: Error: Final loader (./node_modules/@intlify/vue-i18n-loader/lib/index.js) didn't return a Buffer or String. It seems like vue-i18n-loader does not realize it is text.

Expected behavior

I expect my translations to be displayed on the page, not to receive an error message.

Reproduction

I ran this using the runtime version of vue-i18n (vue-i18n/dist/vue-i18n.runtime.esm-bundler.js), @intlify/vue-i18n-loader and webpack.

System Info

I ran this using the runtime version of vue-i18n (vue-i18n/dist/vue-i18n.runtime.esm-bundler.js) and @intlify/vue-i18n-loader using webpack.

Screenshot

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines
  • Read the README
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion.
@KishSiva KishSiva added the Status: Review Needed Request for review comments label Mar 2, 2022
@KishSiva KishSiva changed the title A translation that has the '@' symbol in the JSON translation file will cause an error A translation that has the '@' symbol in the JSON translation file an error will occur Mar 2, 2022
@Alex--C
Copy link

Alex--C commented Sep 19, 2022

Our workaround is:
"foo{'@'}bar.com"

(see https://vue-i18n.intlify.dev/guide/essentials/syntax.html#literal-interpolation )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

2 participants