Skip to content

Commit 64c466f

Browse files
✨ feat: Extend language similarity checks to include Kurdish and Malay languages
1 parent eb55cba commit 64c466f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/lobe-i18n/src/commands/Lint/utils/languageValidation.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ export function isSimilarLanguage(
1212
// 特殊处理:阿拉伯语与波斯语、乌尔都语相似
1313
if (
1414
mainLanguage === 'ar' &&
15-
['fa', 'ur'].includes(detectedLanguage) &&
15+
['fa', 'ur', 'ku'].includes(detectedLanguage) &&
16+
confidence < CONFIDENCE_THRESHOLDS.ARABIC_SIMILAR
17+
) {
18+
return true;
19+
}
20+
21+
if (
22+
mainLanguage === 'fa' &&
23+
['ar', 'ku', 'ur'].includes(detectedLanguage) &&
1624
confidence < CONFIDENCE_THRESHOLDS.ARABIC_SIMILAR
1725
) {
1826
return true;

0 commit comments

Comments
 (0)