Skip to content

Commit 98e48df

Browse files
authored
Merge pull request #32210 from github/repo-sync
Repo sync
2 parents cf772bc + 629b898 commit 98e48df

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/frame/lib/page-data.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,27 @@ async function translateTree(dir, langObj, enTree) {
203203
code: langObj.code,
204204
})
205205

206+
translatedData.title = correctTranslatedContentStrings(translatedData.title, enPage.title, {
207+
relativePath,
208+
code: langObj.code,
209+
})
210+
if (translatedData.shortTitle) {
211+
translatedData.shortTitle = correctTranslatedContentStrings(
212+
translatedData.shortTitle,
213+
enPage.shortTitle,
214+
{
215+
relativePath,
216+
code: langObj.code,
217+
},
218+
)
219+
}
220+
if (translatedData.intro) {
221+
translatedData.intro = correctTranslatedContentStrings(translatedData.intro, enPage.intro, {
222+
relativePath,
223+
code: langObj.code,
224+
})
225+
}
226+
206227
item.page = new Page(
207228
Object.assign(
208229
{},

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export function correctTranslatedContentStrings(content, englishContent, context
2424
if (context.code === 'ru') {
2525
// We've seen a lot of these in the Russian translations:
2626
content = content.replaceAll('{% данных variables', '{% data variables')
27+
content = content.replaceAll('{% данных reusables', '{% data reusables')
2728
content = content.replaceAll('{% variables.', '{% data variables.')
2829

2930
// For the rather custom Russian translation of

0 commit comments

Comments
 (0)