From b9cb283e3e56d2e6d2097736f0db0906f20bd8f5 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 14 Sep 2023 18:23:47 +0900 Subject: [PATCH] fix: cannot resolve linked refer message that has hypen --- packages/vue-i18n-core/test/issues.test.ts | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/vue-i18n-core/test/issues.test.ts b/packages/vue-i18n-core/test/issues.test.ts index f1b6683dd..6b31b691a 100644 --- a/packages/vue-i18n-core/test/issues.test.ts +++ b/packages/vue-i18n-core/test/issues.test.ts @@ -987,6 +987,34 @@ test('issue #1392', async () => { expect(wrapper.html()).toEqual(`
component: works
t: works
`) }) +test('issue #1538', async () => { + const i18n = createI18n({ + legacy: false, + locale: 'en', + fallbackLocale: 'en', + messages: { + en: { + 'my-message': { + the_world: 'the world', + dio: 'DIO:', + linked: '@:my-message.dio @:my-message.the_world !!!!' + } + } + } + }) + + const App = defineComponent({ + setup() { + const { t } = useI18n() + return { t } + }, + template: `
{{ t('my-message.linked') }}
` + }) + const wrapper = await mount(App, i18n) + + expect(wrapper.html()).toEqual('
DIO: the world !!!!
') +}) + test('issue #1547', async () => { const i18n = createI18n({ legacy: false,