intlify / vue-i18n-locale-message

:globe_with_meridians: i18n locale messages management tool for vue-i18n
MIT License
73 stars 12 forks source link

`src` path of `i18n` blocks is ignored for squeezing #268

Open manniL opened 1 year ago

manniL commented 1 year ago

Code

components/test/Greeting.vue

<template>
  ...
</template>

<script>
...
</script>

<i18n locale="de" src="~/components/test/de.json"></i18n>

components/test/de.json

{
  "good_morning": "Guten Morgen"
}

Reproduction

  1. npx vue-i18n-locale-message squeeze --target=./components/test --output=./messages.json

Error: SyntaxError: Unexpected end of JSON input


The src path for i18n blocks is ignored when squeezing messages, making plugins like i18n-ally not recognize linked JSON files.