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

Usage of @-symbol does not work #118

Closed
christophstockinger opened this issue Sep 20, 2020 · 6 comments
Closed

Usage of @-symbol does not work #118

christophstockinger opened this issue Sep 20, 2020 · 6 comments

Comments

@christophstockinger
Copy link

vue & vue-i18n version

  • vue: 3.0.0
  • vue-i18n: 9.0.0-beta.2

Steps to reproduce

I have an e-mail address in a translation instruction that contains the @ sign.

My drawing instruction:

email: 'abc@xzy.de'

The call:

<p>{{ t('email') }}</p>

What is Expected?

I expect it to be translated 1 to 1.

What is actually happening?

Error on the console is thrown. But Webpack can compile it. So the error will happen at runtime.
image

@christophstockinger
Copy link
Author

Found this error, which is related to my error #79

@kazupon kazupon added the Type: Bug Bug or Bug fixes label Sep 24, 2020
@kazupon
Copy link
Member

kazupon commented Sep 24, 2020

@ is special character for vue-i18n-next (v9.0.0 later).
That character is used as linked locale messages (e.g. @:message)

As the new message format feature, Literal interpolation is supported since vue-i18n-next.
You can use it to output resolved string of email addresses by put @ as literal.

email: "abc{'@'}xzy.de"

@kazupon kazupon closed this as completed Sep 24, 2020
@kazupon kazupon removed the Type: Bug Bug or Bug fixes label Sep 24, 2020
@kazupon
Copy link
Member

kazupon commented Sep 24, 2020

@AniaKru95
Copy link

Is it possible to handle this exception?
I use symbol @, example: abc@example.pl and in console I saw only: SyntaxError: 10
I spent a lot of time to find this solution.
"vue": "^3.2.37"
"vue-i18n": "^9.2.2"

@andreas-it-dev
Copy link

also struggling to let user know they need to add an @ symbol.. workaround is "email has to contain an 'at' symbol" but thats not really helping the DAUs

@nicooprat
Copy link

I may have found a workaround using messageResolver: #531 (comment)

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

No branches or pull requests

5 participants