Closed ricardogsilva closed 2 days ago
@sirmmo
After some internal discussion, the current plan for the time series translations is to add the series[].info.translations
key to the returned payload. This key would be a dict with the translations for each series. Something like this:
{
"series": [
{
"name": "some_ugly_identifier",
"values": [1, 2, 3],
"info": {
"translations": {
"series_name": {
"en": "some name",
"it": "qualche nome"
}
}
}
}
]
Then the frontend would pick the appropriate value, depending on the currently active language.
For the rest of the API responses, I will be also be adding a translations
key to the payload, with a similar structure - this is still a bit TBD, but the overall plan is the same.
Do you agree with this strategy?
Not using tolgee on all data means that in any case the front would have to download multiple files anyway. Having that in the dataset means having one file less to download. Moving some logic from the translation system to this is not a problem. So for me it is GO.
From the requirements: