Skip to content
Snippets Groups Projects
Commit 33371350 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Alwayse use the i18next default language as the lang attribute default

So we only need to define it in one place.
parent 4e40673b
No related branches found
No related tags found
1 merge request!67Create a new i18next instance for every web component
......@@ -20,7 +20,6 @@ import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element";
export class AuthKeycloak extends AdapterLitElement {
constructor() {
super();
this.lang = 'de';
this.forceLogin = false;
this.loadPerson = false;
this.token = "";
......@@ -33,6 +32,7 @@ export class AuthKeycloak extends AdapterLitElement {
this._loginStatus = LoginStatus.UNKNOWN;
this.requestedLoginStatus = LoginStatus.UNKNOWN;
this._i18n = createInstance();
this.lang = this._i18n.language;
// Keycloak config
this.keycloakUrl = null;
......
......@@ -10,11 +10,11 @@ import DBPLitElement from "@dbp-toolkit/common/dbp-lit-element";
export class DbpAuthDemo extends ScopedElementsMixin(DBPLitElement) {
constructor() {
super();
this.lang = 'de';
this.entryPointUrl = '';
this.auth = {};
this.noAuth = false;
this._i18n = createInstance();
this.lang = this._i18n.language;
}
static get scopedElements() {
......
......@@ -55,8 +55,8 @@ export class LoginButton extends ScopedElementsMixin(AdapterLitElement) {
constructor() {
super();
this.lang = 'de';
this._i18n = createInstance();
this.lang = this._i18n.language;
this.auth = {};
}
......
......@@ -25,7 +25,6 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(AdapterLitElement) {
constructor() {
super();
Object.assign(CheckInPlaceSelect.prototype, errorUtils.errorMixin);
this.lang = 'de';
this.entryPointUrl = '';
this.jsonld = null;
this.$select = null;
......@@ -42,6 +41,7 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(AdapterLitElement) {
this.showCapacity = false;
this.auth = {};
this._i18n = createInstance();
this.lang = this._i18n.language;
this._onDocumentClicked = this._onDocumentClicked.bind(this);
}
......
......@@ -5,11 +5,14 @@ import {AuthKeycloak, LoginButton} from '@dbp-toolkit/auth';
import * as commonUtils from '@dbp-toolkit/common/utils';
import * as commonStyles from '@dbp-toolkit/common/styles';
import DBPLitElement from "@dbp-toolkit/common/dbp-lit-element";
import {createInstance} from './i18n.js';
export class CheckInPlaceSelectDemo extends ScopedElementsMixin(DBPLitElement) {
constructor() {
super();
this.lang = 'de';
this._i18n = createInstance();
this.lang = this._i18n.language;
this.entryPointUrl = '';
this.noAuth = false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment