Reinstate command_line variable file and undo replacedomain in translations (#50865)
This commit is contained in:
9
data/variables/command_line.yml
Normal file
9
data/variables/command_line.yml
Normal 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 %}
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user