zanata_stats: ensure to stringify user elements
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
This commit is contained in:
parent
40e4c7a3bf
commit
eaa3567c9f
|
@ -98,9 +98,12 @@ def _make_language_team(name, team_info):
|
|||
'tag': 'language_team',
|
||||
'language_code': name,
|
||||
'language': team_info['language'],
|
||||
'translators': team_info['translators'],
|
||||
'reviewers': team_info.get('reviewers', []),
|
||||
'coordinators': team_info.get('coordinators', []),
|
||||
# Zanata ID which only consists of numbers is a valid ID
|
||||
# and such entry is interpreted as integer unless it is
|
||||
# quoted in the YAML file. Ensure to stringify them.
|
||||
'translators': [str(i) for i in team_info['translators']],
|
||||
'reviewers': [str(i) for i in team_info.get('reviewers', [])],
|
||||
'coordinators': [str(i) for i in team_info.get('coordinators', [])],
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue