Fix low-hanging fruit translation Liquid corruptions (#49908)

This commit is contained in:
Peter Bengtsson 2024-03-27 16:24:19 -04:00 коммит произвёл GitHub
Родитель 18b43b94f5
Коммит 063f0b838d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -9,6 +9,7 @@ on:
pull_request:
paths:
- src/languages/scripts/count-translation-corruptions.ts
- src/languages/lib/correct-translation-content.js
- .github/workflows/count-translation-corruptions.yml
- .github/actions/node-npm-setup/action.yml
- .github/actions/clone-translations/action.yml

Просмотреть файл

@ -106,6 +106,16 @@ export function correctTranslatedContentStrings(content, englishContent, context
)
}
// These are common mistakes made by translations that are specific.
// It's prevalent in all translations so that's why it's not per-language.
// It's important though that this happens after the other per-language
// specific fixes above. For example `{{% данных variables...`
content = content.replaceAll('{{% data variables.', '{% data variables.')
content = content.replaceAll('{%%data variables.', '{% data variables.')
content = content.replaceAll('{{% data reusables.', '{% data reusables.')
content = content.replaceAll('{%%data reusables.', '{% data reusables.')
content = content.replaceAll('{{% ifversion ', '{% ifversion ')
// A lot of Liquid tags lose their linebreak after the `}`
// result in formatting problems, especially around Markdown tables.
// This code here, compares each Liquid statement, in the translation,