[SKIP CI][Tooling] Fix detection of existing translation changelog

This commit is contained in:
schroda
2024-06-25 16:06:58 +02:00
parent 7c2a1ba561
commit 017e080159
2 changed files with 4 additions and 4 deletions

View File

@@ -285,7 +285,7 @@ const getLanguageLinesFromChangelog = (): Promise<string[]> => {
const fileReadPromise = new ControlledPromise<string[]>();
const changelogFile = path.resolve(__dirname, '../../CHANGELOG.md');
const fileStream = fs.createReadStream(changelogFile); // Replace 'input.txt' with your file path
const fileStream = fs.createReadStream(changelogFile);
const fileLineReader = readline.createInterface({
input: fileStream,
crlfDelay: Infinity, // Recognize all line breaks (CR LF) as a single line break
@@ -294,12 +294,12 @@ const getLanguageLinesFromChangelog = (): Promise<string[]> => {
const translationRelevantLines: string[] = [];
let isTranslationSection = false;
fileLineReader.on('line', (line) => {
if (line === '## Translations') {
if (line.toLowerCase() === '## Translations'.toLowerCase()) {
isTranslationSection = true;
return;
}
if (isTranslationSection && line === '## Full Changelog') {
if (isTranslationSection && line.toLowerCase() === '## Full Changelog'.toLowerCase()) {
isTranslationSection = false;
return;
}