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

Adds translation updates action #15541

Merged
merged 1 commit into from Feb 19, 2020
Merged

Adds translation updates action #15541

merged 1 commit into from Feb 19, 2020

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Feb 10, 2020

Adds an action to create a PR with translation updates once a week (Saturday 2:00 UTC)

Attention: In order to get the action working someone with admin access needs to add two secrets to this repository:

TransifexUsername: Containing the username of a transifex account with access to matomo
TransifexPassword: Password for that account

Those are required to fetch the translations from transifex API

Adds an action to create a PR with translation updates once a week (Saturday 2:00 UTC)
@sgiehl sgiehl added the Needs Review PRs that need a code review label Feb 10, 2020
@sgiehl sgiehl added this to the 4.0.0 milestone Feb 10, 2020
@tsteur
Copy link
Member

tsteur commented Feb 11, 2020

What will be the best way to test this? Re the transifex account: Do we need to sign up a new user there for this with limited access?

@sgiehl
Copy link
Member Author

sgiehl commented Feb 11, 2020

I've tested that on a fork as well. The last two translation PRs were actually triggered from my fork. The script here is slightly different, as the PR goes to the same repo...

Actually it needs to be an account which has access to all languages. Once the secret is added it can't be seen anywhere, so guess should be fine to add it. We can use mine, but I can't access the repo settings, so can't add it...

@tsteur
Copy link
Member

tsteur commented Feb 11, 2020

Can we create an access token that basically has only read access? Just thinking if there's some security issue in Github or between github and transifex then someone would have only read access. It's very unlikely something would happen but might be better to be safe? Not sure how easy it be to do it or what transfix can maybe do there already.=

@sgiehl
Copy link
Member Author

sgiehl commented Feb 12, 2020

It's possible to generate API tokens on transifex and use them (together with the username api), but you can't limit the access. Alternatively there is a direct GitHub integration for transifex, but then we would need to grant transifex access to github, which imho isn't better...

@tsteur
Copy link
Member

tsteur commented Feb 12, 2020

I see. If I understand correctly, we already have some api user we can use and this user maybe only has view access? Otherwise could quickly sign up a user on github and connect it to transifex and give "read" access to all languages? Or maybe transifex doesn't even have something like read access in general. Just wanting to avoid somehow being able to delete all languages, all translators and all data in there. We'd still have the files with all translations anyway so that's not an issue anyway but might be an issue to recover all translators and get them in there again? I suppose we have a list anyway so it might be all fine. I'll follow up in slack re the token.

@sgiehl
Copy link
Member Author

sgiehl commented Feb 19, 2020

@tsteur is it fine to merge? we can then simply see if the action runs correctly on the next weekend. If not we can simply adjust or remove it again...

@tsteur
Copy link
Member

tsteur commented Feb 19, 2020

will merge now 👍

@tsteur tsteur merged commit 361bc55 into 4.x-dev Feb 19, 2020
@tsteur tsteur deleted the translationaction branch February 19, 2020 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants