zanata_users: Consider coordinators as translators/reviewers
In Zanata 3.9.6 language team panel, language coordinators are just shown as 'Coordinator'. Previously 'Translator' and 'Reviewer' are shown as their role. zanata_users.py script depends on what is displayed. 'translators' field in translation_team.yaml is used in Stackalytics and zanata_stats.py. In the current situation, activities in language coordinators are not retrieved. Language coordinators can also be a translator and a reviewer of corresponding language team, so this commit changes zanata_users.py to add coordinators to translators and reviewers of corresponding language. Change-Id: Ia137998edb97dc45c576505a11e84d8e62000e81
This commit is contained in:
parent
8d478d277f
commit
a4a4edd571
@ -78,7 +78,10 @@ class ZanataUtility(object):
|
||||
|
||||
languages[language_meta] = {
|
||||
'language': language,
|
||||
'member_url': member_url
|
||||
'member_url': member_url,
|
||||
'coordinators': [],
|
||||
'reviewers': [],
|
||||
'translators': [],
|
||||
}
|
||||
return languages
|
||||
|
||||
@ -118,9 +121,10 @@ def collect_zanata_language_and_members():
|
||||
print('[Warn] Unknown role : %s' % role)
|
||||
continue
|
||||
|
||||
if role not in languages[language]:
|
||||
languages[language][role] = list()
|
||||
languages[language][role].append(user_id)
|
||||
if role == 'coordinators':
|
||||
languages[language]['translators'].append(user_id)
|
||||
languages[language]['reviewers'].append(user_id)
|
||||
|
||||
result = OrderedDict((k, languages[k]) for k in sorted(languages))
|
||||
return result
|
||||
|
Loading…
Reference in New Issue
Block a user