adapt_authoring
adapt_authoring copied to clipboard
lan-application.json files (EN/ES) updating and hard-coded strings detection
app.assetmanagement is duplicated. Deleted the second one.
related: #1715
If this is going in we probably should update the grunt file so that it can be used
Indeed. For now it's a little tricky to translate. gruntfile line 10 must be modified:
src: ['routes/lang/es-application.json','frontend/src/plugins/**/lang/es.json'],
and do grunt build. EN.json file will translate, so it isn't a clean change.
I've quickly hacked together a patch for the grunt changes and language detection it should try and detect your browser language but it's not easy for me to test as a monolingual English speaker. Feel free to test it and commit it to your pr if it works.
Would you mind changing the hardcoded text "Plugin management" to Origin.l10n.t('app.pluginmanagement') here please?
Note: the unlocalised dashboard titles are fixed in https://github.com/adaptlearning/adapt_authoring/pull/1614.
@canstudios-louisem Must I add that code at the end of grunt file?
@mariogalmonte it's a git patch if you're not sure what to do with it don't worry I'll add another pr with it.
@canstudios-louisem I have tried to do the patch:
- Rebuild develop version (original gruntfile ). sudo grunt build
- Apply patch: sudo git apply --stat lang.patch console shows:
.gitignore | 1 +
Gruntfile.js | 9 +++++++++
frontend/src/core/l10n.js | 26 +++++++++++++++++++++++++-
3 files changed, 35 insertions(+), 1 deletion(-)
- sudo node server. But Adapt (ES Mozilla Firefox) is in English. Maybe I've done something bad?
@mariogalmonte try a grunt build and then node server after applying the patch if not my language checking code may not be doing what I expected.
@canstudios-louisem . It doesn't work too. I've done:
git apply --stat lang.patch, grunt build, node server
Tested in Mozilla Firefox and Google Chrome. Ubuntu 14 LTS 64 bits
Ok for now just carry on as you were with your change to the grunt file. Ill make this into a proper pr.
Ok. Thanks!