Open mooncos opened 6 years ago
@andrewda it needs to be changed to nb-NO as per ISO and RFC standards compliance for the npm package
We cant rename static/i18n/nb_NO.json
→ static/i18n/nb-NO.json
. These filenames are provided by Weblate, so we must use them otherwise they think the translation is missing.
Ok.
There's a webpack plugin to generate json file https://www.npmjs.com/package/generate-json-webpack-plugin
Using that will prevent us from having another js script be added to build script.
Ok. Should I write all logic within webpack.config.js
?
Not really, you can import/require langParser.js
in webpack.config.js
@blazeu fixed that. but where is the generated JSON located?
needs a rebase, and a recheck by @blazeu , or @wisn
This adds
langParser.js
to generate the available language list automatically from available translation files. This also adds a npm script for generating before webpack bundles. Modifies .gitignore so that generatedlanguages.js
file is ignored. Adds tests. Renamesnb_NO.json
tonb-NO.json
to comply with RFC standards.Closes: #125