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

Add support for flat json separated with dot('.') #402

Merged
merged 1 commit into from Mar 18, 2021

Conversation

PeterAlfredLee
Copy link
Member

Relate to issue #271. Have done in #294, and then we decided this should wait after v9 release. See this comment.
Now v9 have released, I think it's a good time to add this feature.

Note, this time I make this feature optional and not enabled by default.
So I add option flatJson in some interface.
Hope I did them in a right way ^_^.

Here is what I have done:

  1. add function handleFlatJson to message-resolver,
    function handleFlatJson is use to transform flat json to normal json.

  2. add optional support for flat json messages to vue-i18n.

  3. add some tests to massage-resolver and vue-i18n.

  4. move function hasOwn to @intlify/shared.

1. add function `handleFlatJson` to `message-resolver`,
function `handleFlatJson` is use to transform flat json to normal json.

2. add optional support for flat json messages to `vue-i18n`.

3. add some tests to `massage-resolver` and `vue-i18n`.

4. move function `hasOwn` to `@intlify/shared`.
Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great works!
Thanks!

@kazupon kazupon added the Type: Feature Includes new features label Mar 18, 2021
@kazupon kazupon merged commit 34dac6b into intlify:master Mar 18, 2021
@PeterAlfredLee PeterAlfredLee deleted the support_flat_json branch March 18, 2021 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Includes new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants