Skip to content

Commit 54ffeeb

Browse files
authored
Merge pull request #32214 from github/repo-sync
Repo sync
2 parents 724695a + 2674226 commit 54ffeeb

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

src/audit-logs/lib/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"apiOnlyEventsAdditionalDescription": "This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports.",
3-
"sha": "b8691c04d2e53841481b77b51418a20dcfc7df6e"
3+
"sha": "42565ed6af2d444463c51c0d49a17e5048ea7f7e"
44
}

src/data-directory/lib/get-data.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const getDataByLanguage = memoize((dottedPath, langCode) => {
9797
const { dir } = languages[langCode]
9898

9999
try {
100-
const value = getDataByDir(dottedPath, dir, languages.en.dir)
100+
const value = getDataByDir(dottedPath, dir, languages.en.dir, langCode)
101101

102102
// What could happens is that a new key has only been added to
103103
// the English data/ui.yml but hasn't been added to Japanese, but
@@ -133,7 +133,7 @@ export const getDataByLanguage = memoize((dottedPath, langCode) => {
133133
}
134134
})
135135

136-
function getDataByDir(dottedPath, dir, englishRoot) {
136+
function getDataByDir(dottedPath, dir, englishRoot, langCode) {
137137
const fullPath = ['data']
138138

139139
// Using English here because it doesn't matter. We just want to
@@ -209,7 +209,10 @@ function getDataByDir(dottedPath, dir, englishRoot) {
209209
throw error
210210
}
211211
}
212-
content = correctTranslatedContentStrings(content, englishContent, { dottedPath })
212+
content = correctTranslatedContentStrings(content, englishContent, {
213+
dottedPath,
214+
code: langCode,
215+
})
213216
}
214217
return content
215218
}

src/languages/lib/correct-translation-content.js

+26-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,22 @@ export function correctTranslatedContentStrings(content, englishContent, context
2020
content = content.replaceAll('[AUTOTITLE"을 참조하세요.](', '[AUTOTITLE](')
2121
content = content.replaceAll('[ AUTOTITLE](', '[AUTOTITLE](')
2222
content = content.replaceAll('[ "AUTOTITLE](', '[AUTOTITLE](')
23+
content = content.replaceAll('[«AUTOTITLE»](', '[AUTOTITLE](')
2324

2425
if (context.code === 'ru') {
25-
// We've seen a lot of these in the Russian translations:
26+
// Low-hanging fruit for the data tag
2627
content = content.replaceAll('{% данных variables', '{% data variables')
28+
content = content.replaceAll('{% данными variables', '{% data variables')
29+
content = content.replaceAll('{% данных организации variables', '{% data variables')
30+
content = content.replaceAll('{% данным variables', '{% data variables')
2731
content = content.replaceAll('{% данных reusables', '{% data reusables')
32+
content = content.replaceAll('{% данными reusables', '{% data reusables')
2833
content = content.replaceAll('{% variables.', '{% data variables.')
34+
content = content.replaceAll('{% необработанного %}', '{% raw %}')
35+
content = content.replaceAll('{%- ifversion fpt или ghec %}', '{%- ifversion fpt or ghec %}')
36+
content = content.replaceAll('{% ifversion fpt или ghec %}', '{% ifversion fpt or ghec %}')
37+
content = content.replaceAll('{% endif _%}', '{% endif %}')
38+
content = content.replaceAll('{% конечным %}', '{% endif %}')
2939

3040
// For the rather custom Russian translation of
3141
// the content/get-started/learning-about-github/github-glossary.md page
@@ -38,7 +48,22 @@ export function correctTranslatedContentStrings(content, englishContent, context
3848
content = content.replaceAll('{{ глоссарий.description }}', '{{ glossary.description }}')
3949
}
4050

51+
if (context.code === 'ja') {
52+
// Low-hanging fruit for the data tag
53+
content = content.replaceAll('{% データ variables', '{% data variables')
54+
content = content.replaceAll('{% データvariables', '{% data variables')
55+
}
56+
57+
if (context.code === 'zh') {
58+
// Low-hanging fruit for the data tag
59+
content = content.replaceAll('{% 数据variables', '{% data variables')
60+
}
61+
4162
if (context.code === 'ko') {
63+
// Low-hanging fruit for the data tag
64+
content = content.replaceAll('{% 데이터 variables', '{% data variables')
65+
content = content.replaceAll('{% 데이터 reusables.', '{% data reusables.')
66+
4267
// For the rather custom Korean translation of github-glossary.md
4368
// Let's try to salvage based on what's in
4469
// docs-internal.ko-kr/content/get-started/learning-about-github/github-glossary.md

0 commit comments

Comments
 (0)