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

petite-vue-i18n does not support translation in this format #1962

Closed
4 tasks done
maxfrees opened this issue Sep 19, 2024 · 5 comments
Closed
4 tasks done

petite-vue-i18n does not support translation in this format #1962

maxfrees opened this issue Sep 19, 2024 · 5 comments
Labels
Status: Need More Info Lacks enough info to make progress Status: Review Needed Request for review comments

Comments

@maxfrees
Copy link

maxfrees commented Sep 19, 2024

Reporting a bug?

baseTable:
  item: i
  total: to
  strip: str
  filterColumn: filter column

petite-vue-i18n does not support translation in this format

https://stackblitz.com/edit/vitejs-vite-xzgccz

Expected behavior

baseTable:
  item: i
  total: to
  strip: str
  filterColumn: filter column

petite-vue-i18n does not support translation in this format

Reproduction

baseTable:
  item: i
  total: to
  strip: str
  filterColumn: filter column

petite-vue-i18n does not support translation in this format

System Info

*

Screenshot

No response

Additional context

No response

Validations

@maxfrees maxfrees added the Status: Review Needed Request for review comments label Sep 19, 2024
@kazupon kazupon added the Status: Need More Info Lacks enough info to make progress label Sep 19, 2024
Copy link

Thank you for your feadback!
Would you be able to provide a reproduction 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect.

If Status: Need More Info labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a couple of templates for starting with a minimal reproduction:

👉 Reproduction mininal starter
👉 Reproduction starter with unpluguin-vue-i18n

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible.

You might also find these other articles interesting and/or helpful:

@maxfrees
Copy link
Author

maxfrees commented Sep 20, 2024

@kazupon
Copy link
Member

kazupon commented Sep 21, 2024

Thank you for your reproduction.

The locale messages of petite-vue-i18n is handled are simple key-value style

Docs said:

The only locale messages that can be handled are simple key-values. if you can handle hierarchical locale messages, you need to customize them using the API

https://vue-i18n.intlify.dev/guide/advanced/lite.html

The locale message of your app is object style hierarchy structure.

If you use hierarchy structure, you have to register resolveValue with registerMessageResolver
@intlify/core-base
https://vue-i18n.intlify.dev/guide/advanced/lite.html#use-the-same-message-resolver-and-locale-fallbacker-as-vue-i18n

Thanks!

@kazupon kazupon closed this as completed Sep 21, 2024
@maxfrees
Copy link
Author

Thank you for your reproduction.

The locale messages of petite-vue-i18n is handled are simple key-value style

Docs said:

The only locale messages that can be handled are simple key-values. if you can handle hierarchical locale messages, you need to customize them using the API

https://vue-i18n.intlify.dev/guide/advanced/lite.html

The locale message of your app is object style hierarchy structure.

If you use hierarchy structure, you have to register resolveValue with registerMessageResolver @intlify/core-base https://vue-i18n.intlify.dev/guide/advanced/lite.html#use-the-same-message-resolver-and-locale-fallbacker-as-vue-i18n

Thanks!

import {
  registerMessageResolver, // register the message resolver API
  resolveValue, // message resolver of vue-i18n which is used by default
  registerLocaleFallbacker, // register the locale fallbacker API
  fallbackWithLocaleChain locale fallbacker of vue-i18n which is used by default
} from '@intlify/core-base'

I also use this, but it doesn’t work. Will the size be smaller than vue-i18n after adding @intlify/core-base?

@kazupon
Copy link
Member

kazupon commented Sep 21, 2024

I also use this, but it doesn’t work.

Please open as new issue with reproduction. 🙏

Will the size be smaller than vue-i18n after adding @intlify/core-base?

Yes, it is smaller than vue-i18n.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Need More Info Lacks enough info to make progress Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

2 participants