noi-techpark / odh-mentor-otp

4 stars 8 forks source link

A5 Multilingual front-end application #17

Closed rcavaliere closed 2 years ago

rcavaliere commented 3 years ago

This user story covers the enhancement of the front-end application so that it is multilingual (content). Actually done; translations can be prepared and uploaded by NOI and should be easily configurable in the source code (e.g. through proper config files)

ghost commented 3 years ago

@rcavaliere I uploaded these two sample files in your cloud that you can use to produce the German translation https://cloud.opendatahub.bz.it/index.php/s/MRsMxr8wkNW3Xpd?path=%2F language_en.js language_it.js

rcavaliere commented 3 years ago

@stemove @stefanocudini I have seen that EN and IT translations are already integrated in the source code. Why are they not always visible in the application, and the '$' are visualized instead of them? For example, I see the translations on Firefox, but not on Chrome

rcavaliere commented 3 years ago

@stefanocudini I have updated the DE JSON translation file and integrated the PR, but I can still not see the German update translations yet. Is there anything else to configure?

stefanocudini commented 3 years ago

only a rebuild of the journey image(Docker) is required

rcavaliere commented 3 years ago

@bertolla can you please do it, so we can see the client available in 3 languages and close this issue?

bertolla commented 3 years ago

I did it and also the last pull request

stefanocudini commented 3 years ago

@rcavaliere About languages management in the latest version we have made some changes on the format of the files and their location.

Starting language is picked from browser, if the browser has a different language than the three defined, English is selected.

Now langs path is here:

journey/app/lib/i18n/
├── de.js
├── en.js
├── index.js
└── it.js

The application uses a fallback language defined in the index.js file currently set in English 'en'. (In next versions we could move these choices to the config.yml)

In addition to this we have indexed many other texts. it.js and de.js files should be updated starting from en.js

rcavaliere commented 3 years ago

@rcavaliere completes the additional translations according to the new languages management structure in this refactoring

rcavaliere commented 2 years ago

@stefanocudini translations updated in DE, IT and EN

stefanocudini commented 2 years ago

great! I'll do a quick check on this