Skip to content

Commit 887495c

Browse files
authored
Update language order to en,es,ja,pt,zh,ru,fr,ko,de (#54847)
1 parent 7e17175 commit 887495c

File tree

16 files changed

+77
-85
lines changed

16 files changed

+77
-85
lines changed

.github/actions/clone-translations/action.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ inputs:
1010
runs:
1111
using: 'composite'
1212
steps:
13-
- name: Clone Simplified Chinese
13+
- name: Clone Spanish
1414
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1515
with:
16-
repository: github/docs-internal.zh-cn
16+
repository: github/docs-internal.es-es
1717
token: ${{ inputs.token }}
18-
path: translations/zh-cn
18+
path: translations/es-es
1919

20-
- name: Clone Spanish
20+
- name: Clone Japanese
2121
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2222
with:
23-
repository: github/docs-internal.es-es
23+
repository: github/docs-internal.ja-jp
2424
token: ${{ inputs.token }}
25-
path: translations/es-es
25+
path: translations/ja-jp
2626

2727
- name: Clone Portuguese
2828
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -31,19 +31,19 @@ runs:
3131
token: ${{ inputs.token }}
3232
path: translations/pt-br
3333

34-
- name: Clone Russian
34+
- name: Clone Simplified Chinese
3535
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3636
with:
37-
repository: github/docs-internal.ru-ru
37+
repository: github/docs-internal.zh-cn
3838
token: ${{ inputs.token }}
39-
path: translations/ru-ru
39+
path: translations/zh-cn
4040

41-
- name: Clone Japanese
41+
- name: Clone Russian
4242
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4343
with:
44-
repository: github/docs-internal.ja-jp
44+
repository: github/docs-internal.ru-ru
4545
token: ${{ inputs.token }}
46-
path: translations/ja-jp
46+
path: translations/ru-ru
4747

4848
- name: Clone French
4949
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -52,16 +52,16 @@ runs:
5252
token: ${{ inputs.token }}
5353
path: translations/fr-fr
5454

55-
- name: Clone German
55+
- name: Clone Korean
5656
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5757
with:
58-
repository: github/docs-internal.de-de
58+
repository: github/docs-internal.ko-kr
5959
token: ${{ inputs.token }}
60-
path: translations/de-de
60+
path: translations/ko-kr
6161

62-
- name: Clone Korean
62+
- name: Clone German
6363
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6464
with:
65-
repository: github/docs-internal.ko-kr
65+
repository: github/docs-internal.de-de
6666
token: ${{ inputs.token }}
67-
path: translations/ko-kr
67+
path: translations/de-de

.github/workflows/index-general-search.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
required: false
1414
default: ''
1515
languages:
16-
description: "Comma separated languages. E.g. 'en,zh,es,pt,ru,ja,fr,de,ko' (defaults to all)"
16+
description: "Comma separated languages. E.g. 'en,es,ja,pt,zh,ru,fr,ko,de' (defaults to all)"
1717
required: false
1818
default: ''
1919
schedule:
@@ -51,7 +51,7 @@ jobs:
5151
script: |
5252
// Edit this list for the definitive list of languages
5353
// (other than English) we want to index in Elasticsearch.
54-
const allNonEnglish = ["zh", "es", "pt", "ru", "ja", "fr", "de", "ko"]
54+
const allNonEnglish = 'es,ja,pt,zh,ru,fr,ko,de'.split(',')
5555
const allPossible = ["en", ...allNonEnglish]
5656
5757
if (context.eventName === "workflow_run") {

.github/workflows/purge-fastly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010
inputs:
1111
languages:
12-
description: "Comma separated languages. E.g. 'en,zh,es,pt,ru,ja,fr,de,ko' (defaults to en)"
12+
description: "Comma separated languages. E.g. 'en,es,ja,pt,zh,ru,fr,ko,de' (defaults to en)"
1313
required: false
1414
default: 'en' # Temporary, only purge English on deploy. Set to empty string for all
1515

config/moda/configuration/default/env.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ data:
33
NODE_ENV: production
44
NODE_OPTIONS: '--max-old-space-size=4096'
55
PORT: '4000'
6-
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko'
6+
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
77
RATE_LIMIT_MAX: '21'
88
# Moda uses a non-default port for sending datadog metrics
99
DD_DOGSTATSD_PORT: '28125'

config/moda/configuration/production/env.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ data:
33
NODE_ENV: production
44
NODE_OPTIONS: '--max-old-space-size=4096'
55
PORT: '4000'
6-
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko'
6+
ENABLED_LANGUAGES: 'en,es,ja,pt,zh,ru,fr,ko,de'
77
RATE_LIMIT_MAX: '21'
88
# Moda uses a non-default port for sending datadog metrics
99
DD_DOGSTATSD_PORT: '28125'

content/get-started/using-github/github-mobile.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ Alternatively, once logged into one account, access the account switcher to log
7979
{% data variables.product.prodname_mobile %} is available in the following languages.
8080

8181
* English
82+
* Spanish
8283
* Japanese
8384
* Brazilian Portuguese
8485
* Simplified Chinese
85-
* Spanish
86-
* German
8786
* Korean
87+
* German
8888

8989
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.
9090

content/support/contacting-github-support/viewing-and-updating-support-tickets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Your capabilities in the {% data variables.contact.landing_page_portal %} depend
2727

2828
{% data reusables.support.view-open-tickets %}
2929
1. Under the text box, you can read the comment history. The most recent response is at the top.
30-
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.
30+
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.
3131

3232
![Screenshot of a support ticket with the dropdown menu showing the options for translation highlighted with a dark orange outline.](/assets/images/help/support/support-ticket-translation-options.png)
3333

Original file line numberDiff line numberDiff line change
@@ -1 +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).
1+
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).

src/deployments/production/build-scripts/fetch-repos.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ cd translations
3535

3636
# Iterate over each language
3737
echo "Fetching translations..."
38-
for lang in "zh-cn" "es-es" "pt-br" "ru-ru" "ja-jp" "fr-fr" "de-de" "ko-kr"
38+
for lang in "es-es" "ja-jp" "pt-br" "zh-cn" "ru-ru" "fr-fr" "ko-kr" "de-de"
3939
do
4040
translations_repo="docs-internal.$lang"
4141
clone_or_use_cached_repo "$lang" "$translations_repo" "main"
@@ -49,4 +49,4 @@ cd ..
4949
# Cleanup
5050
# - - - - - - - - - -
5151
# Delete GITHUB_TOKEN from the environment
52-
unset GITHUB_TOKEN
52+
unset GITHUB_TOKEN

src/ghes-releases/lib/deprecation-steps.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,25 @@ This step will remove the version from the drop-down picker, effectively depreca
175175

176176
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):
177177
178-
- [docs-internal.de-de](https://github.com/github/docs-internal.de-de)
179-
- [docs-internal.fr-fr](https://github.com/github/docs-internal.fr-fr)
180-
- [docs-internal.ko-kr](https://github.com/github/docs-internal.ko-kr)
181-
- [docs-internal.ru-ru](https://github.com/github/docs-internal.ru-ru)
182178
- [docs-internal.es-es](https://github.com/github/docs-internal.es-es)
183179
- [docs-internal.ja-jp](https://github.com/github/docs-internal.ja-jp)
184180
- [docs-internal.pt-br](https://github.com/github/docs-internal.pt-br)
185181
- [docs-internal.zh-cn](https://github.com/github/docs-internal.zh-cn)
182+
- [docs-internal.ru-ru](https://github.com/github/docs-internal.ru-ru)
183+
- [docs-internal.fr-fr](https://github.com/github/docs-internal.fr-fr)
184+
- [docs-internal.ko-kr](https://github.com/github/docs-internal.ko-kr)
185+
- [docs-internal.de-de](https://github.com/github/docs-internal.de-de)
186186
187187
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:
188188
189189
```shell
190190
TRANSLATIONS=/Users/mona/repos/github-repos/translations
191191
TRANSLATIONS_ROOT_ES_ES=${TRANSLATIONS}/docs-internal.es-es
192-
TRANSLATIONS_ROOT_ZH_CN=${TRANSLATIONS}/docs-internal.zh-cn
193192
TRANSLATIONS_ROOT_JA_JP=${TRANSLATIONS}/docs-internal.ja-jp
194193
TRANSLATIONS_ROOT_PT_BR=${TRANSLATIONS}/docs-internal.pt-br
195-
TRANSLATIONS_ROOT_FR_FR=${TRANSLATIONS}/docs-internal.fr-fr
194+
TRANSLATIONS_ROOT_ZH_CN=${TRANSLATIONS}/docs-internal.zh-cn
196195
TRANSLATIONS_ROOT_RU_RU=${TRANSLATIONS}/docs-internal.ru-ru
196+
TRANSLATIONS_ROOT_FR_FR=${TRANSLATIONS}/docs-internal.fr-fr
197197
TRANSLATIONS_ROOT_KO_KR=${TRANSLATIONS}/docs-internal.ko-kr
198198
TRANSLATIONS_ROOT_DE_DE=${TRANSLATIONS}/docs-internal.de-de
199199
```

src/languages/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Languages
22

3-
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.
3+
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.
44

55
## TLDR: How translations work
66

@@ -106,14 +106,14 @@ This section assumes you want your local environment to replicate the structure
106106
cd docs-internal
107107
mkdir translations && cd translations
108108

109-
git clone <zh-cn-repo-url> zh-cn
110-
git clone <ja-jp-repo-url> ja-jp
111109
git clone <es-es-repo-url> es-es
110+
git clone <ja-jp-repo-url> ja-jp
112111
git clone <pt-br-repo-url> pt-br
113-
git clone <de-de-repo-url> de-de
114-
git clone <fr-fr-repo-url> fr-fr
112+
git clone <zh-cn-repo-url> zh-cn
115113
git clone <ru-ru-repo-url> ru-ru
114+
git clone <fr-fr-repo-url> fr-fr
116115
git clone <ko-kr-repo-url> ko-kr
116+
git clone <de-de-repo-url> de-de
117117
```
118118
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`
119119

src/languages/lib/languages.js

+26-26
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import { ROOT, TRANSLATIONS_ROOT, TRANSLATIONS_FIXTURE_ROOT } from '#src/frame/l
1111
dotenv.config()
1212

1313
const possibleEnvVars = {
14-
'zh-cn': process.env.TRANSLATIONS_ROOT_ZH_CN,
1514
'es-es': process.env.TRANSLATIONS_ROOT_ES_ES,
15+
'ja-jp': process.env.TRANSLATIONS_ROOT_JA_JP,
1616
'pt-br': process.env.TRANSLATIONS_ROOT_PT_BR,
17+
'zh-cn': process.env.TRANSLATIONS_ROOT_ZH_CN,
1718
'ru-ru': process.env.TRANSLATIONS_ROOT_RU_RU,
18-
'ja-jp': process.env.TRANSLATIONS_ROOT_JA_JP,
1919
'fr-fr': process.env.TRANSLATIONS_ROOT_FR_FR,
20-
'de-de': process.env.TRANSLATIONS_ROOT_DE_DE,
2120
'ko-kr': process.env.TRANSLATIONS_ROOT_KO_KR,
21+
'de-de': process.env.TRANSLATIONS_ROOT_DE_DE,
2222
}
2323

2424
function getRoot(languageCode) {
@@ -51,21 +51,21 @@ const allLanguages = {
5151
hreflang: 'en',
5252
dir: getRoot('en'),
5353
},
54-
zh: {
55-
name: 'Simplified Chinese',
56-
nativeName: '简体中文',
57-
code: 'zh',
58-
hreflang: 'zh-Hans',
59-
redirectPatterns: [/^\/cn/, /^\/zh-\w{2}/],
60-
dir: getRoot('zh-cn'),
61-
},
6254
es: {
6355
name: 'Spanish',
6456
nativeName: 'Español',
6557
code: 'es',
6658
hreflang: 'es',
6759
dir: getRoot('es-es'),
6860
},
61+
ja: {
62+
name: 'Japanese',
63+
nativeName: '日本語',
64+
code: 'ja',
65+
hreflang: 'ja',
66+
redirectPatterns: [/^\/jp/],
67+
dir: getRoot('ja-jp'),
68+
},
6969
pt: {
7070
name: 'Portuguese',
7171
nativeName: 'Português do Brasil',
@@ -74,35 +74,28 @@ const allLanguages = {
7474
redirectPatterns: [/^\/br/],
7575
dir: getRoot('pt-br'),
7676
},
77+
zh: {
78+
name: 'Simplified Chinese',
79+
nativeName: '简体中文',
80+
code: 'zh',
81+
hreflang: 'zh-Hans',
82+
redirectPatterns: [/^\/cn/, /^\/zh-\w{2}/],
83+
dir: getRoot('zh-cn'),
84+
},
7785
ru: {
7886
name: 'Russian',
7987
nativeName: 'Русский',
8088
code: 'ru',
8189
hreflang: 'ru',
8290
dir: getRoot('ru-ru'),
8391
},
84-
ja: {
85-
name: 'Japanese',
86-
nativeName: '日本語',
87-
code: 'ja',
88-
hreflang: 'ja',
89-
redirectPatterns: [/^\/jp/],
90-
dir: getRoot('ja-jp'),
91-
},
9292
fr: {
9393
name: 'French',
9494
nativeName: 'Français',
9595
code: 'fr',
9696
hreflang: 'fr',
9797
dir: getRoot('fr-fr'),
9898
},
99-
de: {
100-
name: 'German',
101-
nativeName: 'Deutsch',
102-
code: 'de',
103-
hreflang: 'de',
104-
dir: getRoot('de-de'),
105-
},
10699
ko: {
107100
name: 'Korean',
108101
nativeName: '한국어',
@@ -111,6 +104,13 @@ const allLanguages = {
111104
redirectPatterns: [/^\/kr/],
112105
dir: getRoot('ko-kr'),
113106
},
107+
de: {
108+
name: 'German',
109+
nativeName: 'Deutsch',
110+
code: 'de',
111+
hreflang: 'de',
112+
dir: getRoot('de-de'),
113+
},
114114
}
115115
// Some markdownlint tests depend on having access to all
116116
// language keys. Not modifying the original object makes

src/languages/scripts/clone-translations.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
rm -rf translations
44
mkdir translations
55

6-
for lang in "zh-cn" "es-es" "pt-br" "ru-ru" "ja-jp" "fr-fr" "de-de" "ko-kr"
6+
for lang in "es-es" "ja-jp" "pt-br" "zh-cn" "ru-ru" "fr-fr" "ko-kr" "de-de"
77
do
88
(cd translations && git clone --depth 1 "https://github.com/github/docs-internal.$lang.git" $lang)
99
done

0 commit comments

Comments
 (0)