1
0
mirror of synced 2026-01-07 09:01:31 -05:00

Merge pull request #23034 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2023-01-05 19:53:10 -05:00
committed by GitHub
2 changed files with 62 additions and 21 deletions

View File

@@ -16,56 +16,50 @@ jobs:
create-translation-health-report:
name: Create translation health report
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
runs-on: ubuntu-20.04-xl
# This sets a maximum execution time of 300 minutes (5 hours)
# to prevent the workflow from running longer than necessary.
timeout-minutes: 300
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
- language: es
language_dir: translations/es-ES
language_dir: translations/es-es
language_repo: github/docs-internal.es-es
- language: ja
language_dir: translations/ja-JP
language_dir: translations/ja-jp
language_repo: github/docs-internal.ja-jp
- language: pt
language_dir: translations/pt-BR
language_dir: translations/pt-br
language_repo: github/docs-internal.pt-br
- language: zh
language_dir: translations/zh-CN
language_dir: translations/zh-cn
language_repo: github/docs-internal.zh-cn
- language: ru
language_dir: translations/ru-RU
language_dir: translations/ru-ru
language_repo: github/docs-internal.ru-ru
- language: ko
language_dir: translations/ko-KR
language_dir: translations/ko-kr
language_repo: github/docs-internal.ko-kr
- language: fr
language_dir: translations/fr-FR
language_dir: translations/fr-fr
language_repo: github/docs-internal.fr-fr
- language: de
language_dir: translations/de-DE
language_dir: translations/de-de
language_repo: github/docs-internal.de-de
steps:
- name: Checkout the docs-internal repo
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Remove all language translations
run: |
git rm -rf --quiet ${{ matrix.language_dir }}/content
git rm -rf --quiet ${{ matrix.language_dir }}/data
- name: Checkout the language-specific repo
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
@@ -91,25 +85,42 @@ jobs:
node script/i18n/create-translation-health-report.js \
--language ${{ matrix.language }} \
--gitref ${{ env.gitref }} \
>> $HOME/translation-health-report.json
>> $GITHUB_WORKSPACE/translation-health-report.json
- name: View report in workflow
run: cat $GITHUB_WORKSPACE/translation-health-report.json
- name: Log in to Azure
uses: azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf
with:
creds: ${{ secrets.PROD_AZURE_CREDENTIALS }}
- name: Upload to Azure blob storage
# https://learn.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-upload
# https://github.com/marketplace/actions/azure-cli-action
- name: Upload latest to Azure blob storage
uses: azure/CLI@61bb69d64d613b52663984bf12d6bac8fd7b3cc8
with:
inlineScript: |
az storage blob upload \
--name "${{ matrix.language }}-latest.json" \
--file $HOME/translation-health-report.json \
--container-name translation-health-reports
--file $GITHUB_WORKSPACE/translation-health-report.json \
--account-name githubdocs \
--account-key ${{ secrets.AZURE_GITHUBDOCS_STORAGE_KEY }} \
--container-name translation-health-reports \
--overwrite true
- name: Upload date formatted to Azure blob storage
uses: azure/CLI@61bb69d64d613b52663984bf12d6bac8fd7b3cc8
with:
inlineScript: |
# Write a date formatted for historical reference
az storage blob upload \
--name "${{ matrix.language }}-$(date +%Y-%m-%d).json" \
--file $HOME/translation-health-report.json \
--container-name translation-health-reports
--file $GITHUB_WORKSPACE/translation-health-report.json \
--account-name githubdocs \
--account-key ${{ secrets.AZURE_GITHUBDOCS_STORAGE_KEY }} \
--container-name translation-health-reports \
--overwrite true
- name: Log out from Azure
if: always()

View File

@@ -1,6 +1,7 @@
# Translation guide for translators
## Translated files
We only translate:
- all files `/content`
- `/data/release-notes`
@@ -10,6 +11,7 @@ We only translate:
- `/data/product-examples`
## Translation guidelines
We do not accept translation changes from open source contributors.
- [ ] Lint all `*.yml` files before submitting to make sure they are valid YAML format.
@@ -17,3 +19,31 @@ We do not accept translation changes from open source contributors.
- [ ] Do not translate anything inside of Liquid tags, such as `{% data %}` or `{% ifversion ... %}`, `{% note %}` or `{{ someVariable }}`.
- [ ] Be sure to translate the frontmatter properties `title`, `shortTitle`, `intro`, `permissions` but leave all other keys in each content `.md` file
- [ ] For every `{% ifversion ... %}` there's a `{% endif %}` following it
## Error diagnosis
We provide error reports that we upload daily.
<details>
<summary>Report locations</summary>
We have both "latest" or date in 'yyyy-mm-dd' format for historical reference.
- https://githubdocs.blob.core.windows.net/translation-health-reports/es-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/es-2023-01-05.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/ja-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/ja-2023-01-05.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/pt-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/pt-2023-01-05.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/zh-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/zh-2023-01-05.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/ru-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/ru-2023-01-05.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/ko-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/ko-2023-01-05.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/fr-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/fr-2023-01-05.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/de-latest.json
- https://githubdocs.blob.core.windows.net/translation-health-reports/de-2023-01-05.json
</details>