adapt_authoring icon indicating copy to clipboard operation
adapt_authoring copied to clipboard

lan-application.json files (EN/ES) updating and hard-coded strings detection

Open marioalmonte opened this issue 8 years ago • 12 comments

app.assetmanagement is duplicated. Deleted the second one.

marioalmonte avatar Aug 29 '17 23:08 marioalmonte

related: #1715

canstudios-louisem avatar Aug 30 '17 09:08 canstudios-louisem

If this is going in we probably should update the grunt file so that it can be used

canstudios-louisem avatar Aug 30 '17 09:08 canstudios-louisem

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.

marioalmonte avatar Aug 30 '17 09:08 marioalmonte

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.

canstudios-louisem avatar Aug 30 '17 09:08 canstudios-louisem

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.

tomgreenfield avatar Aug 30 '17 10:08 tomgreenfield

@canstudios-louisem Must I add that code at the end of grunt file?

marioalmonte avatar Aug 30 '17 11:08 marioalmonte

@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 avatar Aug 30 '17 11:08 canstudios-louisem

@canstudios-louisem I have tried to do the patch:

  1. Rebuild develop version (original gruntfile ). sudo grunt build
  2. 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(-)
  1. sudo node server. But Adapt (ES Mozilla Firefox) is in English. Maybe I've done something bad?

marioalmonte avatar Aug 30 '17 14:08 marioalmonte

@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 avatar Aug 30 '17 14:08 canstudios-louisem

@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

marioalmonte avatar Aug 30 '17 15:08 marioalmonte

Ok for now just carry on as you were with your change to the grunt file. Ill make this into a proper pr.

canstudios-louisem avatar Aug 30 '17 15:08 canstudios-louisem

Ok. Thanks!

marioalmonte avatar Aug 30 '17 16:08 marioalmonte