Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all CoSI- UI elements translatable #6

Open
ehundt opened this issue Oct 28, 2022 · 9 comments
Open

Make all CoSI- UI elements translatable #6

ehundt opened this issue Oct 28, 2022 · 9 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@ehundt
Copy link
Contributor

ehundt commented Oct 28, 2022

Original specification:
"Ermöglichung der Übersetzungen für alle CoSI-UI-Elemente (Standard: Englisch)."

@ehundt ehundt changed the title Ermöglichung der Übersetzungen für alle DIPAS- und CoSI-UI-Elemente (Standard: Eng- lisch) Make all DIPAS- and CoSI- UI elements translatable Oct 28, 2022
@ehundt ehundt self-assigned this Feb 15, 2023
@ehundt ehundt changed the title Make all DIPAS- and CoSI- UI elements translatable Make all CoSI- UI elements translatable Feb 27, 2023
@ehundt
Copy link
Contributor Author

ehundt commented Feb 27, 2023

As stated in our meeting with Daniel on 27.2:
In the config.json file which is located in the mpportals repository we will only make the top menu items translatable.
We add keys for English translations starting with "TODO en: "

@ehundt
Copy link
Contributor Author

ehundt commented Feb 28, 2023

TODOs:

  • Are the unit tests still running?

@BastianGuenther BastianGuenther added the good first issue Good for newcomers label Mar 16, 2023
@BastianGuenther
Copy link

Testing

@BastianGuenther
Copy link

BastianGuenther commented Apr 12, 2023

Unit tests mit Daniel klären:

  • wie werden die Tests gestartet

@BastianGuenther
Copy link

Elli checkt die Readme für die Unit Tests.

@ehundt
Copy link
Contributor Author

ehundt commented Jun 13, 2023

This is how I ran the tests:

  • Changes in the hcu-unitac-cosi repo
  • In the infrastructure project: make cosi_install
  • make start
  • docker-compose exec masterportal bash
  • node_modules/.bin/mochapack --recursive --webpack-config devtools/webpack.vue.test.js --file devtools/setupUnitTests.js addons/cosi/**/test/unit/**/*.spec.js addons/cosi/**/tests/unit/**/*.spec.js

Result of the unit tests:
All green except one: addons/cosi/Dashboard/test/unit/utils/tableCell.spec.js?:17:95:

expected '2,266' to equal '2.266'

plus a few error messages.
These issues are present in main branch already.

Manual testing:

  • 🚱 "Bevölkerung insgesamt" is not translated yet. It is configured in cosi/assets/mapping.js, used in residentialSimulation plus in specs (23 files in total).
  • Services -> Drawing/Writing -> choose Geometry: Freehand -> draw something -> change width of line or color -> it does not update the drawing. -> same issue in main branch.
  • Failed to load resource geodienste.hamburg.de/mapfish_print/print/master/capabilities.json:1 Failed : the server responded with a status of 404 (Not Found)
    AND Failed to load resource: https://geodienste.hamburg.de/HH_WFS_KitaEinrichtung?service=WFS&version=1.1.0&request=GetFeature&typename=KitaEinrichtungen&propertyname=Bezirk net::ERR_NETWORK_IO_SUSPENDED PLUS a few others. Some of the issues might result from this.
  • 🚱 Same error when you click on the green "XLS" button. But this button works in main branch!
  • Analysis -> Dipas: what should happen? ...is it not working? Behaves the same in main branch.
  • 🚱 Analyse -> Erreichbarkeitsanalyse: if you switch the language while having this entry open, the values of the selection does not switch the language: e.g. "Erreichbarkeit ab einem Referenzpunkt" - only after a reload of the whole page.
  • Warnings in the console: TypeError: Cannot read properties of undefined (reading 'getRevisionDate'). Is this caused by the geodienste resource not being available? -> same in main branch.

@ehundt
Copy link
Contributor Author

ehundt commented Jun 15, 2023

Be aware that the changes in the mpportals repo may not be merged before the translation changes are merged to the cosi repo. Otherwise the translation keys will be displayed.

@ehundt
Copy link
Contributor Author

ehundt commented Jun 15, 2023

@ehundt
Copy link
Contributor Author

ehundt commented Jun 23, 2023

In cosi/Dashboard/components/Dashboard.vue I am using i18nOptions: { keyPrefix: ...}

From my point of view it would be cleaner to use this i18n prefix - we don't have to use the whole path everywhere. But I thought there is maybe a reason why it has not been used so far? That s why I didn't add it to the other components...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants