Skip to content

Commit 3a8296a

Browse files
CopilotNateowami
andcommitted
Throw error when locale cannot be extracted from filename
Co-authored-by: Nateowami <[email protected]>
1 parent b4f180c commit 3a8296a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/update_from_crowdin.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ async function copyFiles() {
114114
if (dirEntry.isFile) {
115115
const crowdinFileName = dirEntry.name;
116116
const localeMatch = crowdinFileName.match(localeRegex);
117-
if (localeMatch == null) continue;
117+
if (localeMatch == null) {
118+
throw new Error(`Could not extract locale from file name: ${crowdinFileName}`);
119+
}
118120

119121
const localeCodeInCrowdinFile = localeMatch[1];
120122
const localeCodeWithHyphens = localeCodeInCrowdinFile.replaceAll("_", "-");

0 commit comments

Comments
 (0)