mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
perf: dont build identical langs
This commit is contained in:
@@ -107,12 +107,12 @@ async function addPlugin(translations, pluginData, lang, namespace) {
|
||||
// 2. old language string (en_GB)
|
||||
// 3. corrected plugin defaultLang (en-US)
|
||||
// 4. old plugin defaultLang (en_US)
|
||||
const langs = [
|
||||
const langs = _.uniq([
|
||||
defaultLang.replace('-', '_').replace('-x-', '@'),
|
||||
defaultLang.replace('_', '-').replace('@', '-x-'),
|
||||
lang.replace('-', '_').replace('-x-', '@'),
|
||||
lang,
|
||||
];
|
||||
]);
|
||||
|
||||
for (const language of langs) {
|
||||
/* eslint-disable no-await-in-loop */
|
||||
|
||||
Reference in New Issue
Block a user