Commit Graph

76 Commits

Author SHA1 Message Date
Frank Kloeker
cd44236152 move tox jobs and I18n tools to Python3
Change-Id: I53f840e6c5e5d6656255c76f14fb5b5bf08e57f3
2018-09-11 22:31:33 +02:00
Ian Y. Choi
876d6cb939 [zanata] Fixes zanata_users with REST API
Zanata >=4 which is now on production utilizes REST API [1].
This commit fixes zanata_users.py to make compatible with
Zanata REST API and syncs translation_team.yaml up to date.

[1] http://zanata.org/zanata-platform/rest-api-docs/resource_LocalesResource.html

Change-Id: Ia99db310cff236797ef403ba5534d853ed63e3e3
2018-07-24 22:55:56 +09:00
Jaewook Oh
ac4f1add0a Syncs translation_team.yaml file
By using tox -e zanata-users-sync, 
updated tools/zananta/translation_team.yaml file.

Change-Id: Ibf390deb9ea1b214f5022c404be94f44f4b3cb91
2018-02-23 10:37:13 +00:00
Frank Kloeker
8cc731552d Sync Zanata translator list
Change-Id: I4e998c3375b393e3d0ae7e65319642508ef473c1
2018-01-04 14:39:35 +01:00
Akihiro Motoki
d1056b0f48 Sort entries in translation_team.yaml alphabetically
Previously we kept the order of members of individual language teams
in the same order as that of Zanata language team page.
It was mainly to make it the maintenance of the YAML file
as the file is manually maintained.

We use zanata_users.py script to sync translation_team.yaml now,
so the need to keep the order has decreased much.
In addition, it seems Zanata changes the order of members
even when members of a specific language team is not changed.
This happens during the review https://review.openstack.org/#/c/485966/.

This commit change the script to sort members in the alphabetical order.

Change-Id: I09ddc202e0a3021bbc5433e37a5d815c760697ff
2017-08-02 08:35:00 +00:00
Akihiro Motoki
a2762d616c Sync Zanata translator list
The user list is synced by a script. For more detail, see
https://docs.openstack.org/i18n/latest/tools.html#sync-the-translator-list-with-zanata

Change-Id: I9a6b73032ad1c489e35d85c58422659b4d8e1415
2017-08-01 15:57:27 +00:00
Akihiro Motoki
6ed9c3aa32 Sync Zanata translator list
Change-Id: I8948f8e5165cf68774ba7402a6e665037ee45c5a
2017-07-27 23:19:44 +00:00
JF Taltavull
179a29e18a Add Zanata id to French team member list
Change-Id: If2e37e54e243b922a16e4f81af94de6935971e98
2017-07-25 22:41:05 +02:00
Jenkins
06f24cc956 Merge "Add zanata id to Korean member list" 2017-07-24 01:57:23 +00:00
ashish.billore
cb1d545e83 Add zanata id
Add zanata ID for translation.

Change-Id: I783c90e3f0fddd32a303dddcc217a1199c402249
2017-07-24 01:18:00 +00:00
ejbaek
0468d82f06 Add zanata id to Korean member list
Change-Id: Id9b69baf50d7aa7cca5fb5cac4adcd5166f4e087
2017-07-24 01:02:00 +00:00
Jenkins
c2bf6738d7 Merge "Add a translator to Korean team" 2017-07-18 23:16:41 +00:00
Jenkins
d4aa4279fd Merge "Add zanata id to Korean member list" 2017-07-18 23:16:31 +00:00
ohjoohyun
352cd49800 Add zanata id to Korean member list
Change-Id: I27b4924eac4ae01ec776bcb9742085c4cc8c585a
Signed-off-by: ohjoohyun <joo.oh@samsung.com>
2017-07-18 07:17:00 +00:00
johjuhyun
58cd577dd6 Add zanata id to Korean member list
Change-Id: I090dd2ddfcbef2fc836cdb5f9cc8f4e8e724b9f6
Signed-off-by: johjuhyun <juhyun.joh@samsung.com>
2017-07-18 00:51:16 -04:00
Taeha Kim
f8a8600329 Add a translator to Korean team
Change-Id: I114984ee6412adc97fd2d8fe50c59e22bf9829f3
Signed-off-by: Taeha Kim <kthguru@gmail.com>
2017-07-18 11:30:49 +09:00
Ian Y. Choi
60c7a59fad Sync translation_team.yaml with Zanata
This list is generated by zanata_users.py changed in
I28543860771684ddc157175aa554d731dc7d512f.

Change-Id: Iea12732625fbd02b943a11e7a15f4b23c5de81c1
2017-07-09 16:01:54 +00:00
Ian Y. Choi
c2e9289355 [zanata_users] Adds comment lines for yaml output
It is nice to specify the detail context in
https://review.openstack.org/#/c/448619/ and previous
comments written in translation_team.yaml output file.

Change-Id: I28543860771684ddc157175aa554d731dc7d512f
2017-07-09 15:58:25 +00:00
sjBark
6c6e2ff55f Add zanata id to Korean member list
Change-Id: Ia2035d2bf981661e5daeb04b1c685461e00b27c1
Signed-off-by: sjBark <sj.bark@samsung.com>
2017-07-07 00:08:25 +00:00
Ian Y. Choi
0e284d8e00 Includes user survey in ZANATA_VERSION_PATTERN
OpenStack user survey now supports translated surveys [1]
with kind contribution from many different countries.

Since openstack-user-survey project in Zanata [2] has a version
names openstack-user-survey which is different from master or stable-*,
including openstack-user-survey in ZANATA_VERSION_PATTERN
in zanata_stats.py file is needed to calculate ATC statistics
which deadline is Jul 10 - Jul 14 [3].

[1] https://www.openstack.org/user-survey
[2] https://translate.openstack.org/project/view/openstack-user-survey
[3] https://releases.openstack.org/pike/schedule.html

Change-Id: I8d4e61b7687c4d41f353662f2162362267cfc61a
2017-07-05 11:46:13 +09:00
Wonil Choi
e9200a0c2f Add zanata id to Korean member list
Change-Id: I26d9b22d753b9d46d648e04e3d5669e78d4ac086
2017-06-22 20:20:46 +09:00
Jenkins
fb172f89ef Merge "Python 3 support in zanata_userinfo.py" 2017-06-13 08:21:53 +00:00
Ian Y. Choi
8689d0b79a Python 3 support in zanata_userinfo.py
* UTF-8 characters need to be handled differently with Python 2 and 3.
  In Python 2 unicode strings must be encoded into ASCII strings.
  Python 3 is naturely unicode-aware and there is no need to encode
  unicode strings before passing the CSV writer.
* CSV writer in Python3 expects a file is open as
  non-binary mode. In Python 2, binary mode is expected.
* Move the encoding logic to CSV writer. It is a bit tricky to have
  encoded strings (i.e., byte string) in regular data structure.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I9d678d86b540d8b188ec0bf3240628a288f7ad3c
Implements: blueprint python35-support
2017-06-12 16:55:37 +00:00
Ian Y. Choi
d43911f32c Changes python executable file path
By changing this, two files can be executed without specifying python.

For example, not only
 $ python tools/zanata/zanata_stats.py --help
supports, but also
 $ tools/zanata/zanata_stats.py --help
is possible.

Note: please test using
 $ tox -evenv --notest
 $ source .tox/venv/bin/activate

Change-Id: Ia4b1bf07b17669428b77d324ff045299d17d8dc1
2017-06-08 00:58:15 +09:00
Jenkins
5ff2e6c8bf Merge "Sync translation_team.yaml with Zanata" 2017-03-30 14:30:00 +00:00
Jenkins
9941fd171e Merge "zanata_users: Consider coordinators as translators/reviewers" 2017-03-29 17:10:12 +00:00
Jenkins
2c2e1bc15d Merge "Sort translation_team.yaml alphebetically" 2017-03-25 07:48:18 +00:00
Akihiro Motoki
82d03df9d4 Sync translation_team.yaml with Zanata
This list is generated by zanata_users.py changed
in Ia137998edb97dc45c576505a11e84d8e62000e81.

Change-Id: I617bb6127cf5efbddfde1e8fb8e536347c68abb1
2017-03-22 15:28:30 +00:00
Akihiro Motoki
a4a4edd571 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
2017-03-22 15:22:34 +00:00
Akihiro Motoki
6bbbcdf472 Drop unnecessary comments from zanata_users
translation_team.yaml is now sorted in the alphabetical order
of language codes, so the comment is no longer needed.

Change-Id: I2ef229a3f9b525f211203e9386d62f9dfd5b0663
2017-03-22 14:50:27 +00:00
Akihiro Motoki
f605a62a9f Sort translation_team.yaml alphebetically
After commit 8caba73ceb
translation_team.yaml is now sorted in the alphabeticaly order
of language codes. Before syncing this with Zanata,
this commit reorders the current translation_team.yaml
so that the subsequent commit highlights what are changed.

Change-Id: Ida13a3f1c46ff29df6fa8615c0e4820a2e6f496c
2017-03-22 14:43:38 +00:00
Akihiro Motoki
8d478d277f zanata_stat: calculate stats summary across proejcts and versions
Change-Id: Id9ea9e3b66bb14720ccc53893a9590d59c34bde6
Closes-Bug: #1670640
2017-03-19 17:57:02 +09:00
Jenkins
4b42163c1a Merge "zanata_stats: Use logger method for messages" 2017-03-19 08:15:56 +00:00
Jenkins
371d47ad38 Merge "zanata_userinfo.py: get user name and email" 2017-03-19 08:11:35 +00:00
Akihiro Motoki
e49341ceef zanata_stats: Use logger method for messages
- Utilizes logging instead of oslo_log and catagorizs log messages
  into debug, error, info, and warning logs.
- Implements --debug option to also see debug logs
  (by default, debug logs are not seen to output).

Change-Id: Ib2b29896ca596f24cfb0c18602334435be6c2e13
2017-03-18 15:10:20 +00:00
Ian Y. Choi
e7806cd03a zanata_userinfo.py: get user name and email
The script generates a csv file by reading a yaml file
which contains the list of translators (e.g., translation_team.yaml)
with user name and e-mail addresses by interacting with Zanata API.

The script utilizes ZanataUtils in openstack-infra/project-config
to read zanata.ini configuration file which contains Zanata API key.
Note that the Zanata API key is required to use Zanata accounts API.

Change-Id: I078742c5956b2c72eb1dabb10b9d3b4667b8f7e6
2017-03-18 14:44:01 +00:00
Jenkins
cfd166165c Merge "zanata_stats: refactor" 2017-03-18 10:42:52 +00:00
Jenkins
6bb1fe246b Merge "python 3 support in zanata_stats.py" 2017-03-18 10:31:22 +00:00
Jenkins
6c4de51eb4 Merge "zanata_users: sort language team alphabetically" 2017-03-18 10:14:14 +00:00
Jenkins
1c7d7ce9d1 Merge "Fix zanata_users.py to support Zanata 3.9.6" 2017-03-18 10:13:55 +00:00
Akihiro Motoki
a90fb3eace zanata_stats: refactor
* Convert more functions to class methods.
  It allows us to have related stuffs in one place.
* Avoid using 'yield'. 'yield' itself is useful,
  but there is no need to use this for small iterations.
  Code readability will be better if we return a list.
* Raise an exception when an exception occurs in
  read_uri() and read_json_from_uri(). Catching an exception
  in these methods just leads to other unexpected error.
  If reraising an exception brings, debugging will be easier.
* Move the sort logic to User.__lt__ method.
* Load language team YAML file after checking options.

Change-Id: I9b668e4606f783fbb87e920a4802947c7efe4eb3
2017-03-15 15:57:59 +09:00
Akihiro Motoki
972de4b1d7 python 3 support in zanata_stats.py
* requests library handles differences in Python 2 and 3 efficiently.
  Let's switch to requests rather than using the lower-level urllib.
* CSV writer in Python3 expects a file is open as
  non-binary mode. In Python 2, binary mode is expected.

Change-Id: Ied870913de54975ea2d734e719f05c1e342620eb
2017-03-15 15:57:59 +09:00
Akihiro Motoki
07d3753a7f zanata_stat.py: Support Zanata 3.9.6
Zanata 3.9.6 changes the format of statistics data.
This commit updates the tool to support 3.9.6.

The old format from the old Zanata used at translate.openstack.org
is no longer supported.

Closes-Bug: #1670638
Change-Id: I692a995142529c4df1e2664264afc19496bf71ed
2017-03-15 15:57:52 +09:00
Akihiro Motoki
8caba73ceb zanata_users: sort language team alphabetically
We have a number of language team now.
translation_team.yaml is previously sorted based on the number
of translators, but it means the order of language teams can be
changed time to time. Alphabetical order will reduce accidental
big diff and makes easier to search.

Change-Id: Ib704d9f88d4ea7f6b18a390c956538072b52ac0d
2017-03-07 16:28:50 +00:00
Akihiro Motoki
99b4f6e2ae Fix zanata_users.py to support Zanata 3.9.6
HTML of individual language page was changed in Zanata 3.9.6.
This commit catches up with the change.

Closes-Bug: #1670725
Change-Id: I77df5c1f4b716b395f0f686b6a9e2e48649bedcf
2017-03-07 16:21:45 +00:00
Jenkins
dd6fe08da9 Merge "Add zanata id." 2017-02-13 05:43:40 +00:00
liumengwen
ddc4959f4e Add zanata id.
Change-Id: I1ab313b0ab5c25b80cf47b5a8533b4498e3f40b4
2017-02-13 05:36:48 +00:00
Akihiro Motoki
a2a5b3e9b7 Remove amotoki from Japanese coordinator
Still a member of Japanese translator and reviewer team

Change-Id: I23e49a47c0a0bd935df456128aceb09741396778
2017-01-30 00:34:20 +09:00
Ian Y. Choi
e6781eac54 Updates Zanata member list using tool
Note: The proposed content is generated from zanata_users.py

Change-Id: I9687e023519785881c70d599af7f5ebd4aaac7ed
2017-01-16 16:17:13 +00:00
Jenkins
8debc385a7 Merge "Zanata member list update tool" 2017-01-16 14:24:47 +00:00