intlify / vue-i18n

Vue I18n for Vue 3
https://vue-i18n.intlify.dev/
MIT License
2.21k stars 337 forks source link

Improve description for `flatJson` option #2010

Open NamesMT opened 2 weeks ago

NamesMT commented 2 weeks ago

Clear and concise description of the problem

The current description for flatJson option is: "Allow use flat json messages or not", which is not correct. It's more of "Allow use of nested/mixed flat and hierarchical json", and what the option actually does is recursively transforming any flat key into a hierachical key.

In the current state of vue-i18n, if the json messages is a simple one level deep flat json (a.k.a key:value json), it is not necessary to enable this option and it would save some overhead.

More context:
flatJson will modify the original object passed in and can cause some gotchas.
flatJson can cause confusion with petite-vue-i18n, and if enabled, will broke petite-vue-i18n when working with flat json.

Suggested solution

TBD

Alternative

No response

Additional context

No response

Validations