Skip to content

Commit

Permalink
Switch to Commonmark rendering pipeline (#41003)
Browse files Browse the repository at this point in the history
Co-authored-by: Rachael Sewell <[email protected]>
  • Loading branch information
peterbe and rachmari authored Sep 21, 2023
1 parent 3deae0f commit 8da93a4
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 282 deletions.
7 changes: 1 addition & 6 deletions components/page-footer/Contribution.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ export const Contribution = () => {
{t`button`}
</a>
<p className="color-fg-muted f6 mt-2">
<a
className="text-underline"
href="/contributing"
target="_blank"
rel="noopener"
>
<a className="text-underline" href="/contributing" target="_blank" rel="noopener">
{t`to_guidelines`}
</a>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ If you're setting up your AMI for the first time, you will need to create a secu
This table identifies what each port is used for.

{% data reusables.enterprise_installation.necessary_ports %}

## Creating the {% data variables.product.prodname_ghe_server %} instance

To create the instance, you'll need to launch an EC2 instance with your {% data variables.product.prodname_ghe_server %} AMI and attach an additional storage volume for your instance data. For more information, see "[Hardware considerations](#hardware-considerations)."
Expand Down
27 changes: 27 additions & 0 deletions lib/correct-translation-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,33 @@ export function correctTranslatedContentStrings(content, englishContent, context
content = content.replaceAll('[AUTOTITLE"을]', '[AUTOTITLE]')
content = content.replaceAll('["AUTOTITLE]', '"[AUTOTITLE]')
content = content.replaceAll('[AUTOTITLE"을 참조하세요.](', '[AUTOTITLE](')
content = content.replaceAll('[ AUTOTITLE](', '[AUTOTITLE](')
content = content.replaceAll('[ "AUTOTITLE](', '[AUTOTITLE](')

if (context.code === 'ru') {
// We've seen a lot of these in the Russian translations:
content = content.replaceAll('{% данных variables', '{% data variables')

// For the rather custom Russian translation of
// the content/get-started/quickstart/github-glossary.md page
// These string replacements speak for themselves.
content = content.replaceAll(
'{% для глоссария в глоссариях %}',
'{% for glossary in glossaries %}',
)
content = content.replaceAll('{{ глоссарий.term }}', '{{ glossary.term }}')
content = content.replaceAll('{{ глоссарий.description }}', '{{ glossary.description }}')
}

if (context.code === 'ko') {
// For the rather custom Korean translation of github-glossary.md
// Let's try to salvage based on what's in
// docs-internal.ko-kr/content/get-started/quickstart/github-glossary.md
// as of September 2023.
content = content.replaceAll('용어집 %}의 용어집에 대한 {%', '{% for glossary in glossaries %}')
content = content.replaceAll('{{ 용어집.term }}', '{{ glossary.term }}')
content = content.replaceAll('{{ 용어집.description }}', '{{ glossary.description }}')
}

// A lot of Liquid tags lose their linebreak after the `}` which can
// result in formatting problems, especially around Markdown tables.
Expand Down
1 change: 1 addition & 0 deletions middleware/contextualizers/glossaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default async function glossaries(req, res, next) {
// in this mapping we often don't have an English equivalent.
// So that's why we fall back on the empty string.
enGlossaryMap.get(glossary.term) || '',
{ code: req.context.currentLanguage },
)
}
description = await executeWithFallback(
Expand Down
Loading

0 comments on commit 8da93a4

Please sign in to comment.