Followup from #14954
I noticed that the whole
GDPR overview page, the help on the
GDPR Tools page and the whole GDPR tool is hardcoded in English.
To make it possible for everyone to use them, we should make them translatable.
created a PR for GDPR overview and opt out.
You mean like
getPluginTranslations?plugins=PrivacyManager,CoreHome or how would we get the needed translations for this? Or you mean one request for all translations?
GDPR overview is already in the twig template?
GDPR tools has some translations but also not crazy many. Maybe could still do it the normal way for now?
Pre-rendering is out of scope for now as this adds quite some complexity and potentially would need to upgrade angular for it etc. It's important to focus on the Matomo 4 milestone for now.
Maybe something to keep in mind for Matomo 5 or so? Not sure how much data we're talking about GZIPED. If I see this right this is maybe currently only around 30KB?
I reckon eventually it could be good to fetch translations through an ajax request with some good caching and not serve them on every page view but might make the UI bit funny if translations take too long to load.
It be for sure good to have, but reckon not much of a priority right now considering all the other things we have to do.
It's quite a lot new stuff in here: https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/PrivacyManager/angularjs/manage-gdpr/managegdpr.directive.html and https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/PrivacyManager/angularjs/anonymize-log-data/anonymize-log-data.directive.html
Implementing something like and API method
getPluginTranslations might be a good way. Will have a quick look tomorrow if that is easy doable...
@sgiehl Maybe create a new issue for this refactoring, and then it can be scheduled eventually. It's not a priority right now. Be good to focus on 3.13.3 and Matomo 4 first 👍
Can we store the translations in a JSON file like asset files are stored (in tmp and gzipped)? Then the user would only need to load it once in a while.
I reckon something like this could work, would need to be generated per language though. The problem is that you can't really ensure that file exists in tmp so it would likely need to go through Matomo PHP. The good thing is this allows us to send proper cache headers. So far it's not yet really an urgent problem but could re-evaluate then as part of Matomo 5 to see how much data the translations are to see if it has become a problem 👍