Skip to content

Commit 29f000d

Browse files
authored
Merge pull request #33542 from github/repo-sync
Repo sync
2 parents 4d8986c + 26e79d8 commit 29f000d

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/move-ready-to-merge-pr.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ jobs:
3030
column: Triage
3131
repo-token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }}
3232

33+
- name: Check out repo
34+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+
36+
- uses: ./.github/actions/node-npm-setup
37+
3338
- name: remove label
34-
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
39+
uses: ./.github/actions/labeler
3540
with:
36-
ignore-if-assigned: 'false'
37-
remove-labels: 'waiting for review'
41+
ignoreifAssigned: 'false'
42+
removeLabels: 'waiting for review'

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ export function correctTranslatedContentStrings(content, englishContent, context
2222
content = content.replaceAll('[ "AUTOTITLE](', '[AUTOTITLE](')
2323
content = content.replaceAll('[«AUTOTITLE»](', '[AUTOTITLE](')
2424

25+
// We've seen a lot of these across different languages.
26+
content = content.replaceAll('{{% octicon', '{% octicon')
27+
content = content.replaceAll('{{%octicon', '{% octicon')
28+
content = content.replaceAll('{{% endif %}', '{% endif %}')
29+
content = content.replaceAll('{{%endif %}', '{% endif %}')
30+
2531
// For a short while we injected `replacedomain` into code snippets
2632
// to activate the Domain Edit functionality. That was in `main` for a
2733
// while and was later removed in English. But during that window of
@@ -323,5 +329,15 @@ export function correctTranslatedContentStrings(content, englishContent, context
323329
content = content.replace(keyString, '[redacted in translation]')
324330
}
325331
}
332+
333+
if (content.includes('{{%')) {
334+
content.split('\n').forEach((line, i) => {
335+
if (line.includes('{{%') && !line.includes('{{{% endraw')) {
336+
console.log(context.code, 'context.relativePath', context.relativePath)
337+
console.log(i, line)
338+
}
339+
})
340+
}
341+
326342
return content
327343
}

0 commit comments

Comments
 (0)