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

Automate getting usernames from Crowdin translators and add them into teams in numpy.org #4

Open
juanis2112 opened this issue Feb 11, 2025 · 1 comment

Comments

@juanis2112
Copy link

Currently, there is no automated way to retrieve the usernames of Crowdin translators contributing to numpy.org and add them to the appropriate teams.

For solving this I propose creating a script with the following functionality:

  1. Retrieve Translator Usernames from Crowdin API

Use the Crowdin's (/projects/{project_id}/members) endpoint to fetch project members. In out case it looks something like this:

API_URL = f"https://scientific-python.api.crowdin.com/api/v2/projects/{project_id}/members"
response = requests.get(API_URL, headers=headers)
data = response.json()
  1. Create a .toml file with the information retrieved matching the format of: https://github.com/numpy/numpy.org/blob/main/content/en/teams/translations-team.toml

  2. Set up a periodic GitHub Action (e.g., weekly) to run this script so new translators are added periodically (I'm assuming there is already something like this for the other teams)

In order to get the information from the Crowdin's API we need an API token with the right permissions. An idea could be to create an API token per organization and add it as a secret so it can be retrieved as an environment variable. Let me know what you folks think and I can start working on a PR to do this integration.

@goanpeca
Copy link

goanpeca commented Feb 24, 2025

Hi @juanis2112 thanks for opening the issue!

I have started working on this already and will create a dashboard to keep track of the current status of the translations across all projects. That will be found over at https://github.com/Scientific-Python-Translations/dashboard

The issue with just querying for Use the Crowdin's (/projects/{project_id}/members) endpoint to fetch project members is that being a member, does not mean that an user actually contributed to a given translation. In order to receive actual information on translations we need to query the API for https://support.crowdin.com/developer/api/v2/#tag/String-Translations/operation/api.projects.approvals.getMany

This yields the following usernames, per language, per project.

NetworkX
es ['goanpeca']
hi ['agriyakhetarpal']
pt-BR ['melissawm']


NumPy.Org
ar ['bls868327', 'nadah95', 'seiko']
es ['LindermanDgz', 'OriolAbril', 'asoretzu', 'juanis2112', 'juanpabloduqueo', 'pyjavo', 'scientific-python', 'yeimiyaz']
fa ['SaeedForoutan', 'ali']
it ['FilBalza']
ja ['AtsushiSakai', 'albert.steppi', 'ralf.gommers', 'scientific-python', 'yamunofu']
ko ['joohyung', 'justcontributor', 'kangwon', 'miknai', 'scientific-python']
pt-BR ['albert.steppi', 'getuliosilva', 'he7d3r', 'julio', 'melissawm', 'ralf.gommers', 'rffontenelle', 'villares']
ru ['aerwy']
ta ['rajasekaran86']
zh-CN ['Aaron212', 'Qiyu8', 'blueskyson', 'hellosarahwang', 'jasonliX', 'ktKongTong', 'tianxing', 'we****n@me***i.com']


Pandas
es ['carolinashima', 'connie.fs', 'goanpeca', 'principioincertidumbre', 'rivaquiroga', 'yeimiyaz']
fa ['iiiita']
fr ['arianedjeupang', 'clairefiltz']
ja ['kozo2']
pt-BR ['carlossb1', 'luxedo', 'melissawm', 'rffontenelle']
ta ['rajasekaran86']


Xarray
es ['goanpeca']
pt-BR ['melissawm']


Zarr.dev
es ['goanpeca']
pt-BR ['rffontenelle']


scipy.org
ca ['OriolAbril']
es ['LindermanDgz', 'OriolAbril', 'goanpeca', 'kellyvergarat', 'rivaquiroga']
ja ['AtsushiSakai']
pt-BR ['melissawm', 'rffontenelle']
ta ['rajasekaran86']

The same needs to be done for approvals, so that we can capture reviewer approvals as well.

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

No branches or pull requests

2 participants