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
Allow language files to be written as nested js objects instead of a single level #8444
Labels
Milestone
Comments
Keep in mind core translations cannot be written in this manner, as Transifex expects a straight key value JSON file. |
oplik0
added a commit
to oplik0/NodeBB
that referenced
this issue
Oct 24, 2020
oplik0
added a commit
to oplik0/NodeBB
that referenced
this issue
Nov 2, 2020
oplik0
added a commit
to oplik0/NodeBB
that referenced
this issue
Nov 15, 2020
oplik0
added a commit
to oplik0/NodeBB
that referenced
this issue
Nov 15, 2020
oplik0
added a commit
to oplik0/NodeBB
that referenced
this issue
Nov 17, 2020
oplik0
added a commit
to oplik0/NodeBB
that referenced
this issue
Nov 17, 2020
barisusakli
pushed a commit
that referenced
this issue
Nov 17, 2020
* feat: #8444 Allow nested objects in translations * feat: #8444 Allow nested objects in translations * style: don't change formatting * fix: don't use the first string match if key isn't finished * feat: #8444 Allow nested objects in translations * feat: #8444 Allow nested objects in translations * style: don't change formatting * fix: don't use the first string match if key isn't finished * feat: add nested translations test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A developer stumbling block relates to i18n and l8n, in that there is an expectation that:
[[my-file:category.key]]
/en-GB/my-file.json
my-file.json
would be defined thusly:Whereas in reality it is actually:
We ought to support both because the former is used by some other frameworks (laravel perhaps?)
To work with our existing system, it is likely the file itself would just be parsed and then flattened before being send to the translator (whereas right now I bet it's something even simpler, like
require('that-json-file');
Maybe there's even a lodash method for this hah!
The text was updated successfully, but these errors were encountered: