Download Crowdin translations #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code is a Qiskit project. | |
# | |
# (C) Copyright IBM 2023. | |
# | |
# This code is licensed under the Apache License, Version 2.0. You may | |
# obtain a copy of this license in the LICENSE file in the root directory | |
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | |
# | |
# Any modifications or derivative works of this code must retain this | |
# copyright notice, and modified files need to carry a notice indicating | |
# that they have been altered from the originals. | |
# This Action downloads the translations from Crowdin once a week. | |
# | |
# The Translations team requested the updates to be once a week because | |
# they think it's a good balance between giving enough time for translations | |
# vs. the docs becoming out-of-date. This schedule can be revisited with | |
# the Translations team. | |
# | |
# We may also want to have per-language configuration. For example, one language | |
# is updated every week, whereas another every two weeks. But for now, all | |
# languages are treated the same to keep things simple. | |
name: Download Crowdin translations | |
on: | |
schedule: | |
- cron: "0 5 * * 1" # Every Monday at 5:00 am UTC | |
workflow_dispatch: | |
jobs: | |
download-translations: | |
if: github.repository_owner == 'Qiskit' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download translations | |
uses: crowdin/github-action@v1 | |
with: | |
upload_sources: false | |
upload_translations: false | |
download_sources: false | |
download_translations: true | |
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} | |
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |