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

tm dont replace linked messages #1662

Open
4 tasks done
maxmaxme opened this issue Dec 27, 2023 · 0 comments
Open
4 tasks done

tm dont replace linked messages #1662

maxmaxme opened this issue Dec 27, 2023 · 0 comments
Labels
Status: Review Needed Request for review comments

Comments

@maxmaxme
Copy link

maxmaxme commented Dec 27, 2023

Reporting a bug?

i18n().tm('key') dont replace linked messages (@:messages.bla.key)

Expected behavior

Key values should be replaced

Reproduction

1:

{
key1: 'key1 value',
key2: 'key2 value',
keys: ['@:my.key1', '@:my.key2', 'v3'],
}
tm('keys')

2:
https://stackblitz.com/edit/vitejs-vite-uokaba?file=src%2FApp.vue

3:

test('linked message', async () => {
    const i18n = createVueI18n({
      locale: 'en',
      messages: {
        en: {
          key1: 'value1',
          key2: 'value2',
          keys: ['@:key1', '@:key2', 'value3']
        }
      }
    })

    const messages = i18n.tm('keys')
    expect(messages).toEqual(['value1', 'value2', 'value3'])
  })

System Info

System:
    OS: macOS 14.2.1
    CPU: (8) arm64 Apple M2
    Memory: 87.69 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
    pnpm: 8.6.1 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 120.0.6099.129
    Safari: 17.2.1

Screenshot

Screenshot 2023-12-27 at 15 34 02

Additional context

No response

Validations

@maxmaxme maxmaxme added the Status: Review Needed Request for review comments label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

1 participant