default languages cleanup, force Local source enabled

This commit is contained in:
Aria Moradi
2021-10-18 14:02:51 +03:30
parent 2049c329d7
commit 23c8e649a1
5 changed files with 44 additions and 18 deletions

View File

@@ -93,11 +93,27 @@ export function langCodeToName(code: string): string {
return result;
}
export function defualtLangs() {
function defaultNativeLang() {
return 'en'; // TODO: infer from the browser
}
export function extensionDefaultLangs() {
return [
// todo: infer this from the browser
'en',
'localSourceLang',
defaultNativeLang(),
'all',
];
}
export function sourceDefualtLangs() {
return [
defaultNativeLang(),
'localsourcelang',
];
}
export function sourceForcedDefaultLangs(): string[] {
return [
'localsourcelang',
];
}