Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • advertisement
  • automagic
  • dbp-translation-component
  • demo
  • demo-file-handling
  • favorites-and-recent-files
  • icon-set-mapping
  • lit2
  • main
  • person-select-custom
  • port-i18next-parser
  • publish
  • remove-sentry
  • renovate/lock-file-maintenance
  • revert-6c632dc6
  • wc-part
  • wip-cleanup
17 results

Target

Select target project
  • 987FCF504483CBC8/toolkit
1 result
Select Git revision
  • advertisement
  • automagic
  • dbp-translation-component
  • demo
  • demo-file-handling
  • favorites-and-recent-files
  • icon-set-mapping
  • lit2
  • main
  • person-select-custom
  • port-i18next-parser
  • publish
  • remove-sentry
  • renovate/lock-file-maintenance
  • revert-6c632dc6
  • wc-part
  • wip-cleanup
17 results
Show changes
Commits on Source (1)
......@@ -44,6 +44,7 @@ export class AppShell extends ScopedElementsMixin(DBPLitElement) {
constructor() {
super();
this.lang = i18n.language;
this.languages = [];
this.activeView = '';
this.entryPointUrl = '';
this.subtitle = '';
......@@ -270,8 +271,12 @@ export class AppShell extends ScopedElementsMixin(DBPLitElement) {
* @param {string} lang
*/
updateLangIfChanged(lang) {
// if the language is switched to English then i18n.languages is ['en'], instead of ['en', 'de']
// so we are now only adding new ones to this.languages
this.languages = Array.from(new Set(this.languages.concat(i18n.languages)));
// in case the language is unknown, fall back to the default
if (!i18n.languages.includes(lang)) {
if (!this.languages.includes(lang)) {
lang = this.lang;
}
if (this.lang !== lang) {
......