-
Notifications
You must be signed in to change notification settings - Fork 12
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 option to provide a template #3
Comments
Sorry I don't follow. Do you mean you'd like it to do some find/replace in |
You can check out our current task here https://github.com/wet-boew/wet-boew/blob/v4.0/tasks/i18n.js |
Its a bit hard to follow your example without knowing the format of the spreadsheet and desired file output. Since using locale files with a i18n plugin is quite common with express and all the templating languages, I think it makes sense to keep this as is, just spitting out the locale files to be ingested by something else. I would recommend still using a custom task, but using https://github.com/theoephraim/node-google-spreadsheets to handle the spreadsheet connection. You can also take a look at https://github.com/theoephraim/grunt-i18n-gspreadsheet/blob/master/tasks/i18n_gspreadsheet.js to see how this package uses it. |
Whoops, https://github.com/wet-boew/wet-boew/blob/v4.0/src/i18n/i18n.csv, which is actually just a local copy (right now) of a google sheet, and https://github.com/wet-boew/wet-boew/blob/v4.0/src/i18n/base.js is the template that is filled out for each language. |
I'll have to look at your code closer because I was thinking that a direct JSON conversion would probably be better |
It looks to me like you're overcomplicating things a bit. If you absolutely need those nested elements in your JSON output, you'll could do some post processing on the JSON file - or maybe we can figure out a key structure within the spreadsheet that could work, although currently the keys are totally flexible and I'd like to keep it that way if possible. |
IN this case though we don`t want all keys output anyways. |
For one our our use-case we need to replace only some of the strings and place them in a template. Is this something you would be open too?
/cc @nschonni
The text was updated successfully, but these errors were encountered: