Vue-i18n: linked message translates the translated message

Created on 6 Dec 2018  路  15Comments  路  Source: kazupon/vue-i18n

vue & vue-i18n version

2.5.17, 8.4.0

I dont know if it is the expected behavior
the linked message translates the translated message

Reproduction

{
  "hello": "Hello {name}",
  "linkedHello": "@:hello"
}

<p>{{ $t('hello', { name: 'World {text}' }) }}</p> - good
<p>{{ $t('hello', { name: 'World {text}', text: 'something' }) }}</p> - good

<p>{{ $t('linkedHello', { name: 'World {text}' }) }}</p> - bad
<p>{{ $t('linkedHello', { name: 'World {text}', text: 'something' }) }}</p> - bad

What is Expected?

<p>Hello World {text}</p>

What is actually happening?

<p>Hello World {text}</p> - good
<p>Hello World {text}</p> - good

<p>Hello World </p> - bad
<p>Hello World something</p> - bad

Bug good first issue help wanted

Most helpful comment

how can I test if my changes fix the issue

Refer development setup.
https://github.com/kazupon/vue-i18n/blob/dev/CONTRIBUTING.md#development-setup

It tells how to setup test environment and how to run tests.

how can i re-build vue with my changes and import to my web page ?

Do you mean: you want to test new changes added to vue-i18n (not vue) on your web page?

  1. npm run build
  2. Find the new vue-i18n.js built in dist directory.
  3. Upload it to your web page and test manually.

But you don't need to do so.
vue-i18n has end-2-end test which runs tests on web browser using Selenium.
If you add new tests (and maybe updating existing tests), Selenium runs tests on browsers automatically.

All 15 comments

@kazupon has funded $30.00 to this issue. See it on IssueHunt

@kazupon may I get this one too? 馃槵

@kimuraz
You can contribute :)

@kazupon has funded $30.00 to this issue. See it on IssueHunt

No activity since 10 days, can I take it ?

@gurungrahul2
sure!

@gurungrahul2
sorry, please wait.

@kimuraz
Are you still challenging this issue?

@kazupon
I actually made some changes, but I really couldn't keep going for a while, I think @gurungrahul2 can take it... sorry for bothering and for the late reply

@kimuraz
Thank you for you contributing!
okay, no worry :)

@gurungrahul2
You can do it!

@kazupon how can I test if my changes fix the issue, how can i re-build vue with my changes and import to my web page ?

@gurungrahul2
You can contribute by contribution guide.

@kazupon but it still doesn't answer my doubt.

@gurungrahul2 I migth have something on my old attempt...

https://github.com/kimuraz/vue-i18n/commit/e3c11c019f367c4040f2fbed822465312756c9c9

how can I test if my changes fix the issue

Refer development setup.
https://github.com/kazupon/vue-i18n/blob/dev/CONTRIBUTING.md#development-setup

It tells how to setup test environment and how to run tests.

how can i re-build vue with my changes and import to my web page ?

Do you mean: you want to test new changes added to vue-i18n (not vue) on your web page?

  1. npm run build
  2. Find the new vue-i18n.js built in dist directory.
  3. Upload it to your web page and test manually.

But you don't need to do so.
vue-i18n has end-2-end test which runs tests on web browser using Selenium.
If you add new tests (and maybe updating existing tests), Selenium runs tests on browsers automatically.

@kazupon has rewarded $42.00 to @stroncium. See it on IssueHunt

  • :moneybag: Total deposit: $60.00
  • :tada: Repository reward(20%): $12.00
  • :wrench: Service fee(10%): $6.00
Was this page helpful?
0 / 5 - 0 ratings

Related issues

WangShayne picture WangShayne  路  57Comments

leo108 picture leo108  路  15Comments

qiaochangwei picture qiaochangwei  路  16Comments

flaird picture flaird  路  15Comments

tvld picture tvld  路  19Comments