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

t(common:title) works - but t(common:section-1.title) doesn't works - t function unable to retrieve the text from multiple JSON nesting levels #30

Closed
himanshu-dhiman26 opened this issue Jan 7, 2020 · 3 comments · Fixed by #33
Assignees
Labels
enhancement New feature or request

Comments

@himanshu-dhiman26
Copy link

I tried using the translation which works perfectly when my JSON looks like :

{
    "title": "Some Title"
}

and called using : t(common:title)

But if my JSON looks like :

{
    "section-1": {
        "title": "Some Title"
    }
}

and if I call it as : t(common:section-1.title)

This doesn't work. It prints "common:section-1.title" instead of the text value.

@aralroca
Copy link
Owner

aralroca commented Jan 7, 2020

Totally agree. It's a feature that is not implemented right now. But it will be very useful.

Thanks for reporting this. We are going to try to implement this for the next release.

@aralroca aralroca self-assigned this Jan 7, 2020
@aralroca aralroca added the enhancement New feature or request label Jan 7, 2020
@aralroca
Copy link
Owner

aralroca commented Jan 8, 2020

@himanshu-dhiman26 in the next release 0.3.0 this is fixed.

Thanks for reporting it! Feel open to re-open it if the problem persists.

@aralroca
Copy link
Owner

aralroca commented Jan 8, 2020

Use 0.3.1 instead of 0.3.0. I fixed some defaults in #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants