diff --git a/.github/workflows/frontend-admin-tests.yml b/.github/workflows/frontend-admin-tests.yml index ece7891cc..f6fc8c9c2 100644 --- a/.github/workflows/frontend-admin-tests.yml +++ b/.github/workflows/frontend-admin-tests.yml @@ -68,7 +68,7 @@ jobs: # rules. - name: Install all dependencies and symlink for ep_etherpad-lite - run: bin/installDeps.sh + run: pnpm i #- # name: Install etherpad plugins # run: rm -Rf node_modules/ep_align/static/tests/* @@ -92,7 +92,6 @@ jobs: - name: Build admin frontend working-directory: admin run: | - pnpm install pnpm run build # name: Run the frontend admin tests # shell: bash diff --git a/src/static/js/vendors/html10n.ts b/src/static/js/vendors/html10n.ts index 2be196427..eb07f8dba 100644 --- a/src/static/js/vendors/html10n.ts +++ b/src/static/js/vendors/html10n.ts @@ -539,7 +539,9 @@ export class Html10n { if(!lang) continue; if(!(lang in langs)) {// uh, we don't have this lang availbable.. // then check for related langs - if(~lang.indexOf('-')) lang = lang.split('-')[0]; + if(~lang.indexOf('-') != -1) { + lang = lang.split('-')[0]; + } let l: string|undefined = '' for(l of langs) { if(l && lang != l && l.indexOf(lang) === 0) { @@ -551,16 +553,25 @@ export class Html10n { if(lang != l) continue; } + // ... and apply all strings of the current lang in the list // to our build object //lang = "de" - for (let string in this.loader!.langs.get(lang)) { - build.set(string,this.loader!.langs.get(lang)[string]) + if (this.loader!.langs.has(lang)) { + for (let string in this.loader!.langs.get(lang)) { + build.set(string,this.loader!.langs.get(lang)[string]) + } + this.language = lang + } else { + const loaderLang = lang.split('-')[0] + for (let string in this.loader!.langs.get(loaderLang)) { + build.set(string,this.loader!.langs.get(loaderLang)[string]) + } + this.language = loaderLang } // the last applied lang will be exposed as the // lang the page was translated to - this.language = lang } cb(null, build) }) diff --git a/src/static/js/vendors/nice-select.js b/src/static/js/vendors/nice-select.js index d19de5332..447ff6413 100644 --- a/src/static/js/vendors/nice-select.js +++ b/src/static/js/vendors/nice-select.js @@ -110,10 +110,10 @@ $dropdown.find('.list').css('min-width', $dropdown.outerWidth() + 'px'); } - $listHeight = $dropdown.find('.list').outerHeight(); - $top = $dropdown.parent().offset().top; - $bottom = $('body').height() - $top; - $maxListHeight = $bottom - $dropdown.outerHeight() - 20; + let $listHeight = $dropdown.find('.list').outerHeight(); + let $top = $dropdown.parent().offset().top; + let $bottom = $('body').height() - $top; + let $maxListHeight = $bottom - $dropdown.outerHeight() - 20; if ($maxListHeight < 200) { $dropdown.addClass('reverse'); $maxListHeight = 250;