diff --git a/packages/app-shell/src/app-shell.js b/packages/app-shell/src/app-shell.js index 0c7d2a8805f13dafeeabff56f604b1d3a618fcb9..bd04cc863b83df03bd282ad80380db95252ae25b 100644 --- a/packages/app-shell/src/app-shell.js +++ b/packages/app-shell/src/app-shell.js @@ -1,4 +1,4 @@ -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import {html, css} from 'lit'; import {ScopedElementsMixin} from '@open-wc/scoped-elements'; import {LanguageSelect} from '@dbp-toolkit/language-select'; @@ -283,6 +283,10 @@ export class AppShell extends ScopedElementsMixin(DBPLitElement) { if (this.src) { this.fetchMetadata(this.src); } + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } } /** diff --git a/packages/app-shell/src/auth-menu-button.js b/packages/app-shell/src/auth-menu-button.js index f7e8d5064ec7efd34ea525d6727de49649d4a81a..051e92c79c1f0ef1a80330d87e0e9eccf654f747 100644 --- a/packages/app-shell/src/auth-menu-button.js +++ b/packages/app-shell/src/auth-menu-button.js @@ -1,4 +1,4 @@ -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import {html, css} from 'lit'; import {unsafeHTML} from 'lit/directives/unsafe-html.js'; import {ScopedElementsMixin} from '@open-wc/scoped-elements'; @@ -12,6 +12,7 @@ export class AuthMenuButton extends ScopedElementsMixin(AdapterLitElement) { super(); this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; this.auth = {}; this.closeDropdown = this.closeDropdown.bind(this); @@ -28,6 +29,7 @@ export class AuthMenuButton extends ScopedElementsMixin(AdapterLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, auth: {type: Object}, }; } @@ -41,6 +43,10 @@ export class AuthMenuButton extends ScopedElementsMixin(AdapterLitElement) { window.addEventListener('resize', this.onWindowResize); document.addEventListener('click', this.closeDropdown); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } } disconnectedCallback() { diff --git a/packages/app-shell/src/dbp-activity-example.js b/packages/app-shell/src/dbp-activity-example.js index 6c75ee4c48edb4a19e23148ed8b0747bde145110..da3862ab0fdbad25dc4a0737490d0b7877cf36e0 100644 --- a/packages/app-shell/src/dbp-activity-example.js +++ b/packages/app-shell/src/dbp-activity-example.js @@ -1,5 +1,5 @@ import {html, LitElement} from 'lit'; -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import * as commonUtils from '@dbp-toolkit/common/utils'; class ActivityExample extends LitElement { @@ -7,14 +7,24 @@ class ActivityExample extends LitElement { super(); this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; } static get properties() { return { lang: {type: String}, + langDir: {type: String}, }; } + connectedCallback() { + super.connectedCallback(); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } + } + update(changedProperties) { changedProperties.forEach((oldValue, propName) => { switch (propName) { diff --git a/packages/app-shell/src/dbp-app-shell-welcome.js b/packages/app-shell/src/dbp-app-shell-welcome.js index dbe30f7b1d294b0dcae2983bc12a0a51ecd2b8b8..fcbb238a1c55e3f1e97f1f67dd03fd2924eea937 100644 --- a/packages/app-shell/src/dbp-app-shell-welcome.js +++ b/packages/app-shell/src/dbp-app-shell-welcome.js @@ -1,4 +1,4 @@ -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import {css, html, LitElement} from 'lit'; import {ScopedElementsMixin} from '@open-wc/scoped-elements'; import * as commonUtils from '@dbp-toolkit/common/utils'; @@ -9,6 +9,7 @@ class AppShellWelcome extends ScopedElementsMixin(LitElement) { super(); this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; this._onVisibilityChanged = this._onVisibilityChanged.bind(this); } @@ -16,6 +17,7 @@ class AppShellWelcome extends ScopedElementsMixin(LitElement) { static get properties() { return { lang: {type: String}, + langDir: {type: String}, }; } @@ -99,6 +101,10 @@ class AppShellWelcome extends ScopedElementsMixin(LitElement) { const app = AppShellWelcome._app; app.addEventListener('visibility-changed', this._onVisibilityChanged); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } } disconnectedCallback() { diff --git a/packages/app-shell/src/i18n.js b/packages/app-shell/src/i18n.js index 0c6fedc883e4f02965df30acfb47fa37e11a268c..930f3538ef66440409619086f5842677cf65a103 100644 --- a/packages/app-shell/src/i18n.js +++ b/packages/app-shell/src/i18n.js @@ -1,4 +1,4 @@ -import {createInstance as _createInstance} from '@dbp-toolkit/common/i18next.js'; +import {createInstance as _createInstance, setOverridesByGlobalCache} from '@dbp-toolkit/common/i18next.js'; import de from './i18n/de/translation.json'; import en from './i18n/en/translation.json'; @@ -6,3 +6,5 @@ import en from './i18n/en/translation.json'; export function createInstance() { return _createInstance({en: en, de: de}, 'de', 'en'); } + +export {setOverridesByGlobalCache}; diff --git a/packages/app-shell/src/tugraz-logo.js b/packages/app-shell/src/tugraz-logo.js index bc1bb741f0bbf394788ca3d18798b347c9753fff..8f1d1bf88e642ce7380094fee3090b5290d5f9a2 100644 --- a/packages/app-shell/src/tugraz-logo.js +++ b/packages/app-shell/src/tugraz-logo.js @@ -1,6 +1,6 @@ import {html, css} from 'lit'; import * as commonStyles from '@dbp-toolkit/common/styles'; -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import {AdapterLitElement} from '@dbp-toolkit/common'; export class TUGrazLogo extends AdapterLitElement { @@ -9,15 +9,25 @@ export class TUGrazLogo extends AdapterLitElement { this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; } static get properties() { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, }; } + connectedCallback() { + super.connectedCallback(); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } + } + update(changedProperties) { changedProperties.forEach((oldValue, propName) => { if (propName === 'lang') { diff --git a/packages/auth/src/auth-keycloak.js b/packages/auth/src/auth-keycloak.js index 61bd6865eefced1280e724786f44425f559b54e7..f190cfaa40820eaeed6b5cc2644a7cd615454488 100644 --- a/packages/auth/src/auth-keycloak.js +++ b/packages/auth/src/auth-keycloak.js @@ -1,4 +1,4 @@ -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import JSONLD from '@dbp-toolkit/common/jsonld'; import {KeycloakWrapper} from './keycloak.js'; import {LoginStatus} from './util.js'; @@ -32,6 +32,7 @@ export class AuthKeycloak extends AdapterLitElement { this.requestedLoginStatus = LoginStatus.UNKNOWN; this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; // Keycloak config this.keycloakUrl = null; @@ -185,6 +186,7 @@ export class AuthKeycloak extends AdapterLitElement { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, forceLogin: {type: Boolean, attribute: 'force-login'}, tryLogin: {type: Boolean, attribute: 'try-login'}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, @@ -246,6 +248,10 @@ export class AuthKeycloak extends AdapterLitElement { }; handleLogin(); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } } disconnectedCallback() { diff --git a/packages/auth/src/dbp-auth-demo.js b/packages/auth/src/dbp-auth-demo.js index 22a2f7ea7162c8582b24e82002f83ae34fdad59f..4116fbd862fc717e85c4405dc5cb8622cfa1d5f9 100644 --- a/packages/auth/src/dbp-auth-demo.js +++ b/packages/auth/src/dbp-auth-demo.js @@ -1,4 +1,4 @@ -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import {html} from 'lit'; import {ScopedElementsMixin} from '@open-wc/scoped-elements'; import {AuthKeycloak} from './auth-keycloak.js'; @@ -15,6 +15,7 @@ export class DbpAuthDemo extends ScopedElementsMixin(DBPLitElement) { this.noAuth = false; this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; } static get scopedElements() { @@ -28,12 +29,21 @@ export class DbpAuthDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, auth: {type: Object}, noAuth: {type: Boolean, attribute: 'no-auth'}, }; } + connectedCallback() { + super.connectedCallback(); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } + } + update(changedProperties) { changedProperties.forEach((oldValue, propName) => { if (propName === 'lang') { diff --git a/packages/auth/src/i18n.js b/packages/auth/src/i18n.js index fe81f7a9df229aa43f2a7467e5a0012883de0a87..930f3538ef66440409619086f5842677cf65a103 100644 --- a/packages/auth/src/i18n.js +++ b/packages/auth/src/i18n.js @@ -1,4 +1,4 @@ -import {createInstance as _createInstance, setOverrides} from '@dbp-toolkit/common/i18next.js'; +import {createInstance as _createInstance, setOverridesByGlobalCache} from '@dbp-toolkit/common/i18next.js'; import de from './i18n/de/translation.json'; import en from './i18n/en/translation.json'; @@ -7,4 +7,4 @@ export function createInstance() { return _createInstance({en: en, de: de}, 'de', 'en'); } -export {setOverrides}; +export {setOverridesByGlobalCache}; diff --git a/packages/auth/src/login-button.js b/packages/auth/src/login-button.js index 26210f4821a04b77bf8f68b50be7027abf3aabbd..db3580aba44d81ffb4bcdab1d64bc5698b2982a6 100644 --- a/packages/auth/src/login-button.js +++ b/packages/auth/src/login-button.js @@ -1,4 +1,4 @@ -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import {html, css} from 'lit'; import {unsafeHTML} from 'lit/directives/unsafe-html.js'; import {ScopedElementsMixin} from '@open-wc/scoped-elements'; @@ -56,6 +56,7 @@ export class LoginButton extends ScopedElementsMixin(AdapterLitElement) { super(); this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; this.auth = {}; } @@ -68,12 +69,17 @@ export class LoginButton extends ScopedElementsMixin(AdapterLitElement) { static get properties() { return { lang: {type: String}, + langDir: {type: String}, auth: {type: Object}, }; } connectedCallback() { super.connectedCallback(); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } } disconnectedCallback() { diff --git a/packages/common/dbp-common-demo.js b/packages/common/dbp-common-demo.js index cc34c35ff46b95ba7951d9fc29bb2c4832b83324..5726fd11724f98bfa84b9986e441a85d1f940fca 100644 --- a/packages/common/dbp-common-demo.js +++ b/packages/common/dbp-common-demo.js @@ -59,7 +59,7 @@ export class DbpCommonDemo extends ScopedElementsMixin(LitElement) { super.connectedCallback(); this._i18n.changeLanguage(this.lang); - // necessary because activity does not extend adapter + // set translation overrides if requested if (this.langDir) { setOverridesByGlobalCache(this._i18n, this); } diff --git a/packages/common/src/translation.js b/packages/common/src/translation.js index 58eb373ecc5c35aee867881b29cc4cc74d0452ad..e79afe4c76cae581c49310be52e21ea86b1df092 100644 --- a/packages/common/src/translation.js +++ b/packages/common/src/translation.js @@ -23,6 +23,7 @@ export class Translation extends DBPLitElement { ...super.properties, key: {type: String}, lang: {type: String}, + langDir: {type: String}, interpolation: {type: Object, attribute: 'var'}, unsafe: {type: Boolean, attribute: 'unsafe'}, }; diff --git a/packages/data-table-view/src/data-table-view.js b/packages/data-table-view/src/data-table-view.js index aff9e74e1e56fd456a087c17cb2e83ed9831e42d..7c477ae1800435d2a12653f888981b35aaaf003c 100644 --- a/packages/data-table-view/src/data-table-view.js +++ b/packages/data-table-view/src/data-table-view.js @@ -54,6 +54,7 @@ export class DataTableView extends AdapterLitElement { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, table: {type: Object, attribute: false}, paging: {type: Boolean}, searching: {type: Boolean}, diff --git a/packages/data-table-view/src/dbp-data-table-view-demo.js b/packages/data-table-view/src/dbp-data-table-view-demo.js index 6cea37cc00419473ce291162876ff90f6ab871ae..f8589ac2df78fccf5ffdb38572daab1ce8dc2772 100644 --- a/packages/data-table-view/src/dbp-data-table-view-demo.js +++ b/packages/data-table-view/src/dbp-data-table-view-demo.js @@ -28,6 +28,7 @@ export class DataTableViewDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, noAuth: {type: Boolean, attribute: 'no-auth'}, }; diff --git a/packages/file-handling/src/clipboard.js b/packages/file-handling/src/clipboard.js index a607d0dc0c78ed88555a8fbadcca223383b42605..2f9de3067137e10af574d9f4e7fa7d7dc444ec03 100644 --- a/packages/file-handling/src/clipboard.js +++ b/packages/file-handling/src/clipboard.js @@ -66,6 +66,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, allowedMimeTypes: {type: String, attribute: 'allowed-mime-types'}, clipboardSelectBtnDisabled: {type: Boolean}, clipboardFiles: {type: Object, attribute: 'clipboard-files'}, diff --git a/packages/file-handling/src/demo.js b/packages/file-handling/src/demo.js index 207aed30a5b1a9c436cf1bacba9b6578f5a063c7..35304eef276340ade1de1bdb37b059bbe8eef893 100644 --- a/packages/file-handling/src/demo.js +++ b/packages/file-handling/src/demo.js @@ -1,4 +1,4 @@ -import {createInstance} from './i18n'; +import {createInstance, setOverridesByGlobalCache} from './i18n'; import {html, LitElement} from 'lit'; import {ScopedElementsMixin} from '@open-wc/scoped-elements'; import {FileSource} from './file-source'; @@ -10,6 +10,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { super(); this._i18n = createInstance(); this.lang = this._i18n.language; + this.langDir = ''; this.url = ''; this.selectedFiles = []; this.selectedFilesCount = 0; @@ -25,6 +26,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { static get properties() { return { lang: {type: String}, + langDir: {type: String}, url: {type: String}, selectedFiles: {type: Array, attribute: false}, selectedFilesCount: {type: Number, attribute: false}, @@ -43,6 +45,10 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { ); }); }); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } } update(changedProperties) { diff --git a/packages/file-handling/src/file-sink.js b/packages/file-handling/src/file-sink.js index 6b0b75af68f1e9ac804382bdda510af578d51c01..dfa8a1d6bf0d2933e66247d04f070ceddcf869df 100644 --- a/packages/file-handling/src/file-sink.js +++ b/packages/file-handling/src/file-sink.js @@ -59,6 +59,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...super.properties, context: {type: String, attribute: 'context'}, lang: {type: String}, + langDir: {type: String}, filename: {type: String}, files: {type: Array, attribute: false}, enabledTargets: {type: String, attribute: 'enabled-targets'}, diff --git a/packages/file-handling/src/file-source.js b/packages/file-handling/src/file-source.js index 73839baf2ee78693ae1bc42ef97cea3a4d9ef7de..74c90a2b21f83abdbdea3248754f9e7b87303d8e 100644 --- a/packages/file-handling/src/file-source.js +++ b/packages/file-handling/src/file-source.js @@ -80,6 +80,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...super.properties, context: {type: String, attribute: 'context'}, lang: {type: String}, + langDir: {type: String}, allowedMimeTypes: {type: String, attribute: 'allowed-mime-types'}, enabledTargets: {type: String, attribute: 'enabled-targets'}, nextcloudAuthUrl: {type: String, attribute: 'nextcloud-auth-url'}, diff --git a/packages/file-handling/src/nextcloud-file-picker.js b/packages/file-handling/src/nextcloud-file-picker.js index 6ee293704421e57fa79391150ef2d6fd8a55c38d..9027911dc978023df4198e5f7e2e64839bdb8988 100644 --- a/packages/file-handling/src/nextcloud-file-picker.js +++ b/packages/file-handling/src/nextcloud-file-picker.js @@ -94,6 +94,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, auth: {type: Object}, authUrl: {type: String, attribute: 'auth-url'}, webDavUrl: {type: String, attribute: 'web-dav-url'}, diff --git a/packages/knowledge-base-web-page-element-view/src/dbp-knowledge-base-web-page-element-view-demo.js b/packages/knowledge-base-web-page-element-view/src/dbp-knowledge-base-web-page-element-view-demo.js index b65aaf9a465319448d8478b66162bc869da82009..57a175f51f1c07bc5f5bf40722c7d35e4842e77f 100644 --- a/packages/knowledge-base-web-page-element-view/src/dbp-knowledge-base-web-page-element-view-demo.js +++ b/packages/knowledge-base-web-page-element-view/src/dbp-knowledge-base-web-page-element-view-demo.js @@ -29,6 +29,7 @@ export class KnowledgeBaseWebPageElementViewDemo extends ScopedElementsMixin(DBP return { ...super.properties, lang: {type: String}, + langDir: {type: String}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, noAuth: {type: Boolean, attribute: 'no-auth'}, }; diff --git a/packages/knowledge-base-web-page-element-view/src/knowledge-base-web-page-element-view.js b/packages/knowledge-base-web-page-element-view/src/knowledge-base-web-page-element-view.js index 9bf0ddd5a45a4aff230932ea4cccf3e230e827f6..7cf248253347ef451165eedf1d627625d2ade6d8 100644 --- a/packages/knowledge-base-web-page-element-view/src/knowledge-base-web-page-element-view.js +++ b/packages/knowledge-base-web-page-element-view/src/knowledge-base-web-page-element-view.js @@ -47,6 +47,7 @@ export class KnowledgeBaseWebPageElementView extends ScopedElementsMixin(Adapter static get properties() { return { lang: {type: String}, + langDir: {type: String}, value: {type: String}, html: {type: String, attribute: false}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, diff --git a/packages/language-select/src/i18n.js b/packages/language-select/src/i18n.js index fbc1b032f3c662e149547117a8df129be5262e99..d861a3c4ca0063c7573d9c622b0184f1813ed85f 100644 --- a/packages/language-select/src/i18n.js +++ b/packages/language-select/src/i18n.js @@ -1,4 +1,4 @@ -import {createInstance as _createInstance, setOverrides} from '@dbp-toolkit/common/i18next.js'; +import {createInstance as _createInstance, setOverrides, setOverridesByGlobalCache} from '@dbp-toolkit/common/i18next.js'; import de from './i18n/de/translation.json'; import en from './i18n/en/translation.json'; @@ -7,4 +7,4 @@ export function createInstance() { return _createInstance({en: en, de: de}, 'de', 'en'); } -export {setOverrides}; \ No newline at end of file +export {setOverrides, setOverridesByGlobalCache}; diff --git a/packages/language-select/src/language-select.js b/packages/language-select/src/language-select.js index 2a63dda6a345086fd47fd51d6b6e1e05c2001094..a13247789ca71c647509f780ed82554d2f5eada5 100644 --- a/packages/language-select/src/language-select.js +++ b/packages/language-select/src/language-select.js @@ -1,5 +1,5 @@ import {html, css} from 'lit'; -import {createInstance} from './i18n.js'; +import {createInstance, setOverridesByGlobalCache} from './i18n.js'; import * as commonStyles from '@dbp-toolkit/common/styles'; import {AdapterLitElement} from '@dbp-toolkit/common'; @@ -12,6 +12,7 @@ export class LanguageSelect extends AdapterLitElement { constructor() { super(); this._lang = 'de'; + this.langDir = ''; this.languages = ['de', 'en']; this._i18n = createInstance(); @@ -41,11 +42,20 @@ export class LanguageSelect extends AdapterLitElement { static get properties() { return { lang: {type: String}, + langDir: {type: String}, next: {type: String}, languages: {type: Array}, }; } + connectedCallback() { + super.connectedCallback(); + + if (this.langDir != '') { + setOverridesByGlobalCache(this._i18n, this); + } + } + set lang(value) { const oldValue = this.lang; const oldNext = this.next; @@ -108,7 +118,7 @@ export class LanguageSelect extends AdapterLitElement { -webkit-box-shadow: none; box-shadow: 0px 0px 4px 2px var(--dbp-primary); } - + ` ; } @@ -124,4 +134,4 @@ export class LanguageSelect extends AdapterLitElement { <a href="#" title="${linkTitle}" @click=${this.onClick}>${this.next.toUpperCase()}</a> `; } -} \ No newline at end of file +} diff --git a/packages/matomo/src/dbp-matomo-demo.js b/packages/matomo/src/dbp-matomo-demo.js index 0af5ce7697fcbd323a84fc5007a511ff18d149d8..735f69cd2e4fa33e90ecfd0002a475a3af73c117 100644 --- a/packages/matomo/src/dbp-matomo-demo.js +++ b/packages/matomo/src/dbp-matomo-demo.js @@ -32,6 +32,7 @@ export class MatomoDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, matomoUrl: {type: String, attribute: 'matomo-url'}, matomoSiteId: {type: Number, attribute: 'matomo-site-id'}, diff --git a/packages/notification/src/dbp-notification-demo.js b/packages/notification/src/dbp-notification-demo.js index f0bfa34bc6a8e75668f26229317f5c3bd938e508..f60d038385000d77c94822b175b6cb842ecc3014 100644 --- a/packages/notification/src/dbp-notification-demo.js +++ b/packages/notification/src/dbp-notification-demo.js @@ -23,6 +23,7 @@ export class NotificationDemo extends ScopedElementsMixin(LitElement) { static get properties() { return { lang: {type: String}, + langDir: {type: String}, }; } diff --git a/packages/notification/src/notification.js b/packages/notification/src/notification.js index 78e81ab9c13d678a54fd6e3ded091e649ae13871..62bb22f77215d24c898ac6304c22174087f0726b 100644 --- a/packages/notification/src/notification.js +++ b/packages/notification/src/notification.js @@ -22,6 +22,7 @@ export class Notification extends DBPLitElement { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, }; } diff --git a/packages/person-profile/src/dbp-person-profile-demo.js b/packages/person-profile/src/dbp-person-profile-demo.js index f6c07f3d7f8652146703c6271b733858273db1a5..06103df6afed363e7ff4adb194aa1043637e4912 100644 --- a/packages/person-profile/src/dbp-person-profile-demo.js +++ b/packages/person-profile/src/dbp-person-profile-demo.js @@ -35,6 +35,7 @@ export class PersonProfileDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, person: {type: String, attribute: false}, selectedPerson: {type: String, attribute: false}, diff --git a/packages/person-profile/src/person-profile.js b/packages/person-profile/src/person-profile.js index f073d4f59474eddf37c30dad63d3984a4126c411..33349c576fa15e5ec949df8f6db5f8b1456bc5bc 100644 --- a/packages/person-profile/src/person-profile.js +++ b/packages/person-profile/src/person-profile.js @@ -20,6 +20,7 @@ export class PersonProfile extends DBPLitElement { static get properties() { return { lang: {type: String}, + langDir: {type: String}, active: {type: Boolean, attribute: false}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, value: {type: String}, diff --git a/packages/person-select/src/dbp-person-select-demo.js b/packages/person-select/src/dbp-person-select-demo.js index 363f40dcefea1fac53a61ea1f423c6663911fa78..ec93df7602bf64c022ba87b3b3ac6b8f15ca9dc5 100644 --- a/packages/person-select/src/dbp-person-select-demo.js +++ b/packages/person-select/src/dbp-person-select-demo.js @@ -29,6 +29,7 @@ export class PersonSelectDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, noAuth: {type: Boolean, attribute: 'no-auth'}, }; diff --git a/packages/person-select/src/person-select.js b/packages/person-select/src/person-select.js index cd0bed53f25d8ed8e9849f233c7aba6ea0e14ca5..6b4094544319744991191c8b12884c29c056e66d 100644 --- a/packages/person-select/src/person-select.js +++ b/packages/person-select/src/person-select.js @@ -63,6 +63,7 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, active: {type: Boolean, attribute: false}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, value: {type: String}, diff --git a/packages/provider/src/dbp-provider-demo.js b/packages/provider/src/dbp-provider-demo.js index f2d0d982d25c805c7aa28043b2be6b452c3b2e04..21e482eaf0524e837e6c25ad1fefe8473c6676da 100644 --- a/packages/provider/src/dbp-provider-demo.js +++ b/packages/provider/src/dbp-provider-demo.js @@ -32,6 +32,7 @@ class ProviderDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, }; } diff --git a/packages/qr-code-scanner/src/dbp-qr-code-scanner-demo.js b/packages/qr-code-scanner/src/dbp-qr-code-scanner-demo.js index df27f2465fcd146125a7268e0992a8d801ef3024..a46517a935cb1d42dca4e5e64f375ed70ad2c286 100644 --- a/packages/qr-code-scanner/src/dbp-qr-code-scanner-demo.js +++ b/packages/qr-code-scanner/src/dbp-qr-code-scanner-demo.js @@ -22,6 +22,7 @@ export class QrCodeScannerDemo extends ScopedElementsMixin(LitElement) { static get properties() { return { lang: {type: String}, + langDir: {type: String}, }; } diff --git a/packages/qr-code-scanner/src/qr-code-scanner.js b/packages/qr-code-scanner/src/qr-code-scanner.js index bf50eb9a2d6e8d704a14a5a9c95c1708a0f5f414..1ba8e2abf182fac01cfdb74d16259b3090c5c6a2 100644 --- a/packages/qr-code-scanner/src/qr-code-scanner.js +++ b/packages/qr-code-scanner/src/qr-code-scanner.js @@ -153,6 +153,7 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) { static get properties() { return { lang: {type: String}, + langDir: {type: String}, showOutput: {type: Boolean, attribute: 'show-output'}, stopScan: {type: Boolean, attribute: 'stop-scan'}, matchRegex: {type: String, attribute: 'match-regex'}, diff --git a/packages/resource-select/src/dbp-resource-select-demo.js b/packages/resource-select/src/dbp-resource-select-demo.js index 4c550238ecfbbe2ef1549711df17e63656bff7e9..bde2203dee96b009a04f3a556b242b3f525591d9 100644 --- a/packages/resource-select/src/dbp-resource-select-demo.js +++ b/packages/resource-select/src/dbp-resource-select-demo.js @@ -29,6 +29,7 @@ export class ResourceSelectDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, noAuth: {type: Boolean, attribute: 'no-auth'}, }; diff --git a/packages/resource-select/src/resource-select.js b/packages/resource-select/src/resource-select.js index 151e3408bb5816245a39e686fe8e7a109fceda9b..c5ee3c0c7448c2164acd4bf6f8887e3f190728cb 100644 --- a/packages/resource-select/src/resource-select.js +++ b/packages/resource-select/src/resource-select.js @@ -35,6 +35,7 @@ export class ResourceSelect extends AdapterLitElement { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, auth: {type: Object}, entryPointUrl: {type: String, attribute: 'entry-point-url'}, resourcePath: {type: String, attribute: 'resource-path'}, diff --git a/packages/theme-switcher/src/theme-switcher.js b/packages/theme-switcher/src/theme-switcher.js index 2370f803109a8986b4ef6b9ebfa4ee77aaa3cfff..a162d8ba901dc3095e895e3bb1ea003b39d338c3 100644 --- a/packages/theme-switcher/src/theme-switcher.js +++ b/packages/theme-switcher/src/theme-switcher.js @@ -24,6 +24,7 @@ export class ThemeSwitcher extends ScopedElementsMixin(AdapterLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, themes: {type: Array, attribute: 'themes'}, darkModeThemeOverride: {type: String, attribute: 'dark-mode-theme-override'}, dropdownRight: {type: Boolean, attribute: 'dropdown-right'}, diff --git a/packages/tooltip/src/dbp-tooltip-demo.js b/packages/tooltip/src/dbp-tooltip-demo.js index c6f86e70ffae994dd04b594c05daa542547be1d5..d62fc27fc81b8c478b5af151fb8ef6468ede9b78 100644 --- a/packages/tooltip/src/dbp-tooltip-demo.js +++ b/packages/tooltip/src/dbp-tooltip-demo.js @@ -28,6 +28,7 @@ export class TooltipDemo extends ScopedElementsMixin(DBPLitElement) { return { ...super.properties, lang: {type: String}, + langDir: {type: String}, }; }