Skip to content

Commit

Permalink
Merge pull request github#30420 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Dec 7, 2023
2 parents 73c5766 + bc35a68 commit ac94bba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/data-directory/lib/get-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function getDataByDir(dottedPath, dir, englishRoot) {
throw error
}
}
content = correctTranslatedContentStrings(content, englishContent)
content = correctTranslatedContentStrings(content, englishContent, { dottedPath })
}
return content
}
Expand Down
14 changes: 13 additions & 1 deletion src/languages/lib/correct-translation-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,19 @@ export function correctTranslatedContentStrings(content, englishContent, context
content = content.replaceAll('|:---|{% ifversion', '|:---|\n{%- ifversion')
}

// A lot of Liquid tags lose their linebreak after the `}` which can
if (context.dottedPath === 'reusables.copilot.differences-cfi-cfb-table') {
// As of Dec 2023, the French translation has a subtle typo.
// This string replace is highly specific and clearly only going to
// work if the exact French, incorrect, translation is still in use.
// Consider deleting these lines in mid-2024 because hopefully by then
// the translation mistake, which we've reported, will be corrected.
content = content.replace(
'{% data variables.copilot.cfi_price_per_month %} par utilisateur et par mois',
'{% data variables.copilot.cfb_price_per_month %} par utilisateur et par mois.',
)
}

// A lot of Liquid tags lose their linebreak after the `}`
// result in formatting problems, especially around Markdown tables.
// This code here, compares each Liquid statement, in the translation,
// and tests if it appears like that but with a newline in the English.
Expand Down

0 comments on commit ac94bba

Please sign in to comment.