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 GDPR pages translatable #15574

Closed
Findus23 opened this issue Feb 16, 2020 · 7 comments · Fixed by #15582
Closed

Make all GDPR pages translatable #15574

Findus23 opened this issue Feb 16, 2020 · 7 comments · Fixed by #15582
Assignees
Labels
c: i18n For issues around internationalisation and localisation.
Milestone

Comments

@Findus23
Copy link
Member

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.

@Findus23 Findus23 added the c: i18n For issues around internationalisation and localisation. label Feb 16, 2020
@Findus23 Findus23 added this to the 4.0.0 milestone Feb 16, 2020
@sgiehl sgiehl self-assigned this Feb 17, 2020
@sgiehl
Copy link
Member

sgiehl commented Feb 17, 2020

created a PR for GDPR overview and opt out.

Regarding the GDPR Tools. That page is fully generated with angularjs components. That means if we make it translatable, we would need to put all the translations for it into the javascript translation array. As that would be quite a lot new translations in there, I was wondering if there might be a better solution we could implement, maybe like loading the needed translations on demand using JS. Or prerender the templates before serving them, so the most translations would be done serverside.

@tsteur @mattab @diosmosis Any thoughts on that?

@tsteur
Copy link
Member

tsteur commented Feb 17, 2020

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.

@sgiehl
Copy link
Member

sgiehl commented Feb 17, 2020

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

We could for sure simply add them to the javascript translations, but that way they would be loaded everywhere, but they would only be needed on that one page.

Implementing something like and API method getPluginTranslations might be a good way. Will have a quick look tomorrow if that is easy doable...

@tsteur
Copy link
Member

tsteur commented Feb 17, 2020

@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 👍

@diosmosis
Copy link
Member

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.

@tsteur
Copy link
Member

tsteur commented Feb 18, 2020

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 👍

@sgiehl
Copy link
Member

sgiehl commented Feb 24, 2020

Updated the PR above so all GDPR pages are now translatable. As discussed for now all translations will be in the javascript array...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: i18n For issues around internationalisation and localisation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants