Skip to content

Commit 6b041de

Browse files
authored
Merge pull request #22663 from github/repo-sync
repo sync
2 parents e4fe8f8 + 7c6270b commit 6b041de

File tree

3 files changed

+77
-15
lines changed

3 files changed

+77
-15
lines changed

.github/workflows/azure-prod-build-deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,55 @@ jobs:
7171
- name: Merge docs-early-access repo's folders
7272
run: .github/actions-scripts/merge-early-access.sh
7373

74+
- name: Clone Simplified Chinese
75+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
76+
with:
77+
repository: github/docs-internal.zh-cn
78+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
79+
path: translations/zh-cn
80+
81+
- name: Clone Japanese
82+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
83+
with:
84+
repository: github/docs-internal.ja-jp
85+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
86+
path: translations/ja-jp
87+
88+
- name: Clone Spanish
89+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
90+
with:
91+
repository: github/docs-internal.es-es
92+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
93+
path: translations/es-es
94+
95+
- name: Clone Portuguese
96+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
97+
with:
98+
repository: github/docs-internal.pt-br
99+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
100+
path: translations/pt-br
101+
102+
- name: Clone German
103+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
104+
with:
105+
repository: github/docs-internal.de-de
106+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
107+
path: translations/de-de
108+
109+
- name: Clone French
110+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
111+
with:
112+
repository: github/docs-internal.fr-fr
113+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
114+
path: translations/fr-fr
115+
116+
- name: Clone Russian
117+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
118+
with:
119+
repository: github/docs-internal.ru-ru
120+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
121+
path: translations/ru-ru
122+
74123
- name: Clone Korean
75124
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
76125
with:
@@ -85,6 +134,13 @@ jobs:
85134
# unnecessary weight to the container image.
86135
- name: Delete old checked in translation directories (TEMPORARY)
87136
run: |
137+
rm -fr translations/zh-CN
138+
rm -fr translations/ja-JP
139+
rm -fr translations/es-ES
140+
rm -fr translations/pt-BR
141+
rm -fr translations/de-DE
142+
rm -fr translations/fr-FR
143+
rm -fr translations/ru-RU
88144
rm -fr translations/ko-KR
89145
90146
- name: 'Build and push image'

.github/workflows/sync-search-pr.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,20 @@ jobs:
4646
- name: Check out repo
4747
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
4848

49+
- name: Cache node_modules
50+
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
51+
with:
52+
path: node_modules
53+
key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }}
54+
4955
- name: Setup node
5056
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
5157
with:
5258
node-version: '16.17.0'
5359
cache: npm
5460

5561
- name: Install dependencies
56-
run: npm ci
62+
run: npm install --prefer-offline --no-audit --ignore-scripts
5763

5864
- name: Cache nextjs build
5965
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7

lib/languages.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import path from 'path'
1010
dotenv.config()
1111

1212
const possibleEnvVars = {
13-
'es-ES': process.env.TRANSLATIONS_ROOT_ES_ES,
14-
'zh-CN': process.env.TRANSLATIONS_ROOT_ZH_CN,
15-
'ja-JP': process.env.TRANSLATIONS_ROOT_JA_JP,
16-
'pt-BR': process.env.TRANSLATIONS_ROOT_PT_BR,
17-
'de-DE': process.env.TRANSLATIONS_ROOT_DE_DE,
18-
'fr-FR': process.env.TRANSLATIONS_ROOT_FR_FR,
19-
'ru-RU': process.env.TRANSLATIONS_ROOT_RU_RU,
13+
'es-es': process.env.TRANSLATIONS_ROOT_ES_ES,
14+
'zh-cn': process.env.TRANSLATIONS_ROOT_ZH_CN,
15+
'ja-jp': process.env.TRANSLATIONS_ROOT_JA_JP,
16+
'pt-br': process.env.TRANSLATIONS_ROOT_PT_BR,
17+
'de-de': process.env.TRANSLATIONS_ROOT_DE_DE,
18+
'fr-fr': process.env.TRANSLATIONS_ROOT_FR_FR,
19+
'ru-ru': process.env.TRANSLATIONS_ROOT_RU_RU,
2020
'ko-kr': process.env.TRANSLATIONS_ROOT_KO_KR,
2121
}
2222

@@ -48,7 +48,7 @@ const languages = {
4848
code: 'cn',
4949
hreflang: 'zh-Hans',
5050
redirectPatterns: [/^\/zh-\w{2}/, /^\/zh/],
51-
dir: getRoot('zh-CN'),
51+
dir: getRoot('zh-cn'),
5252
wip: false,
5353
},
5454
ja: {
@@ -57,15 +57,15 @@ const languages = {
5757
code: 'ja',
5858
hreflang: 'ja',
5959
redirectPatterns: [/^\/jp/],
60-
dir: getRoot('ja-JP'),
60+
dir: getRoot('ja-jp'),
6161
wip: false,
6262
},
6363
es: {
6464
name: 'Spanish',
6565
nativeName: 'Español',
6666
code: 'es',
6767
hreflang: 'es',
68-
dir: getRoot('es-ES'),
68+
dir: getRoot('es-es'),
6969
wip: false,
7070
},
7171
pt: {
@@ -74,31 +74,31 @@ const languages = {
7474
code: 'pt',
7575
hreflang: 'pt',
7676
redirectPatterns: [/^\/br/],
77-
dir: getRoot('pt-BR'),
77+
dir: getRoot('pt-br'),
7878
wip: false,
7979
},
8080
de: {
8181
name: 'German',
8282
nativeName: 'Deutsch',
8383
code: 'de',
8484
hreflang: 'de',
85-
dir: getRoot('de-DE'),
85+
dir: getRoot('de-de'),
8686
wip: false,
8787
},
8888
fr: {
8989
name: 'French',
9090
nativeName: 'Français',
9191
code: 'fr',
9292
hreflang: 'fr',
93-
dir: getRoot('fr-FR'),
93+
dir: getRoot('fr-fr'),
9494
wip: false,
9595
},
9696
ru: {
9797
name: 'Russian',
9898
nativeName: 'Русский',
9999
code: 'ru',
100100
hreflang: 'ru',
101-
dir: getRoot('ru-RU'),
101+
dir: getRoot('ru-ru'),
102102
wip: false,
103103
},
104104
ko: {

0 commit comments

Comments
 (0)