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

Maintain or publish list of translation teams for each language #370

Open
rousik opened this issue Apr 24, 2020 · 6 comments
Open

Maintain or publish list of translation teams for each language #370

rousik opened this issue Apr 24, 2020 · 6 comments
Assignees

Comments

@rousik
Copy link
Collaborator

rousik commented Apr 24, 2020

When we need to update the existing content we can do that by creating Lokalise tasks. Ideally this would be run for all live languages and be assigned to current teams of translators for each language.

When I tried to do this for #368 I was unable to figure out who are the current translators for each language. It would be nice to have public list of translators for each languages so that we can create new tasks accurately.

It seems to me that lokalise allows to maintain user groups that could be used exactly for this purpose (each language will have dedicated group of translators and/or sci-reviewers).

In either case, we need to agree on what is the ground truth and make it publicly available and discoverable.

@rousik
Copy link
Collaborator Author

rousik commented Apr 24, 2020

Assigning to Nico as he probably knows the most about this area.

@nditada
Copy link
Contributor

nditada commented Apr 27, 2020

I guess the source of truth should be Lokalise, but I have no idea how to pull that info programmatically from there...

@rousik
Copy link
Collaborator Author

rousik commented Apr 27, 2020

Looks like this information is stored in Lokalise in the form of contributors (not team-user entitites). Using the lokalise2 cli and jq tool I was able to extract the current user-to-language mappings.

First, I store project-id: 423383895e6b8c4b081a89.98184174 and token: for my Lokalise account in ~/lokalise.yml for ease-of-use.

Then I can extract language-to-user_ids mapping using this nasty one-liner transformation:

lokalise2 --config ~/lokalise.yml contributor list | \
  jq '[.contributors[] | { user_id: .user_id, language: [.languages[] | select(.is_writable) | .lang_iso][]}]|group_by(.language)| .[] | { language: .[0].language, user_ids: [.[].user_id]}'

When creating new lokalise tasks, either list of user ids or user groups can be specified for each language that is included in the task. We also recognize two kinds of tasks: 1. translation, 2. scientific review.

Therefore it would make sense to create translate-${lang_iso} and review-${lang_iso} groups and populate them with contributors or reviewers (is_reviewer attribute on contributor object).

We can then either add the new contributors to given user groups manually as part of onboarding or just sync the groups from the contributor-language association periodically.

My next step here will be creating said groups for the live languages.

@rousik
Copy link
Collaborator Author

rousik commented Apr 27, 2020

To extract reviewers, the one-liner jq code should start with [.contributors[] | select(.is_reviewer) | ...

@rousik
Copy link
Collaborator Author

rousik commented Apr 27, 2020

The reference command to create translators group for cs is this:

lokalise2 --config ~/lokalise.yml team-user-group create --is-admin=false --is-reviewer=false --languages '{ "reference": [640], "contributable": [765] }' --name translate/cs --team-id 17246

Unfortunately it seems that I don't have Lokalise permissions to do this ATM. Pending further permissions.

@rousik
Copy link
Collaborator Author

rousik commented May 5, 2020

I'm still unable to run lokalise2 team-user-group create and I'm getting 403: Forbidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants