Skip to content

Commit aaecefc

Browse files
docs-botCopilot
andauthored
Fix translated-Liquid corruptions found across es-es, ko-kr, de-de, pt-br, and zh-cn (#63321)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f256799 commit aaecefc

2 files changed

Lines changed: 236 additions & 0 deletions

File tree

‎src/languages/lib/correct-translation-content.ts‎

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,35 @@ export function correctTranslatedContentStrings(
311311
) {
312312
content = content.replace(/^\{%-?\s*elsif\s+/, '{% ifversion ')
313313
}
314+
315+
// enforcing-repository-management-policies-in-your-enterprise.md: the
316+
// second of two near-identical "Under 'Repository...invitations'" steps
317+
// dropped the `{% endif %}` closing the `{% ifversion ghec %}...{% elsif
318+
// ghes %}...{% endif %}` conditional in its quoted UI label, leaving the
319+
// tag never closed (`tag {% ifversion ghec %} not closed`).
320+
content = content.replaceAll(
321+
'1. En "Repositorio {% ifversion ghec %}invitaciones a colaboradores externos{% elsif ghes %}", seleccione el menú desplegable y haga clic en una opción.',
322+
'1. En "Repositorio {% ifversion ghec %}invitaciones a colaboradores externos{% elsif ghes %}invitaciones{% endif %}", seleccione el menú desplegable y haga clic en una opción.',
323+
)
324+
// The first of the two near-identical steps above dropped the same
325+
// closing `{% endif %}`, leaving its `{% ifversion ghec %}` unclosed too.
326+
content = content.replaceAll(
327+
'1. En "Repositorio {% ifversion ghec %}invitaciones de colaboradores externos{% elsif ghes %}", revise la información sobre cómo cambiar la configuración. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}',
328+
'1. En "Repositorio {% ifversion ghec %}invitaciones de colaboradores externos{% elsif ghes %}invitaciones{% endif %}", revise la información sobre cómo cambiar la configuración. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}',
329+
)
330+
331+
// transferring-ownership-of-a-github-app.md: the `{% ifversion fpt or
332+
// enterprise-apps-public-beta %}` opener before the quoted UI label was
333+
// dropped entirely, leaving the `{% else %}...{% endif %}` branch with no
334+
// opener (`tag "else" not found`). English: `Under "New owner's
335+
// {% data variables.product.prodname_dotcom %} {% ifversion fpt or
336+
// enterprise-apps-public-beta %}username, organization, or enterprise
337+
// name",{% else %}username or organization name",{% endif %} type the
338+
// name...`
339+
content = content.replaceAll(
340+
'En "Nombre de usuario, empresa u organización del nuevo propietario de {% data variables.product.prodname_dotcom %} {% else %}nombre de usuario u organización",{% endif %}, escriba',
341+
'En "{% ifversion fpt or enterprise-apps-public-beta %}Nombre de usuario, empresa u organización del nuevo propietario de {% data variables.product.prodname_dotcom %}",{% else %}nombre de usuario u organización",{% endif %}, escriba',
342+
)
314343
}
315344

316345
if (context.code === 'ja') {
@@ -933,6 +962,29 @@ export function correctTranslatedContentStrings(
933962
'nos repositórios internos e {% endif %}privados {% ifversion ghec %}da sua organização.',
934963
'nos repositórios privados {% ifversion ghec %}e internos {% endif %}da sua organização.',
935964
)
965+
966+
// enforcing-repository-management-policies-in-your-enterprise.md
967+
// (markdown): the translator dropped the closing `{% endif %}` from the
968+
// `{% ifversion ghec %}...{% else %}...{% endif %}` sentence opener,
969+
// leaving the tag never closed (`tag {% ifversion ghec %} not closed`).
970+
// English: `{% ifversion ghec %}If your enterprise uses
971+
// {% data variables.product.prodname_emus %}, you{% else %}You{% endif %}
972+
// can also prevent users from creating repositories owned by their user
973+
// accounts.`
974+
content = content.replaceAll(
975+
'{% ifversion ghec %}Se sua empresa usar {% data variables.product.prodname_emus %}, você{% else %} também poderá impedir os usuários de criarem repositórios de propriedade de suas contas de usuário.',
976+
'{% ifversion ghec %}Se sua empresa usar {% data variables.product.prodname_emus %}, você{% else %}Você{% endif %} também poderá impedir os usuários de criarem repositórios de propriedade de suas contas de usuário.',
977+
)
978+
979+
// transferring-ownership-of-a-github-app.md: `{% ifversion fpt or
980+
// enterprise-apps-public-beta %}` was moved to just after `{% else %}`
981+
// instead of opening the conditional, leaving `{% else %}` with no
982+
// opener (`tag "else" not found`). Move it back before the quoted UI
983+
// label it originally guarded.
984+
content = content.replaceAll(
985+
'1. Em "Nome de usuário, organização ou nome da empresa {% else %}nome de usuário ou nome da organização do {% data variables.product.prodname_dotcom %} {% ifversion fpt or enterprise-apps-public-beta %} do novo proprietário",{% endif %} digite o nome da conta para a qual você deseja transferir o {% data variables.product.prodname_github_app %}.',
986+
'1. Em "{% ifversion fpt or enterprise-apps-public-beta %}Nome de usuário, organização ou nome da empresa{% else %}nome de usuário ou nome da organização{% endif %} do {% data variables.product.prodname_dotcom %} do novo proprietário", digite o nome da conta para a qual você deseja transferir o {% data variables.product.prodname_github_app %}.',
987+
)
936988
}
937989

938990
if (context.code === 'zh') {
@@ -1185,6 +1237,21 @@ export function correctTranslatedContentStrings(
11851237
'在 {% else %}2026 年 8 月 3 日{% data variables.product.prodname_ghe_server %}{% endif %} 3.24{% ifversion fpt or ghec %} 之前已启用单个回调 URL 的应用,其回调 URL 已启用通配符匹配。',
11861238
'在{% ifversion fpt or ghec %}2026 年 8 月 3 日{% else %}{% data variables.product.prodname_ghe_server %} 3.24{% endif %} 之前已启用单个回调 URL 的应用,其回调 URL 已启用通配符匹配。',
11871239
)
1240+
1241+
// data/reusables/actions/change-retention-period-for-artifacts-logs.md:
1242+
// the `{% else %}U{% endif %}` branch was dropped entirely, leaving the
1243+
// `{% ifversion ghes %}` opener unclosed (`tag {% ifversion ghes %} not
1244+
// closed`). This reusable is shared by both
1245+
// configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization.md
1246+
// and managing-github-actions-settings-for-a-repository.md, so the fix
1247+
// covers both pages. English: `{% ifversion ghes %}In the "Check,
1248+
// workflow run, status, artifact, log, and cache settings" section,
1249+
// u{% else %}U{% endif %}nder **Check, workflow run, status, artifact
1250+
// and log retention**, enter a new value.`
1251+
content = content.replaceAll(
1252+
'{% ifversion ghes %}在“检查、工作流运行、状态、工件、日志和缓存设置”部分的 **检查、工作流运行、状态、工件和日志保留** 下,输入一个新值。',
1253+
'{% ifversion ghes %}在“检查、工作流运行、状态、工件、日志和缓存设置”部分的{% else %}在{% endif %} **检查、工作流运行、状态、工件和日志保留** 下,输入一个新值。',
1254+
)
11881255
}
11891256

11901257
if (context.code === 'ru') {
@@ -1842,6 +1909,15 @@ export function correctTranslatedContentStrings(
18421909
/1\. \{% ifversion ghes %\} \*\*아티팩트 및 로그 보존\*\*의 "아티팩트, 로그 및 캐시 설정" 구역에서 새 값을 입력합니다\./,
18431910
'1. {% ifversion ghes %}"아티팩트, 로그 및 캐시 설정" 구역의 {% endif %}**아티팩트 및 로그 보존**에서 새 값을 입력합니다.',
18441911
)
1912+
// The same reusable has a second, differently-worded corruption seen in
1913+
// configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization.md
1914+
// and managing-github-actions-settings-for-a-repository.md: here the
1915+
// `{% else %}...{% endif %}` branch was dropped entirely (not reordered),
1916+
// leaving the `{% ifversion ghes %}` opener unclosed.
1917+
content = content.replace(
1918+
/1\. \{% ifversion ghes %\}"검사, 워크플로 실행, 상태, 아티팩트, 로그 및 캐시 설정" 섹션에서 \*\*검사, 워크플로 실행, 상태, 아티팩트 및 로그 보존\*\* 아래에 새 값을 입력합니다\./,
1919+
'1. {% ifversion ghes %}"검사, 워크플로 실행, 상태, 아티팩트, 로그 및 캐시 설정" 섹션에서{% else %}{% endif %} **검사, 워크플로 실행, 상태, 아티팩트 및 로그 보존** 아래에 새 값을 입력합니다.',
1920+
)
18451921
// gated-features/ghas-ghec.md: the `{% data ...ghe_server %}{% endif %}`
18461922
// and `{% data ...ghe_cloud %}{% elsif ghes %}` clauses were swapped, and
18471923
// the final `{% endif %}` was dropped (`tag "elsif" not found`).
@@ -2108,6 +2184,33 @@ export function correctTranslatedContentStrings(
21082184
'2026{% else %}{% data variables.product.prodname_ghe_server %}년 8월 3일 3.24{% endif %} 이전에 {% ifversion fpt or ghec %}단일 콜백 URL을 사용하도록 설정된 앱에는 해당 콜백 URL에 대해 와일드카드 일치가 활성화되어 있습니다.',
21092185
'{% ifversion fpt or ghec %}2026년 8월 3일{% else %}{% data variables.product.prodname_ghe_server %} 3.24{% endif %} 이전에 단일 콜백 URL을 사용하도록 설정된 앱에는 해당 콜백 URL에 대해 와일드카드 일치가 활성화되어 있습니다.',
21102186
)
2187+
2188+
// troubleshooting-jekyll-build-errors-for-github-pages-sites.md: the
2189+
// translator swapped the `{% raw %}`/`{% endraw %}` pair around the
2190+
// example code span — `{% endraw %}` ended up wrapping the first
2191+
// (intentionally malformed) example instead of opening it, and
2192+
// `{% raw %}` opened the second instead of closing it. This leaves an
2193+
// unclosed backtick span for Liquid's filter parser to choke on
2194+
// (`expected "|" before filter`). Restore the original order: `{% raw %}`
2195+
// opens before the first example and `{% endraw %}` closes after the
2196+
// second.
2197+
content = content.replaceAll(
2198+
'예를 들어 `{{ page.title }`{% endraw %} 대신 {% raw %}`{{ page.title }}`인 경우입니다.',
2199+
'예를 들어 {% raw %}`{{ page.title }`{% endraw %} 대신 {% raw %}`{{ page.title }}`{% endraw %}인 경우입니다.',
2200+
)
2201+
2202+
// enforcing-repository-management-policies-in-your-enterprise.md: the
2203+
// first of two near-identical "Under 'Repository...invitations'" steps
2204+
// was scrambled — the quoted UI label text was moved ahead of the
2205+
// `{% ifversion ghec %}` opener and the closing `{% endif %}` was
2206+
// dropped, leaving the tag never closed (`tag {% ifversion ghec %} not
2207+
// closed`). Reconstruct to match the correctly-structured second bullet
2208+
// just below it: `"리포지토리{% ifversion ghec %} 외부 협력자{% elsif ghes %}
2209+
// 초대{% endif %}"에서 설정 변경에 대한 정보를 검토합니다.`
2210+
content = content.replaceAll(
2211+
'1. "리포지토리 외부 협력자 초대{% ifversion ghec %}에서 설정 변경에 대한 정보를 검토합니다{% elsif ghes %}." {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}',
2212+
'1. "리포지토리{% ifversion ghec %} 외부 협력자{% elsif ghes %} 초대{% endif %}"에서 설정 변경에 대한 정보를 검토합니다. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}',
2213+
)
21112214
}
21122215

21132216
if (context.code === 'de') {
@@ -2328,6 +2431,27 @@ export function correctTranslatedContentStrings(
23282431
'werden 200 GB auf dem Stammdateisystem verfügbar sein. Die verbleibenden 200GB{% else %}',
23292432
'werden {% ifversion ghes %}200 GB auf dem Stammdateisystem verfügbar sein. Die verbleibenden 200GB{% else %}',
23302433
)
2434+
2435+
// enforcing-repository-management-policies-in-your-enterprise.md: the
2436+
// second of two near-identical "Under 'Repository...invitations'" steps
2437+
// dropped the `{% elsif ghes %}Einladungen{% endif %}` branch closing
2438+
// the `{% ifversion ghec %}` conditional in its quoted UI label, leaving
2439+
// the tag never closed (`tag {% ifversion ghec %} not closed`).
2440+
content = content.replaceAll(
2441+
'1. Wählen Sie unter "Repository {% ifversion ghec %}Einladungen für externe Mitarbeiter{% elsif ghes %}" das Dropdown-Menü aus und wählen Sie eine Richtlinie.',
2442+
'1. Wählen Sie unter "Repository {% ifversion ghec %}Einladungen für externe Mitarbeiter{% elsif ghes %}Einladungen{% endif %}" das Dropdown-Menü aus und wählen Sie eine Richtlinie.',
2443+
)
2444+
2445+
// The same file's markdown (earlier paragraph): the closing `{% endif %}`
2446+
// for `{% ifversion ghec %}Wenn Ihr Unternehmen ... verwendet, können Sie
2447+
// ebenfalls verhindern, ...` was dropped entirely, leaving the tag never
2448+
// closed. English: `{% ifversion ghec %}If your enterprise uses ...,
2449+
// you{% else %}You{% endif %} can also prevent users from creating
2450+
// repositories owned by their user accounts.`
2451+
content = content.replaceAll(
2452+
'{% ifversion ghec %}Wenn Ihr Unternehmen {% data variables.product.prodname_emus %} verwendet, können Sie ebenfalls verhindern, dass Benutzer Repositorys erstellen, die ihren Benutzerkonten gehören. ',
2453+
'{% ifversion ghec %}Wenn Ihr Unternehmen {% data variables.product.prodname_emus %} verwendet, können Sie{% endif %} ebenfalls verhindern, dass Benutzer Repositorys erstellen, die ihren Benutzerkonten gehören. ',
2454+
)
23312455
}
23322456

23332457
// --- Generic fixes (all languages) ---

0 commit comments

Comments
 (0)