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

cannot work multiple i18n custom blocks #12

Open
kazupon opened this issue Aug 30, 2019 · 2 comments
Open

cannot work multiple i18n custom blocks #12

kazupon opened this issue Aug 30, 2019 · 2 comments

Comments

@kazupon
Copy link
Member

kazupon commented Aug 30, 2019

Codes

src/Greeting.vue:

<template>
  ...
</template>

<script>
...
</script>

<style>
...
</style>

<i18n>
{
  "ja": {
     "good_morning": "おはよう"
   }
}
</i18n>

<i18n>
{
  "ja": {
     "good_evening": "こんばんわ"
   }
}
</i18n>

reproduction step

vue-i18n-locale-message squeeze -t=./src
vue-i18n-locale-message infuse -t=./src -m=./messages.json

What is expected?

<template>
  ...
</template>

<script>
...
</script>

<style>
...
</style>

<i18n>
{
  "ja": {
     "good_morning": "おはよう"
   }
}
</i18n>

<i18n>
{
  "ja": {
     "good_evening": "こんばんわ"
   }
}
</i18n>

What is actually happening?

<template>
  ...
</template>

<script>
...
</script>

<style>
...
</style>

<i18n>
{
  "ja": {
     "good_evening": "こんばんわ"
   }
}
</i18n>

<i18n>
{
  "ja": {
     "good_evening": "こんばんわ"
   }
}
</i18n>
@kazupon kazupon added Priority: Medium Type: Bug Bug or Bug fixes todo help wanted Extra attention is needed labels Aug 30, 2019
@kazupon
Copy link
Member Author

kazupon commented Sep 2, 2019

I've patched at b226c65

We need to address #13 in order to solve it fundamentally.

@kazupon
Copy link
Member Author

kazupon commented Sep 2, 2019

We need to hoist unnecessary i18n blocks when it infused.

e.g.
b226c65#diff-0b1e335025c42460aeb948c219e9fb8bR89-R105

@kazupon kazupon removed the help wanted Extra attention is needed label Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant