From a4a4edd571ead8a19cbf14266923eaaa2f8c6ed2 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 22 Mar 2017 15:17:42 +0000 Subject: [PATCH] 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 --- tools/zanata/zanata_users.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/zanata/zanata_users.py b/tools/zanata/zanata_users.py index 1febaf2..f47f9a9 100755 --- a/tools/zanata/zanata_users.py +++ b/tools/zanata/zanata_users.py @@ -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