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

replicate i18n_tool.py list-translators in continuous-localization workflow #1280

Closed
Tracked by #239
cfm opened this issue Aug 26, 2021 · 4 comments
Closed
Tracked by #239
Labels

Comments

@cfm
Copy link
Member

cfm commented Aug 26, 2021

In #1266, as hoped, Weblate's continuous-localization workflow will allow securedrop-client to sidestep much of the Git traversal done by securedrop's i18n_tool.py. A notable exception is i18n_tool.py's list-translators command, for which there is no Makefile-friendly scripting available:

  1. The Weblate UI can generate a "translator credits" report that is exactly what we want, including reST output. But since it's a view rather than an API endpoint, it can only be (easily) used interactively, not programmatically.
  2. The changes API endpoint will also give us what we want, via e.g. GET /api/translations/securedrop/securedrop/de/changes/?action=5. But the results are paginated, which makes them nontrivial to use in a Makefile/shell environment. Even then, some Git operation will be required to replicate list-translators's --since parameter.
  3. wlc changes very kindly traverses Weblate's pagination, but (a) it can't be parameterized on a starting timestamp and (b) its output doesn't include the user field we're most interested in.

I see two worthwhile approaches here:

  1. Following (2), write a minimal "get translators [since X]" script here. In Python, the paginated traversal is trivial (à la wlc changes). We could do the Git lookup, too, in pure Python via Dulwich. This script might stay here in securedrop-client as the guinea pig for continuous localization; or we might find it useful to factor out and make includable elsewhere, especially if the continuous workflow eventually makes its way back to securedrop.
  2. Offer to make an upstream contribution towards Contributor stats in API WeblateOrg/weblate#5459.

Thoughts? Note that this functionality need not be in place to use the continuous-localization workflow, only to properly credit translators in a release.

@cfm
Copy link
Member Author

cfm commented Aug 27, 2021

In discussion with @eloquence: Automating this report would be nice, including by contributing the API functionality upstream, when capacity permits, but it's not a priority. In the meantime, maintainers can use the "translator credits" report available in the Weblate UI.

@cfm
Copy link
Member Author

cfm commented Aug 23, 2023

I'm returning to this for freedomofpress/securedrop#6917.

Weblate has been able to generate reports like this one (redacted) since December 2015 (WeblateOrg/weblate@0428d3c).
* Catalan

    * Joan Montané <> (2)
    * Benet (BennyBeat) R. i Camps <> (15)


* Czech

    * Jan Papež <> (12)


* Turkish

    * tekrei <> (2)


* Icelandic

    * Sveinn í Felli <s> (3)


* Portuguese (Brazil)

    * Cory Francis Myers <> (1)
    * Guilherme <> (7)


* Croatian

    * Milo Ivir <> (55)


* German

    * Martin Trebuch <> (1)
    * Curtis Baltimore <> (1)
    * Ettore Atalan <> (10)


* Greek

    * Dimitris Maroulidis <> (3)


* Occitan

    * Mejans <> (71)


* Italian

    * lsd-cat <> (2)


* Slovak

    * Cory Francis Myers <> (1)


* French

    * AO Localization Lab <> (3)


* Swedish

    * Jonas Waga <> (3)


* Persian

    * Leila Zia <> (59)


* Polish

    * Adam Rak <> (129)


* Slovenian

    * Enej <> (15)


* Norwegian Bokmål

    * Øyvind Bye Skille <> (4)


* Portuguese (Portugal)

    * notmuchtohide <> (4)
    * deeplow <> (5)


* Chinese (Traditional)

    * Chi-Hsun Tsai <> (1)
    * Meng Pang Wang <> (3)


* Chinese (Simplified)

    * Kishin Sagume <> (2)
We added i18n_tool.py list-translators in June 2019 (freedomofpress/securedrop@1625306) to generate reports like this one. We only use it manually.
ar (Arabic):


ca (Catalan):
  Benet (BennyBeat) R. i Camps
  Joan Montané
  John Smith


cs (Czech):
  Jan Papež


de_DE (German):
  Curtis Baltimore
  Ettore Atalan
  Martin Trebuch


el (Greek):
  Dimitris Maroulidis


es_ES (Spanish):


fr_FR (French):
  AO Localization Lab


hi (Hindi):


is (Icelandic):
  Sveinn í Felli


it_IT (Italian):
  lsd-cat


nb_NO (Norwegian):
  Øyvind Bye Skille


nl (Dutch):


pt_BR (Portuguese, Brasil):
  Guilherme
  leilane
  notmuchtohide


pt_PT (Portuguese, Portugal):
  deeplow
  notmuchtohide


ro (Romanian):


ru (Russian):
  Adham Kurbanov


sk (Slovak):


sv (Swedish):
  Jonas Waga


tr (Turkish):
  tekrei


zh_Hans (Chinese, Simplified):
  Kishin Sagume


zh_Hant (Chinese, Traditional):
  Chi-Hsun Tsai
  Meng Pang Wang

I'm not convinced we should maintain, or reimplement, our own (workflow-dependent/fragile) version of this feature for a low-risk task we perform less than once a month (again, manually anyway). Please convince me!

@legoktm
Copy link
Member

legoktm commented Aug 24, 2023

The weblate report format looks good to me, plus post-processing that if we want a different format (not sure we want to promote/advertise everyone's emails like that) seems much simpler than having our own data extraction script.

@cfm
Copy link
Member Author

cfm commented Sep 28, 2023

Dropping per freedomofpress/securedrop#6917 (comment).

@cfm cfm closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants