Skip to content

Commit

Permalink
fix(scripts): filter out more invalid translations
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Jan 16, 2024
1 parent 753d401 commit 3e7cd09
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/translate_changelogs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ void main() async {
}

// Response might be something like "Invalid request: request (276) exceeds text limit (250)"
const failurePrefixes = [
'Invalid request: request (',
'None is not supported',
];
if (failurePrefixes.any(translatedChangelog.startsWith)) {
print('${' ' * stepPrefix.length} ! Translation invalid, skipping...');
someTranslationsFailed = true;
continue;
}

const bullet = '•';
if (englishChangelog.contains(bullet) &&
!translatedChangelog.contains(bullet)) {
Expand Down

0 comments on commit 3e7cd09

Please sign in to comment.