Localization on Views part1 #1008

Closed
opened 2026-05-19 10:58:18 +00:00 by c24danli · 7 comments
Collaborator

This involves printed text in views as titles and button names
Views to change

  • Clock
  • Image
  • Notes
  • Sodoku
  • Temperature
  • Temperature (Month Avrage)
  • Temperature (Year Avrage)
  • Temperature Graph
    image
This involves printed text in views as titles and button names Views to change - Clock - Image - Notes - Sodoku - Temperature - Temperature (Month Avrage) - Temperature (Year Avrage) - Temperature Graph ![image](/attachments/8a4857a3-2fd2-43f5-b206-f27554938d89)
Collaborator

Not entirely sure how to handle these toggle buttons as certain languages translate into longer words than their english counterparts, which makes them not fit inside.

I suppose one solution is to come up with shorter abbrevations in the language translation .json files, but I'll leave that for last.

Not entirely sure how to handle these toggle buttons as certain languages translate into longer words than their english counterparts, which makes them not fit inside. I suppose one solution is to come up with shorter abbrevations in the language translation .json files, but I'll leave that for last.
Collaborator

I changed the "views.id#.title" rows in the localization .jsons (sv.json and en.json) because they were effectively "magic numbers" which is something we want to avoid, and they also caused an issue making localization of the AddCardModal.js impossible to fully localize (at least to my understanding).

They now have names reflective of what they actually are.

views.id1.title -> views.TemperatureView.title
views.id2.title -> views.ParkingView.title
etc.

We might want to change their naming convention around though, so instead of
views.TemperatureView.title
it could be
views.title.TemperatureView

I'll leave that up to the leaders to decide.

I changed the "views.id#.title" rows in the localization .jsons (_**sv.json**_ and _**en.json**_) because they were effectively "magic numbers" which is something we want to avoid, and they also caused an issue making localization of the AddCardModal.js impossible to fully localize (at least to my understanding). They now have names reflective of what they actually are. `views.id1.title` -> `views.TemperatureView.title` `views.id2.title` -> `views.ParkingView.title` etc. We might want to change their naming convention around though, so instead of `views.TemperatureView.title` it could be `views.title.TemperatureView` I'll leave that up to the leaders to decide.
Author
Collaborator

@a23timgu wrote in #1008 (comment):

Not entirely sure how to handle these toggle buttons as certain languages translate into longer words than their english counterparts, which makes them not fit inside.

I suppose one solution is to come up with shorter abbrevations in the language translation .json files, but I'll leave that for last.

Yes i agree you could wait with all buttons, and make the PR without it.

@a23timgu wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/1008#issuecomment-13047: > Not entirely sure how to handle these toggle buttons as certain languages translate into longer words than their english counterparts, which makes them not fit inside. > > I suppose one solution is to come up with shorter abbrevations in the language translation .json files, but I'll leave that for last. Yes i agree you could wait with all buttons, and make the PR without it.
Author
Collaborator

@a23timgu wrote in #1008 (comment):

I changed the "views.id#.title" rows in the localization .jsons (sv.json and en.json) because they were effectively "magic numbers" which is something we want to avoid, and they also caused an issue making localization of the AddCardModal.js impossible to fully localize (at least to my understanding).

They now have names reflective of what they actually are.

views.id1.title -> views.TemperatureView.title views.id2.title -> views.ParkingView.title etc.

We might want to change their naming convention around though, so instead of views.TemperatureView.title it could be views.title.TemperatureView

I'll leave that up to the leaders to decide.

Add cardModal have an PR that have fixed searching for the localized title translations so that is not a part of this issue

@a23timgu wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/1008#issuecomment-13048: > I changed the "views.id#.title" rows in the localization .jsons (_**sv.json**_ and _**en.json**_) because they were effectively "magic numbers" which is something we want to avoid, and they also caused an issue making localization of the AddCardModal.js impossible to fully localize (at least to my understanding). > > They now have names reflective of what they actually are. > > `views.id1.title` -> `views.TemperatureView.title` `views.id2.title` -> `views.ParkingView.title` etc. > > We might want to change their naming convention around though, so instead of `views.TemperatureView.title` it could be `views.title.TemperatureView` > > I'll leave that up to the leaders to decide. Add cardModal have an PR that have fixed searching for the localized title translations so that is not a part of this issue
Collaborator

@c24danli wrote in #1008 (comment):

@a23timgu wrote in #1008 (comment):

I changed the "views.id#.title" rows in the localization .jsons (sv.json and en.json) because they were effectively "magic numbers" which is something we want to avoid, and they also caused an issue making localization of the AddCardModal.js impossible to fully localize (at least to my understanding).
They now have names reflective of what they actually are.
views.id1.title -> views.TemperatureView.title views.id2.title -> views.ParkingView.title etc.
We might want to change their naming convention around though, so instead of views.TemperatureView.title it could be views.title.TemperatureView
I'll leave that up to the leaders to decide.

Add cardModal have an PR that have fixed searching for the localized title translations so that is not a part of this issue

I'll revert it, but I can't see why we have unclear identifiers like "id1". It doesn't say a whole lot and will result in the issue I mentioned.

I expect some more conflicts between the team 1 and team 2 branch for next merge in this area.

@c24danli wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/1008#issuecomment-13089: > @a23timgu wrote in #1008 (comment): > > > I changed the "views.id#.title" rows in the localization .jsons (_**sv.json**_ and _**en.json**_) because they were effectively "magic numbers" which is something we want to avoid, and they also caused an issue making localization of the AddCardModal.js impossible to fully localize (at least to my understanding). > > They now have names reflective of what they actually are. > > `views.id1.title` -> `views.TemperatureView.title` `views.id2.title` -> `views.ParkingView.title` etc. > > We might want to change their naming convention around though, so instead of `views.TemperatureView.title` it could be `views.title.TemperatureView` > > I'll leave that up to the leaders to decide. > > Add cardModal have an PR that have fixed searching for the localized title translations so that is not a part of this issue I'll revert it, but I can't see why we have unclear identifiers like "id1". It doesn't say a whole lot and will result in the issue I mentioned. I expect some more conflicts between the team 1 and team 2 branch for next merge in this area.
Collaborator

These are now done. I will move on to the ones in #1010

These are now done. I will move on to the ones in [#1010](https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/1010)
a23timgu added reference 1008-localization-on-views-part-1 2026-05-25 14:39:13 +00:00
Collaborator

Has been merged in pr #1148

Has been merged in pr #1148
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#1008
No description provided.