Skip to content

Commit 0e2959a

Browse files
authored
breaking(unplugin-vue-i18n): drop optimizeTranslationDirective option (#467)
1 parent 1384118 commit 0e2959a

31 files changed

+21
-944
lines changed

e2e/vite.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ describe('vite', () => {
2727
expect(await getText(global.page, '#lang label')).toMatch('言語')
2828
expect(await getText(global.page, '#fruits label')).toMatch('バナナが欲しい?')
2929
expect(await getText(global.page, '#msg')).toMatch('こんにちは、世界!')
30-
expect(await getText(global.page, '#custom-directive')).toMatch('やあ!')
3130
})
3231

3332
test('change locale', async () => {
3433
await global.page.selectOption('#lang select', 'en')
3534
expect(await getText(global.page, '#lang label')).toMatch('Language')
3635
expect(await getText(global.page, '#msg')).toMatch('hello, world!')
37-
expect(await getText(global.page, '#custom-directive')).toMatch('Hi!')
3836
})
3937

4038
test('change banana select', async () => {

examples/vite/src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
</select>
88
</form>
99
<p id="msg">{{ t('hello') }}</p>
10-
<p id="custom-directive" v-t="'hi'"></p>
1110
<Banana />
1211
<Apple />
1312
</template>

package.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,6 @@
2828
"typescript-eslint": "^8.26.1",
2929
"vitest": "^3.0.8"
3030
},
31-
"pnpm": {
32-
"overrides": {
33-
"vue-i18n": "next",
34-
"petite-vue-i18n": "next",
35-
"@intlify/shared": "next",
36-
"@intlify/core-base": "next",
37-
"@intlify/message-compiler": "next",
38-
"@intlify/vue-i18n-extensions>@intlify/shared": "next",
39-
"@intlify/vue-i18n-extensions>@intlify/message-compiler": "next",
40-
"@intlify/bundle-utils>@intlify/shared": "^12.0.0-alpha.2",
41-
"@intlify/bundle-utils>@intlify/message-compiler": "^12.0.0-alpha.2"
42-
}
43-
},
4431
"license": "MIT",
4532
"prettier": "@kazupon/prettier-config",
4633
"lint-staged": {

packages/unplugin-vue-i18n/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,11 @@ If do you will use this option, you need to enable `jitCompilation` option.
661661

662662
If you want to put it manually, you can specify the signature of the translation function as a string or a string array.
663663

664+
> [!IMPORTANT]
665+
>
666+
> `optimizeTranslationDirective` option is deprecated in v12, because `v-t` custom directive will be dropped in vue-i18n v12
667+
> This option will be supported with unplugin-vue-i18n v6.x (vue-i18n until v11)
668+
664669
> [!WARNING]
665670
> About for manually signature, see the details [vue-i18n-extensions API docs](https://github.com/intlify/vue-i18n-extensions/blob/next/docs/%40intlify/vue-i18n-extensions-api.md#translationsignatures) and [usecase from vue-i18n-extensions PR](https://github.com/intlify/vue-i18n-extensions/pull/217/files#diff-3fb9543f91e011d4b0dc9beff44082fe1a99c9eab70c1afab23c3c34352b7c38R121-R200)
666671

packages/unplugin-vue-i18n/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"url": "https://github.com/intlify/bundle-tools/issues"
1212
},
1313
"peerDependencies": {
14-
"petite-vue-i18n": "*",
14+
"petite-vue-i18n": "^12.0.0-alpha.2",
1515
"vue": "^3.2.25",
16-
"vue-i18n": "*"
16+
"vue-i18n": "^12.0.0-alpha.2"
1717
},
1818
"peerDependenciesMeta": {
1919
"petite-vue-i18n": {
@@ -24,13 +24,9 @@
2424
}
2525
},
2626
"dependencies": {
27-
"@eslint-community/eslint-utils": "^4.4.0",
2827
"@intlify/bundle-utils": "workspace:*",
2928
"@intlify/shared": "next",
30-
"@intlify/vue-i18n-extensions": "^8.0.0",
3129
"@rollup/pluginutils": "^5.1.0",
32-
"@typescript-eslint/scope-manager": "^8.13.0",
33-
"@typescript-eslint/typescript-estree": "^8.13.0",
3430
"debug": "^4.3.3",
3531
"defu": "^6.1.4",
3632
"fast-glob": "^3.2.12",

0 commit comments

Comments
 (0)