From 52e1730261bf56c1c44a132c6938276a609b65f4 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 7 Apr 2025 00:07:12 +0200 Subject: [PATCH] Handle "removed languages" section in changelog --- tools/scripts/release/TranslationChangelog.utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/scripts/release/TranslationChangelog.utils.ts b/tools/scripts/release/TranslationChangelog.utils.ts index af4f04f9..8237ddd4 100644 --- a/tools/scripts/release/TranslationChangelog.utils.ts +++ b/tools/scripts/release/TranslationChangelog.utils.ts @@ -176,7 +176,11 @@ const getLanguageLinesFromChangelog = (): Promise => { return; } - if (isTranslationSection && line.toLowerCase() === '## Full Changelog'.toLowerCase()) { + const isStartOfRemovedLanguages = line.toLowerCase().startsWith('### Removed'.toLowerCase()); + const isStartOfFullChangelog = line.toLowerCase() === '## Full Changelog'.toLowerCase(); + const isEndOfLanguageSection = isStartOfRemovedLanguages || isStartOfFullChangelog; + + if (isEndOfLanguageSection) { isTranslationSection = false; return; }