1
0
mirror of synced 2025-12-19 09:57:42 -05:00

Reinstate command_line variable file and undo replacedomain in translations (#50865)

This commit is contained in:
Peter Bengtsson
2024-05-29 12:01:45 -04:00
committed by GitHub
parent 724228fab4
commit e22b717aee
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# This is a temporary file to satisfy the translations that might still
# be using this. See internal issue #4377
# Use this variable wherever backticks are necessary
backticks: >-
{% ifversion fpt or ghec %}github.com{% else %}[hostname]{% endif %}
# Use this variable within codeblocks (because it includes HTML! Which only renders in shell codeblocks!)
codeblock: >-
{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}

View File

@@ -22,6 +22,16 @@ export function correctTranslatedContentStrings(content, englishContent, context
content = content.replaceAll('[ "AUTOTITLE](', '[AUTOTITLE](')
content = content.replaceAll('[«AUTOTITLE»](', '[AUTOTITLE](')
// For a short while we injected `replacedomain` into code snippets
// to activate the Domain Edit functionality. That was in `main` for a
// while and was later removed in English. But during that window of
// time, some translations picked it up. Let's remove it. For now.
// The day we re-instate editable domain, delete these lines.
if (content.includes('replacedomain')) {
content = content.replaceAll('```text replacedomain copy', '```text copy')
content = content.replaceAll('```shell replacedomain', '```shell')
}
if (context.code === 'ru') {
// Low-hanging fruit for the data tag
content = content.replaceAll('{% данных variables', '{% data variables')