feat: add toolbar + notifications
This commit is contained in:
@ -75,10 +75,10 @@ export function getLanguageAliases(langTag) {
|
||||
export function findLanguage(value) {
|
||||
for (const lang in LANGUAGES) {
|
||||
const aliases = getLanguageAliases(lang)
|
||||
const matches = aliases.map(a => {
|
||||
const matches = aliases.some(a => {
|
||||
return new RegExp("\\b" + a + "\\b").test(value)
|
||||
})
|
||||
if (matches.some(v => v)) {
|
||||
if (matches) {
|
||||
return lang
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user