@@ -205,6 +205,18 @@ export function correctTranslatedContentStrings(
205205 '{%$1 %}' ,
206206 )
207207
208+ // `{% de escritorio %}` — Spanish "de escritorio" = desktop (platform tab)
209+ content = content . replaceAll ( '{% de escritorio %}' , '{% desktop %}' )
210+ content = content . replaceAll ( '{%- de escritorio %}' , '{%- desktop %}' )
211+
212+ // `{% variablesdatos.producto.` — translator fused "variables" + "datos" (data)
213+ // without the `data` keyword and used "producto" (product) instead of "variables.product".
214+ // e.g. `{% variablesdatos.producto.prodname_dotcom %}` → `{% data variables.product.prodname_dotcom %}`
215+ content = content . replace (
216+ / \{ % ( - ? ) \s * v a r i a b l e s d a t o s \. p r o d u c t o \. ( [ A - Z a - z 0 - 9 . _ - ] + ) ( \s * - ? % \} ) / g,
217+ '{%$1 data variables.product.$2$3' ,
218+ )
219+
208220 // [SCRAPE-6548] Per-file fix for the Spanish reusable
209221 // `data/reusables/dependency-graph/deduplication.md`. The translation
210222 // dropped the `{% endif %}` after the Dependabot graph jobs item (the
@@ -771,6 +783,12 @@ export function correctTranslatedContentStrings(
771783 // already opened on the previous line. Drop the inner duplicate so the
772784 // outer endif balances correctly.
773785 content = content . replaceAll ( '> * {% ifversion ghes %} 本文包含' , '> * 本文包含' )
786+
787+ // `{% 捕获IDENTIFIER %}` — Chinese "捕获" = "to capture" = capture.
788+ // Translator translated the tag name but kept the variable name in English.
789+ // Pattern: `{% 捕获IDENTIFIER %}` (no space) or `{% 捕获 IDENTIFIER %}` (with space)
790+ // → `{% capture IDENTIFIER %}`
791+ content = content . replace ( / \{ % ( - ? ) \s * 捕 获 \s * ( \w + ) \s * ( - ? ) % \} / g, '{%$1 capture $2 $3%}' )
774792 }
775793
776794 if ( context . code === 'ru' ) {
@@ -900,6 +918,23 @@ export function correctTranslatedContentStrings(
900918 content = content . replaceAll ( '{%- эндкёрл %}' , '{%- endcurl %}' )
901919 content = content . replaceAll ( '{% запроса %}' , '{% endraw %}' )
902920 content = content . replaceAll ( '{%- запроса %}' , '{%- endraw %}' )
921+ // `{% API %}` — uppercase API used as platform/tool tab tag (correct: lowercase `{% api %}`)
922+ content = content . replaceAll ( '{% API %}' , '{% api %}' )
923+ content = content . replaceAll ( '{%- API %}' , '{%- api %}' )
924+
925+ // `{% захватить VARNAME %}` — "захватить" = "to capture" = capture
926+ // The translator translated the tag name but kept the variable name in English.
927+ // Pattern: `{% захватить IDENTIFIER %}` → `{% capture IDENTIFIER %}`
928+ content = content . replace ( / \{ % ( - ? ) \s * з а х в а т и т ь \s + ( \w + ) \s * ( - ? ) % \} / g, '{%$1 capture $2 $3%}' )
929+
930+ // Comma-separated plan names in ifversion/elsif/if tags:
931+ // `{% ifversion fpt, ghec %}` — translator used comma instead of `or` between plans.
932+ // Only safe to fix when the comma appears between recognised plan-name tokens.
933+ content = content . replace (
934+ / \{ % ( - ? \s + (?: i f v e r s i o n | e l s i f | i f ) \s + [ ^ % ] * ?) , \s * ( (?: f p t | g h e c | g h e s | g h a e | g h e c o m ) [ ^ % ] * ?- ? % \} ) / g,
935+ '{%$1 or $2' ,
936+ )
937+
903938 // `{% джетмозги %}` — Russian literal translation of "JetBrains" (джет=jet, мозги=brains)
904939 content = content . replaceAll ( '{% джетмозги %}' , '{% jetbrains %}' )
905940 content = content . replaceAll ( '{%- джетмозги %}' , '{%- jetbrains %}' )
@@ -1059,6 +1094,15 @@ export function correctTranslatedContentStrings(
10591094 'Вы можете увидеть, кто внес{% endif %} коммиты в репозиторий{% ifversion fpt or ghec %} и его зависимости.' ,
10601095 'Вы можете увидеть, кто внес коммиты в репозиторий{% ifversion fpt or ghec %} и его зависимости{% endif %}.' ,
10611096 )
1097+
1098+ // data/reusables/enterprise-licensing/unique-user-licensing-model.md:
1099+ // The translator garbled `{% ifversion enterprise-licensing-language %}licenses{% else %}licensed seats{% endif %}`
1100+ // into `{% ifversion enterprise-licensing-language %}license-language%else % }licenses{% license seats{% endif %}`.
1101+ // Restore the correct conditional.
1102+ content = content . replaceAll (
1103+ '{% ifversion enterprise-licensing-language %}license-language%else %}licenses{% license seats{% endif %}' ,
1104+ '{% ifversion enterprise-licensing-language %}licenses{% else %}licensed seats{% endif %}' ,
1105+ )
10621106 }
10631107
10641108 if ( context . code === 'fr' ) {
@@ -1343,6 +1387,11 @@ export function correctTranslatedContentStrings(
13431387 content = content . replaceAll ( '{% Variable.' , '{% data variables.' )
13441388 content = content . replaceAll ( '{%- Variable.' , '{%- data variables.' )
13451389
1390+ // `{% 캡처 IDENTIFIER %}` — Korean "캡처" = "capture".
1391+ // Translator translated the tag name but kept the variable name in English.
1392+ // Pattern: `{% 캡처 IDENTIFIER %}` → `{% capture IDENTIFIER %}`
1393+ content = content . replace ( / \{ % ( - ? ) \s * 캡 처 \s + ( \w + ) \s * ( - ? ) % \} / g, '{%$1 capture $2 $3%}' )
1394+
13461395 // [SCRAPE-6548] Per-file fix:
13471396 // account-and-profile/concepts/username-changes.md (intro): orphan
13481397 // `{% endif %}` and `{% ifversion ghes %}` swapped — the conditional
0 commit comments