[SKIP CI][Tooling] Fix detection of existing translation changelog
This commit is contained in:
@@ -128,7 +128,7 @@ Thank you for your contribution to the translation of the project.
|
|||||||
- French (by Graham Morin)
|
- French (by Graham Morin)
|
||||||
- Indonesian (by Axel C)
|
- Indonesian (by Axel C)
|
||||||
|
|
||||||
## Full changelog
|
## Full Changelog
|
||||||
- ([r1688](https://github.com/Suwayomi/Suwayomi-WebUI/commit/7d1f2dfe017dead41cc07772b0c11dfd034161fb)) [Codegen] Fix gql schema url (by @schroda)
|
- ([r1688](https://github.com/Suwayomi/Suwayomi-WebUI/commit/7d1f2dfe017dead41cc07772b0c11dfd034161fb)) [Codegen] Fix gql schema url (by @schroda)
|
||||||
- ([r1687](https://github.com/Suwayomi/Suwayomi-WebUI/commit/a9fc2f13aaf45f3e7547b91d4ff2530300df05fd)) Translations update from Hosted Weblate ([#757](https://github.com/Suwayomi/Suwayomi-WebUI/pull/757) by @weblate, @leollo98, @kiritsumafuyu, @marimo-nekomimi, @tizio04, @aizhimoran)
|
- ([r1687](https://github.com/Suwayomi/Suwayomi-WebUI/commit/a9fc2f13aaf45f3e7547b91d4ff2530300df05fd)) Translations update from Hosted Weblate ([#757](https://github.com/Suwayomi/Suwayomi-WebUI/pull/757) by @weblate, @leollo98, @kiritsumafuyu, @marimo-nekomimi, @tizio04, @aizhimoran)
|
||||||
- ([r1686](https://github.com/Suwayomi/Suwayomi-WebUI/commit/36e943214c7861eadc4681ae72f908d4deb803c3)) Remove "default back to" functionality (by @schroda)
|
- ([r1686](https://github.com/Suwayomi/Suwayomi-WebUI/commit/36e943214c7861eadc4681ae72f908d4deb803c3)) Remove "default back to" functionality (by @schroda)
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ const getLanguageLinesFromChangelog = (): Promise<string[]> => {
|
|||||||
const fileReadPromise = new ControlledPromise<string[]>();
|
const fileReadPromise = new ControlledPromise<string[]>();
|
||||||
|
|
||||||
const changelogFile = path.resolve(__dirname, '../../CHANGELOG.md');
|
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({
|
const fileLineReader = readline.createInterface({
|
||||||
input: fileStream,
|
input: fileStream,
|
||||||
crlfDelay: Infinity, // Recognize all line breaks (CR LF) as a single line break
|
crlfDelay: Infinity, // Recognize all line breaks (CR LF) as a single line break
|
||||||
@@ -294,12 +294,12 @@ const getLanguageLinesFromChangelog = (): Promise<string[]> => {
|
|||||||
const translationRelevantLines: string[] = [];
|
const translationRelevantLines: string[] = [];
|
||||||
let isTranslationSection = false;
|
let isTranslationSection = false;
|
||||||
fileLineReader.on('line', (line) => {
|
fileLineReader.on('line', (line) => {
|
||||||
if (line === '## Translations') {
|
if (line.toLowerCase() === '## Translations'.toLowerCase()) {
|
||||||
isTranslationSection = true;
|
isTranslationSection = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isTranslationSection && line === '## Full Changelog') {
|
if (isTranslationSection && line.toLowerCase() === '## Full Changelog'.toLowerCase()) {
|
||||||
isTranslationSection = false;
|
isTranslationSection = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user