In Zanata, ID only with number is valid.
If we put such entry in YAML file without quote,
it is interpreted as integer when loading YAML file.
This commit ensure to convert such entries to string
when loading the translator YAML file.
Change-Id: I14269bc06c736fa16b539cbc9090b58aa0e6079b
Though the user_id that contains only numbers, for example 1234,
is valid Zanata ID, it raises an exception:
Traceback (most recent call last):
File "./zanata_stats.py", line 271, in <module>
main()
File "./zanata_stats.py", line 261, in main
language_teams, options.project)
File "./zanata_stats.py", line 166, in get_zanata_stats
user_contributes = statisticdata[user_id]
KeyError: 1234
Change-Id: Id1325204d6979190d3c4c6ae5410960fe221b57e
translation_team.yaml is now used by stackalytics.
It is a good idea to YAML format check in pep8 check.
Change-Id: I33f6311412a5cb67692992e1ba021d56eede7ce5
I have compared the list to current members in Zanata
for languages included in the file, and added to the list.
Change-Id: I2863410082826bdf53c3f059cbac64647de294d2
The zanata statistics tool does not include data from the
master-old-keepforstatistics branch for Horizon. Based on the
name of the branch I suspect it should.
Update the regular expression to make sure this branch
is used in computing statistics.
Change-Id: I5b3478f35f4a9eded35907d62d372ecbfe3d5706
Closes-bug: 1558254
This patch:
1) Fixes handling of empty lists by returning None instead of ['']
2) Enables specifying of custom output
Change-Id: Ia26332ae5d753de1328445f8a10514da279770a7
Usage: zanata_stats.py -s 2015-08-01 -e 2016-01-31 translation_team.yaml
zanata_stats.py will query translator's contributions in words,
including the translated translations, approved translations
and rejected translations, in a certain period of all projects and all
versions, and then save the data in a csv file.
translation_team.yaml stores all translation team and translators information.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: If7b92cb2e7ccc3e2e59d977976d7c5d726e606dd