Skip to content

Commit

Permalink
chore: update transifex instruction (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
leangseu-edx authored May 30, 2023
1 parent 3dbdb80 commit a3d380b
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions docs/how_tos/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,9 @@ Create empty translation files in your repo
Create your pipeline job on Jenkins
***********************************

#. In the ``edx-internal`` repo, add your job to `tools-edx-jenkins/translation-jobs.yml <https://github.com/edx/edx-internal/blob/master/tools-edx-jenkins/translation-jobs.yml>`__, using one of the existing frontend apps as a model.

* Add an opsgenie email address that actually exists :-) so you get notified of failures.
#. Test your change locally.

* You will need to set up OpsGenie to properly send these alerts, and to auto-close notifications when Jenkins goes back to normal.

* In the command lines that run the job, put in your repo name and the GitHub team name that you'd like notifications sent to.

* The existing jobs push translation strings to Transifex daily, and pull completed translations once a week, on Sunday. You can pick your own schedule on the ``cron`` line. It's best to move your new job off of 8PM UTC, so we don't have to worry about the Transifex API rate limit described above.

* Note that the Jenkins machine uses UTC.

#. Test your change locally.
* __NOTE__: You need the existing project resource on Transifiex or have the priviledge to create it. Otherwise skip to the next step.

* Clone https://github.com/openedx/ecommerce-scripts.

Expand All @@ -196,16 +186,32 @@ Create your pipeline job on Jenkins

* Examples: ``python transifex/pull.py https://github.com/openedx/edx-platform.git edx/sustaining-team``. You might be required to setup environment variable ``GITHUB_ACCESS_TOKEN`` with your personal github account.

* For ``push_translations``, you might also need transifex authentication. If the project hasn't been created on the Transifex, it is necessary to push first. If there are problems with transifex auth or priviledge, you should proceed to the next step and run push job from jenkins instead.
* For ``push_translations``, you also need transifex authentication. This action will try to create project resource if it isn't existed yet. If you don't have permission, it will fail.

* For ``pull_translations``, it should try to create a pull request and merge it to the repo.

#. Open a pull request with your change, then `open a devops ticket <https://openedx.atlassian.net/servicedesk/customer/portal/3>`_ requesting them to review your pull request and rerun the seed job. Only devops can merge pull requests in this repo.
#. In the ``edx-internal`` repo, add your job to `tools-edx-jenkins/translation-jobs.yml <https://github.com/edx/edx-internal/blob/master/tools-edx-jenkins/translation-jobs.yml>`__, using one of the existing frontend apps as a model.

* For ``edx.org``, you can create the job by build https://tools-edx-jenkins.edx.org/job/Seed%20Jobs/job/Translation%20Seed%20Jobs/. (You need to connect to the edX VPN)
* Add an opsgenie email address that actually exists :-) so you get notified of failures.

* You will need to set up OpsGenie to properly send these alerts, and to auto-close notifications when Jenkins goes back to normal.

* In the command lines that run the job, put in your repo name and the GitHub team name that you'd like notifications sent to.

* The existing jobs push translation strings to Transifex daily, and pull completed translations once a week, on Sunday. You can pick your own schedule on the ``cron`` line. It's best to move your new job off of 8PM UTC, so we don't have to worry about the Transifex API rate limit described above.

* Note that the Jenkins machine uses UTC.

#. Open a pull request with your change. If you do't have permission or someone to review, you can `open a devops ticket <https://openedx.atlassian.net/servicedesk/customer/portal/3>`_ requesting them to review your pull request and rerun the seed job. Only devops can merge pull requests in this repo.

#. Once the change get merge, you can build https://tools-edx-jenkins.edx.org/job/Seed%20Jobs/job/Translation%20Seed%20Jobs/ to have the change propegated. (You need to connect to the edX VPN)

* If you don't have permission, you can wait for the job to propegate. It takes up to one day.

#. Connect to the edX VPN to see your two new jobs at https://tools-edx-jenkins.edx.org/job/translations/ . ``push_translations`` extracts the strings from your repo and pushes them to Transifex. ``pull_translations`` pulls the translated strings from Transifex and checks them into your repo. You can test these jobs out by running them manually.

* The first job you need to run is ``push_translations``. This would create project resource on Transifex if the resource isn't existed yet.

* If you can't see this page, you might need to be added to the ``jenkins-tools-translation-jobs`` team in GitHub.

******************************
Expand Down

0 comments on commit a3d380b

Please sign in to comment.