Feat: locale generating adoption
Description
Resolve #2906 (closed)
Per upstream MR changed locale generation from Ruby to JS, thus the previous script we implemented will not be able to generate any locale file.
The current MR does two things to solve this problem
- Add our Jihu own script to generate locale files:
jh/scripts/frontend/po_to_json.js
- Add
jh/lib/tasks/gettext.rake
to override Upstream's commandgettext:compile
How to use
- Manually delete the
app.js
file$ rm app/assets/javascripts/locale/en/app.js
- Execute the command
rake gettext:compile
, expecting to regenerateapp.js
$ rake gettext:compile $ ls app/assets/javascripts/locale/en/app.js
由 路志远 编辑于