Update language order to en,es,ja,pt,zh,ru,fr,ko,de (#54847)
This commit is contained in:
56
.github/actions/clone-translations/action.yml
vendored
56
.github/actions/clone-translations/action.yml
vendored
@@ -10,13 +10,6 @@ inputs:
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Clone Simplified Chinese
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.zh-cn
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/zh-cn
|
||||
|
||||
- name: Clone Spanish
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
@@ -24,20 +17,6 @@ runs:
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/es-es
|
||||
|
||||
- name: Clone Portuguese
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.pt-br
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/pt-br
|
||||
|
||||
- name: Clone Russian
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.ru-ru
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/ru-ru
|
||||
|
||||
- name: Clone Japanese
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
@@ -45,6 +24,27 @@ runs:
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/ja-jp
|
||||
|
||||
- name: Clone Portuguese
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.pt-br
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/pt-br
|
||||
|
||||
- name: Clone Simplified Chinese
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.zh-cn
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/zh-cn
|
||||
|
||||
- name: Clone Russian
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.ru-ru
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/ru-ru
|
||||
|
||||
- name: Clone French
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
@@ -52,16 +52,16 @@ runs:
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/fr-fr
|
||||
|
||||
- name: Clone German
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.de-de
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/de-de
|
||||
|
||||
- name: Clone Korean
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.ko-kr
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/ko-kr
|
||||
|
||||
- name: Clone German
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
repository: github/docs-internal.de-de
|
||||
token: ${{ inputs.token }}
|
||||
path: translations/de-de
|
||||
|
||||
4
.github/workflows/index-general-search.yml
vendored
4
.github/workflows/index-general-search.yml
vendored
@@ -13,7 +13,7 @@ on:
|
||||
required: false
|
||||
default: ''
|
||||
languages:
|
||||
description: "Comma separated languages. E.g. 'en,zh,es,pt,ru,ja,fr,de,ko' (defaults to all)"
|
||||
description: "Comma separated languages. E.g. 'en,es,ja,pt,zh,ru,fr,ko,de' (defaults to all)"
|
||||
required: false
|
||||
default: ''
|
||||
schedule:
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
script: |
|
||||
// Edit this list for the definitive list of languages
|
||||
// (other than English) we want to index in Elasticsearch.
|
||||
const allNonEnglish = ["zh", "es", "pt", "ru", "ja", "fr", "de", "ko"]
|
||||
const allNonEnglish = 'es,ja,pt,zh,ru,fr,ko,de'.split(',')
|
||||
const allPossible = ["en", ...allNonEnglish]
|
||||
|
||||
if (context.eventName === "workflow_run") {
|
||||
|
||||
2
.github/workflows/purge-fastly.yml
vendored
2
.github/workflows/purge-fastly.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
languages:
|
||||
description: "Comma separated languages. E.g. 'en,zh,es,pt,ru,ja,fr,de,ko' (defaults to en)"
|
||||
description: "Comma separated languages. E.g. 'en,es,ja,pt,zh,ru,fr,ko,de' (defaults to en)"
|
||||
required: false
|
||||
default: 'en' # Temporary, only purge English on deploy. Set to empty string for all
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ data:
|
||||
NODE_ENV: production
|
||||
NODE_OPTIONS: '--max-old-space-size=4096'
|
||||
PORT: '4000'
|
||||
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko'
|
||||
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
|
||||
RATE_LIMIT_MAX: '21'
|
||||
# Moda uses a non-default port for sending datadog metrics
|
||||
DD_DOGSTATSD_PORT: '28125'
|
||||
|
||||
@@ -3,7 +3,7 @@ data:
|
||||
NODE_ENV: production
|
||||
NODE_OPTIONS: '--max-old-space-size=4096'
|
||||
PORT: '4000'
|
||||
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko'
|
||||
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
|
||||
RATE_LIMIT_MAX: '21'
|
||||
# Moda uses a non-default port for sending datadog metrics
|
||||
DD_DOGSTATSD_PORT: '28125'
|
||||
|
||||
@@ -79,12 +79,12 @@ Alternatively, once logged into one account, access the account switcher to log
|
||||
{% data variables.product.prodname_mobile %} is available in the following languages.
|
||||
|
||||
* English
|
||||
* Spanish
|
||||
* Japanese
|
||||
* Brazilian Portuguese
|
||||
* Simplified Chinese
|
||||
* Spanish
|
||||
* German
|
||||
* Korean
|
||||
* German
|
||||
|
||||
If you configure the language on your device to a supported language, {% data variables.product.prodname_mobile %} will default to the language. You can change the language for {% data variables.product.prodname_mobile %} in {% data variables.product.prodname_mobile %}'s **Settings** menu.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Your capabilities in the {% data variables.contact.landing_page_portal %} depend
|
||||
|
||||
{% data reusables.support.view-open-tickets %}
|
||||
1. Under the text box, you can read the comment history. The most recent response is at the top.
|
||||
1. Optionally, to translate the ticket comment, click {% octicon "globe" aria-label="The globe icon" %} and choose your preferred language from the dropdown menu. You can translate your support ticket into Chinese (Simplified), French, German, Japanese, Portuguese (Brazil), or Spanish.
|
||||
1. Optionally, to translate the ticket comment, click {% octicon "globe" aria-label="The globe icon" %} and choose your preferred language from the dropdown menu. You can translate your support ticket into Spanish, Japanese, Portuguese (Brazil), Chinese (Simplified), French, or German.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
You can translate English comments on a ticket into Chinese (Simplified), French, German, Japanese, Portuguese (Brazil), or Spanish. However, when responding to tickets, you should use English, unless your {% data variables.product.prodname_dotcom %} plan permits you to respond in Japanese. For more information, see [AUTOTITLE](/support/contacting-github-support/viewing-and-updating-support-tickets).
|
||||
You can translate English comments on a ticket into Spanish, Japanese, Portuguese (Brazil), Chinese (Simplified), French, or German. However, when responding to tickets, you should use English, unless your {% data variables.product.prodname_dotcom %} plan permits you to respond in Japanese. For more information, see [AUTOTITLE](/support/contacting-github-support/viewing-and-updating-support-tickets).
|
||||
|
||||
@@ -35,7 +35,7 @@ cd translations
|
||||
|
||||
# Iterate over each language
|
||||
echo "Fetching translations..."
|
||||
for lang in "zh-cn" "es-es" "pt-br" "ru-ru" "ja-jp" "fr-fr" "de-de" "ko-kr"
|
||||
for lang in "es-es" "ja-jp" "pt-br" "zh-cn" "ru-ru" "fr-fr" "ko-kr" "de-de"
|
||||
do
|
||||
translations_repo="docs-internal.$lang"
|
||||
clone_or_use_cached_repo "$lang" "$translations_repo" "main"
|
||||
@@ -49,4 +49,4 @@ cd ..
|
||||
# Cleanup
|
||||
# - - - - - - - - - -
|
||||
# Delete GITHUB_TOKEN from the environment
|
||||
unset GITHUB_TOKEN
|
||||
unset GITHUB_TOKEN
|
||||
|
||||
@@ -175,25 +175,25 @@ This step will remove the version from the drop-down picker, effectively depreca
|
||||
|
||||
You can clone the translation repositories directly inside of your docs-internal checkout, but I'd recommend cloning them in a separate directory. For example, create a `translations` directory at the same level as your `docs-internal` directory. Inside of the `translations` directory, clone the following repoisitories (ensure this list includes all languages that we are supporting):
|
||||
|
||||
- [docs-internal.de-de](https://github.com/github/docs-internal.de-de)
|
||||
- [docs-internal.fr-fr](https://github.com/github/docs-internal.fr-fr)
|
||||
- [docs-internal.ko-kr](https://github.com/github/docs-internal.ko-kr)
|
||||
- [docs-internal.ru-ru](https://github.com/github/docs-internal.ru-ru)
|
||||
- [docs-internal.es-es](https://github.com/github/docs-internal.es-es)
|
||||
- [docs-internal.ja-jp](https://github.com/github/docs-internal.ja-jp)
|
||||
- [docs-internal.pt-br](https://github.com/github/docs-internal.pt-br)
|
||||
- [docs-internal.zh-cn](https://github.com/github/docs-internal.zh-cn)
|
||||
- [docs-internal.ru-ru](https://github.com/github/docs-internal.ru-ru)
|
||||
- [docs-internal.fr-fr](https://github.com/github/docs-internal.fr-fr)
|
||||
- [docs-internal.ko-kr](https://github.com/github/docs-internal.ko-kr)
|
||||
- [docs-internal.de-de](https://github.com/github/docs-internal.de-de)
|
||||
|
||||
To map the location of each translation repository, edit your `.env` file with the mapping. For example, if following the locations suggested above, your `.env` file might look like this:
|
||||
|
||||
```shell
|
||||
TRANSLATIONS=/Users/mona/repos/github-repos/translations
|
||||
TRANSLATIONS_ROOT_ES_ES=${TRANSLATIONS}/docs-internal.es-es
|
||||
TRANSLATIONS_ROOT_ZH_CN=${TRANSLATIONS}/docs-internal.zh-cn
|
||||
TRANSLATIONS_ROOT_JA_JP=${TRANSLATIONS}/docs-internal.ja-jp
|
||||
TRANSLATIONS_ROOT_PT_BR=${TRANSLATIONS}/docs-internal.pt-br
|
||||
TRANSLATIONS_ROOT_FR_FR=${TRANSLATIONS}/docs-internal.fr-fr
|
||||
TRANSLATIONS_ROOT_ZH_CN=${TRANSLATIONS}/docs-internal.zh-cn
|
||||
TRANSLATIONS_ROOT_RU_RU=${TRANSLATIONS}/docs-internal.ru-ru
|
||||
TRANSLATIONS_ROOT_FR_FR=${TRANSLATIONS}/docs-internal.fr-fr
|
||||
TRANSLATIONS_ROOT_KO_KR=${TRANSLATIONS}/docs-internal.ko-kr
|
||||
TRANSLATIONS_ROOT_DE_DE=${TRANSLATIONS}/docs-internal.de-de
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Languages
|
||||
|
||||
Languages refers to the different translations we support on docs.github.com. Currently, our supported languages include Chinese, Spanish, Portuguese, Russian, Japanese, French, German, and Korean.
|
||||
Languages refers to the different translations we support on docs.github.com. Currently, our supported languages include Spanish, Japanese, Portuguese, Chinese, Russian, French, Korean, and German.
|
||||
|
||||
## TLDR: How translations work
|
||||
|
||||
@@ -106,14 +106,14 @@ This section assumes you want your local environment to replicate the structure
|
||||
cd docs-internal
|
||||
mkdir translations && cd translations
|
||||
|
||||
git clone <zh-cn-repo-url> zh-cn
|
||||
git clone <ja-jp-repo-url> ja-jp
|
||||
git clone <es-es-repo-url> es-es
|
||||
git clone <ja-jp-repo-url> ja-jp
|
||||
git clone <pt-br-repo-url> pt-br
|
||||
git clone <de-de-repo-url> de-de
|
||||
git clone <fr-fr-repo-url> fr-fr
|
||||
git clone <zh-cn-repo-url> zh-cn
|
||||
git clone <ru-ru-repo-url> ru-ru
|
||||
git clone <fr-fr-repo-url> fr-fr
|
||||
git clone <ko-kr-repo-url> ko-kr
|
||||
git clone <de-de-repo-url> de-de
|
||||
```
|
||||
1. Start the development server with `npm run start-all-languages`. If you need to enable specific languages, you can set `ENABLED_LANGUAGES`. For example, to start the server with English, Japanese, and Spanish only, use: `ENABLED_LANGUAGES=en,ja,es NODE_ENV=development nodemon server.js`
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@ import { ROOT, TRANSLATIONS_ROOT, TRANSLATIONS_FIXTURE_ROOT } from '#src/frame/l
|
||||
dotenv.config()
|
||||
|
||||
const possibleEnvVars = {
|
||||
'zh-cn': process.env.TRANSLATIONS_ROOT_ZH_CN,
|
||||
'es-es': process.env.TRANSLATIONS_ROOT_ES_ES,
|
||||
'pt-br': process.env.TRANSLATIONS_ROOT_PT_BR,
|
||||
'ru-ru': process.env.TRANSLATIONS_ROOT_RU_RU,
|
||||
'ja-jp': process.env.TRANSLATIONS_ROOT_JA_JP,
|
||||
'pt-br': process.env.TRANSLATIONS_ROOT_PT_BR,
|
||||
'zh-cn': process.env.TRANSLATIONS_ROOT_ZH_CN,
|
||||
'ru-ru': process.env.TRANSLATIONS_ROOT_RU_RU,
|
||||
'fr-fr': process.env.TRANSLATIONS_ROOT_FR_FR,
|
||||
'de-de': process.env.TRANSLATIONS_ROOT_DE_DE,
|
||||
'ko-kr': process.env.TRANSLATIONS_ROOT_KO_KR,
|
||||
'de-de': process.env.TRANSLATIONS_ROOT_DE_DE,
|
||||
}
|
||||
|
||||
function getRoot(languageCode) {
|
||||
@@ -51,14 +51,6 @@ const allLanguages = {
|
||||
hreflang: 'en',
|
||||
dir: getRoot('en'),
|
||||
},
|
||||
zh: {
|
||||
name: 'Simplified Chinese',
|
||||
nativeName: '简体中文',
|
||||
code: 'zh',
|
||||
hreflang: 'zh-Hans',
|
||||
redirectPatterns: [/^\/cn/, /^\/zh-\w{2}/],
|
||||
dir: getRoot('zh-cn'),
|
||||
},
|
||||
es: {
|
||||
name: 'Spanish',
|
||||
nativeName: 'Español',
|
||||
@@ -66,21 +58,6 @@ const allLanguages = {
|
||||
hreflang: 'es',
|
||||
dir: getRoot('es-es'),
|
||||
},
|
||||
pt: {
|
||||
name: 'Portuguese',
|
||||
nativeName: 'Português do Brasil',
|
||||
code: 'pt',
|
||||
hreflang: 'pt',
|
||||
redirectPatterns: [/^\/br/],
|
||||
dir: getRoot('pt-br'),
|
||||
},
|
||||
ru: {
|
||||
name: 'Russian',
|
||||
nativeName: 'Русский',
|
||||
code: 'ru',
|
||||
hreflang: 'ru',
|
||||
dir: getRoot('ru-ru'),
|
||||
},
|
||||
ja: {
|
||||
name: 'Japanese',
|
||||
nativeName: '日本語',
|
||||
@@ -89,6 +66,29 @@ const allLanguages = {
|
||||
redirectPatterns: [/^\/jp/],
|
||||
dir: getRoot('ja-jp'),
|
||||
},
|
||||
pt: {
|
||||
name: 'Portuguese',
|
||||
nativeName: 'Português do Brasil',
|
||||
code: 'pt',
|
||||
hreflang: 'pt',
|
||||
redirectPatterns: [/^\/br/],
|
||||
dir: getRoot('pt-br'),
|
||||
},
|
||||
zh: {
|
||||
name: 'Simplified Chinese',
|
||||
nativeName: '简体中文',
|
||||
code: 'zh',
|
||||
hreflang: 'zh-Hans',
|
||||
redirectPatterns: [/^\/cn/, /^\/zh-\w{2}/],
|
||||
dir: getRoot('zh-cn'),
|
||||
},
|
||||
ru: {
|
||||
name: 'Russian',
|
||||
nativeName: 'Русский',
|
||||
code: 'ru',
|
||||
hreflang: 'ru',
|
||||
dir: getRoot('ru-ru'),
|
||||
},
|
||||
fr: {
|
||||
name: 'French',
|
||||
nativeName: 'Français',
|
||||
@@ -96,13 +96,6 @@ const allLanguages = {
|
||||
hreflang: 'fr',
|
||||
dir: getRoot('fr-fr'),
|
||||
},
|
||||
de: {
|
||||
name: 'German',
|
||||
nativeName: 'Deutsch',
|
||||
code: 'de',
|
||||
hreflang: 'de',
|
||||
dir: getRoot('de-de'),
|
||||
},
|
||||
ko: {
|
||||
name: 'Korean',
|
||||
nativeName: '한국어',
|
||||
@@ -111,6 +104,13 @@ const allLanguages = {
|
||||
redirectPatterns: [/^\/kr/],
|
||||
dir: getRoot('ko-kr'),
|
||||
},
|
||||
de: {
|
||||
name: 'German',
|
||||
nativeName: 'Deutsch',
|
||||
code: 'de',
|
||||
hreflang: 'de',
|
||||
dir: getRoot('de-de'),
|
||||
},
|
||||
}
|
||||
// Some markdownlint tests depend on having access to all
|
||||
// language keys. Not modifying the original object makes
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
rm -rf translations
|
||||
mkdir translations
|
||||
|
||||
for lang in "zh-cn" "es-es" "pt-br" "ru-ru" "ja-jp" "fr-fr" "de-de" "ko-kr"
|
||||
for lang in "es-es" "ja-jp" "pt-br" "zh-cn" "ru-ru" "fr-fr" "ko-kr" "de-de"
|
||||
do
|
||||
(cd translations && git clone --depth 1 "https://github.com/github/docs-internal.$lang.git" $lang)
|
||||
done
|
||||
|
||||
@@ -5,57 +5,49 @@
|
||||
|
||||
set -ex
|
||||
|
||||
# 1
|
||||
pushd de-de
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
# 2
|
||||
pushd es-es
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
# 3
|
||||
pushd fr-fr
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
# 4
|
||||
pushd ja-jp
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
# 5
|
||||
pushd ko-kr
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
# 6
|
||||
pushd pt-br
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
# 7
|
||||
pushd zh-cn
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
pushd ru-ru
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
# 8
|
||||
pushd zh-cn
|
||||
pushd fr-fr
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
pushd ko-kr
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
popd
|
||||
|
||||
pushd de-de
|
||||
git diff --exit-code
|
||||
git checkout main
|
||||
git pull origin main
|
||||
|
||||
@@ -37,8 +37,8 @@ describe('redirects', () => {
|
||||
|
||||
test.each([
|
||||
['/jp', '/ja'],
|
||||
['/zh-CN', '/zh'],
|
||||
['/br', '/pt'],
|
||||
['/zh-CN', '/zh'],
|
||||
['/kr', '/ko'],
|
||||
])('redirects %s to %s', async (from, to_) => {
|
||||
const res = await get(from)
|
||||
|
||||
@@ -17,7 +17,7 @@ You can also query our search endpoint directly at:
|
||||
`https://docs.github.com/search?version=<VERSION>&language=<LANGUAGE CODE>&query=<QUERY>`
|
||||
|
||||
- The `VERSION` can be any numbered supported GitHub Enterprise Server version (e.g., `3.12`), Enterprise Cloud (`ghec`), or the Free pro team plan (`dotcom`).
|
||||
- The `LANGUAGE CODE` can be one of: `zh`, `es`, `pt`, `ru`, `ja`, `fr`, `de`, `ko`
|
||||
- The `LANGUAGE CODE` can be one of: `es`, `ja`, `pt`, `zh`, `ru`, `fr`, `ko`, `de`
|
||||
- The `QUERY` can be any alphanumeric string value.
|
||||
|
||||
## Types of search
|
||||
|
||||
Reference in New Issue
Block a user