Commit Graph

120 Commits

Author SHA1 Message Date
Zuul 2b27648ddc Merge "feat: weblate version function" 2024-04-24 13:20:46 +00:00
Kuemjong 754d5b1202 feat: weblate version function
Change-Id: I27a6f8d6ada0028d17867ce6d443b99befb2bf06
2024-04-10 13:48:06 +00:00
Ian Y. Choi b3b0784498 Sync translation_team.yaml with Zanata
This list is generated by running "tox -e zanata-users-sync"
command to sync translation members up-to-date similar as
I5a309564fae7229fdc097715bdbb1ce85d109753

Change-Id: I00b39bb1d6e6a87a6105ab1bf298b9046ffe6d2d
2024-02-16 06:48:32 +09:00
Zuul 84b571f65c Merge "Add weblate users" 2024-01-16 15:51:13 +00:00
Zuul cd4d530079 Merge "Add weblate Userinfo" 2024-01-13 17:32:04 +00:00
Sion Shin 02b0574557 Add weblate users
Added weblate API codes to get ready for
Zanata to Weblate migration

Implements: blueprint weblate-tools
Change-Id: I8d1a2393cc50541a29bd9581c4ac2574b9dc9813
2023-11-28 06:46:26 +00:00
Zuul d5d64997ab Merge "generatepot.sh: Drop UUID filtering" 2023-10-27 13:38:04 +00:00
n-y-kim d45968f182 Add weblate_utils.py to work with Weblate REST API
Rewrites existing ZanataUtils.py to work with Weblate as part of migration work.

Key summary:
- IniConfig class name is the same
- ZanataRestService class name is renamed as WeblateRestService class
  with the same functionality
- ProjectConfig class is not implemented since Weblate does not
  have project configuration file like zanata.xml.

Implements: blueprint weblate-tools
Change-Id: Ie4cf861cc6ca59456c5d563d7673fbf54b3bb42f
2023-10-27 01:21:21 +09:00
n-y-kim 6cc7ff2426 Add weblate Userinfo
Added weblate API codes to get ready for
Zanata to Weblate migration.

WeblateUtils.py has been deleted from this PR, as the
i18n main contributor decided it would be better to
seperate the PR with other files.

weblate_userinfo.py creates .csv file as zanata_userinfo.py does.

Implements: blueprint weblate-tools
Change-Id: I71bb234ea5cc5356c12245379c607340ea97249d
2023-10-25 14:00:51 +00:00
Akihiro Motoki 1cc69e482c generatepot.sh: Drop UUID filtering
(g)awk in Ubuntu 20.04 or later (perhaps gawk >=5.0) has more strict
regexp check and the regexp passed to awk in generatepot.sh cannot
pass the regexp check. This means our script does not work on
Ubuntu 20.04 or later.

This regexp was introduced to strip lines with UUID in a POT file
(e.g., "# 55a7796f27cb4468820fa48b90515add"), but the recent versions
of sphinx does not output such information at least with the sphinx
configuration used in OpenStack CI.
As a result this awk expression in generatepot.sh does nothing,
and I think we can drop this awk expression.

Change-Id: Ia61f74d0a73cc012afde6a4e16ac4431687a65a1
2023-09-12 14:55:53 +09:00
Akihiro Motoki 66888cbd31 Fix doc-pot-filter.sh
doc-pot-filter.sh is prepared to drop numbers from *.csv.
Howover, the path of CSV files in POT files were changed from some version
of Sphinx (from "doc/source/data/*.csv" to "../../source/data/*.csv") and
doc-pot-filter.sh does not work expectedly.
This commit adjusts the path of CSV files in POT files.

The number of entries in the target POT file (atc-stats.pot) is printed
before and after the filter is applied. I believe this helps us debug
the similar issue in future if needed.

Change-Id: I32d760a735ab1ae491d7e5efb36fd5059da0cd11
2023-09-11 14:19:33 +09:00
Akihiro Motoki 5a846dbd43 Recover -xe bash option in generatepot.sh
As part of commit 9b939e1b40,
"bash" was added when calling tools/generatepot.sh to avoid tox warning,
but as a result "-xe" option specified at the beginning of generatepot.sh
is no longer considered and we cannot see trace of generatepot.sh
in logs of upstream-translation-update job :-(

This commit explicitly set these options in the shell script
instead of the magic line (line 1).

doc-pot-filter.sh is also updated in the same way.

Change-Id: Ia2ca111cbb386ae5333d8a9a8622f7ac9b19746e
2023-09-09 17:54:22 +09:00
Ian Y. Choi c9c82d4f3e Sync translation_team.yaml with Zanata
This list is generated by running "tox -e zanata-users-sync"
command to sync translation members up-to-date similar as
I5a309564fae7229fdc097715bdbb1ce85d109753

Change-Id: Ica09d0348863aca9822eef7d9978a36b2ff3aac6
2023-09-02 15:17:49 +09:00
Ian Y. Choi 82b56bc56f Zanata stats tool: improve speed with user API
This patch enhances the speed of Zanata stats by using
user-based Zanata APIs rather than project-based APIs,
which took >1 days as more Zanata users and translation data
were accumulated.

Note that the API scheme follows with Stackalytics
: https://opendev.org/x/stackalytics/src/branch/master/stackalytics/processor/zanata.py#L38

Change-Id: Ia2462447f7a0cc2534e877976838de09e8683e89
2021-03-09 20:38:35 +09:00
Hervé Beraud e624e808e8 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I04c1b88c5b978905c6b9fae5084c9d3561e805ad
2020-06-02 20:18:35 +02:00
Roman Gorshunov 40a1f1f4f9 Sync translation_team.yaml with Zanata
This list is generated by running "zanata_users.py"
command to sync translation members.

Change-Id: I16cdbaf4aa9b537a46d4e84426671455e50cdfa3
2020-04-15 19:37:01 +02:00
Andreas Jaeger fb8bc0b09b [ussuri][goal] Drop python 2.7 support
OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Cleanup setup.cfg.
Update hacking for python3.
Remove six usage.

Change-Id: I37da6ad3306af138aa16cf73a116f0391d06675f
2020-02-12 08:24:32 +00:00
Akihiro Motoki 8493304593 Fix doc-pot-filter to exclude ATC stats
The path of ATC stats CSV files in the generated POT seems to have changed.
As a result, strings from ATC stats are included to the generated POT file.
There is no need to translate them and the translation percentage will go
down. This commit adjust the filepath in doc-pot-filter.sh to make the POT
filter work as expected again.

Change-Id: Ieeee86619a561fcca216b568797bd6c3c1de4d62
2020-01-05 05:25:21 +09:00
Ian Y. Choi 395ab089f6 Sync translation_team.yaml with Zanata
This list is generated by running "tox -e zanata-users-sync"
command to sync translation members up-to-date.

Change-Id: I5a309564fae7229fdc097715bdbb1ce85d109753
2019-08-24 10:47:16 +07:00
lijunjie 2c2e7f6044 Fix the misspelling of "language"
Change-Id: Ib81e7f4805a2c136deb1a17106415c5a031a1f2f
2019-01-16 10:55:48 +08:00
Frank Kloeker e8db048a09 sync translation team from Zanata
Change-Id: I03635d6107543f46cd651898532fb51192355067
2019-01-03 18:05:40 +01:00
Frank Kloeker f91deab8fe Switch to translated docs build by openstackdocstheme
Change-Id: Ic10b4bfa469ac11e278bd0ecd8088418d61c4fd5
2018-12-07 07:50:58 +01:00
inspurericzhang 65f5630789 [Trivial Fix] modify spelling error of "resource"
Although it is spelling mistakes, it affects reading.

Change-Id: I35cf90a8b7eeeabb39e38761cdd0a3271bfc8098
2018-11-01 10:54:34 +08:00
Frank Kloeker 4b89a6635d fix language encoding in Python3
Change-Id: I01ea074d7c72c7887c979dd0c0bc63688a5f73eb
2018-09-21 14:37:12 +02:00
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
Ian Y. Choi e1bf6e74c9 [generatepot] Removes unnecessary -b option
To generate pot files using Sphinx, just using "-b gettext"
is sufficient and there is no need to additionally specify
"-b html".

Change-Id: I2eebeb5c575ed99be25980fbd3ec560f3bce2da3
2018-06-11 21:32:15 +09:00
Ian Y. Choi a926a87da5 [genereatepot] Generalizes with msggrep
- Changes generatepot logic which is general for all OpenStack
  project documentation translation support
- Generalizes generatepot.sh for all genereatepot jobs
  for project documentmentation translation by separating
  exclusion logic into doc-pot-filter.sh
- Utilizes msggrep to filter non-translation targets
  and not to include in translation source pot files
  doc-pot-filter.sh

Change-Id: Ibe0dcf599ad99db15af1ba50c9ddf0af5487fa24
2018-05-30 12:11:26 +09:00
Akihiro Motoki 1e1a033c8e doc: avoid RST files in subdirectory
We are discussing an approach on translation support in
project documents in https://review.openstack.org/#/c/543220/.
In this approach POT files for RST files in subdirectory are
treated differently. In the i18n doc, atc-stats directory is
the only exception and the thing would be much simpler if it
is moved to a top directory.

tools/generatepot.sh is updated accordingly.

Also generatepot.sh is added to pep8 tox env to confirm
generatepot.sh works successfully.

Change-Id: Ia227358cf9681e8d1745f4c260fe9c97ab18a3e7
2018-04-18 11:22:09 +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
Zuul a34882d078 Merge "Add special docs build job" 2017-12-06 00:34:59 +00:00
Monty Taylor fab85312b0
Add special docs build job
The new PTI doesn't work for the way the i18n docs are built. Add a new
doc build job that runs tox -edocs for until we figure out a better path
to success.

Remove the add-marker code since that's done in the doc publication
jobs. Also stop rsyncing the code to a different directory, since it'll
make the normal build case wrong and is otherwise handled by the
publication jobs.

Change-Id: I5237e750b4bc4899d71952a14c8d2ca92d9985a0
2017-12-05 14:50:03 -06:00
Andreas Jaeger e0fda41f6c Fix build-docs
Fix error "[: too many arguments", the extra space is important.

Change-Id: I5ea3ccb0f83e59ff4d729934cb8af2de220e4226
2017-12-05 12:14:17 -06:00
Jenkins 84576bfa3c Merge "Fix language index for document in sub directories" 2017-09-12 01:16:07 +00:00
Akihiro Motoki 25bb85da67 Fix language index for document in sub directories
The previous version did not care the case where documents are placed
in any sub directories. It assumes all documents are placed
in the top doc directory.

We now have atc-stats/***.html and the previous build script
does not work for these pages.

This commit fixes the problem.

Change-Id: Ic19c2de6e4bf3f4f5c7ae6dd79372a19fddcc7c3
2017-09-11 23:41:20 +00:00
ChJR e05d6d58a9 Fixes tox pep8 error in macOS
Let's remove xargs GNU Extended option -r, --no-run-if-empty in tox.ini.

Change-Id: Ia014da76d51fa538513702560cd86da2bb1ae958
2017-08-21 09:03:31 +00:00
minwook-shin 8a42e4fa2b Excludes csv stat data from pot generation
*.csv files which contain translation statistics
do not need to be translated to local languages.

Change-Id: I88f11b8fef7221129c81493a17830f271b484767
Co-Authored-By: Ian Y. Choi <ianyrchoi@gmail.com>
Closes-Bug: #1710787
2017-08-15 17:45:48 +09: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 c1dc203aba Add a check if a proposed team member list is current
It is a boring job to review a patch to update the team member list.
To avoid this, this commit proposes a bit improved approach.

- When you want to propose an update of the team member list,
  you need to sync all members with Zanata.
  If you want to add you, you need to propose a latest member list.
  The new list may contains someone other than you.
- pep8 job checks a proposed member list is up-to-date.
  If not, the job fails.

To make it easy to sync all members with Zanata, a tox target
'zanata-users-sync' is added. To download the latest member list
of all language teams, just run:

  tox -e zanata-users-sync

Change-Id: I393a6b77261f6a3d7788a4c4f57bd6fdc95b5146
2017-07-31 15:19:43 +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