From fd72335390e3a5d2b9ed0fcc8aa497dc7fd47969 Mon Sep 17 00:00:00 2001 From: Dennis Sen Date: Thu, 16 Jan 2025 06:19:46 +0100 Subject: [PATCH 01/12] add ts support for i18n strings Resolves: #94 --- @types/i18next.d.ts | 84 ++++++++++ packages/clients/afm/tsconfig.json | 3 - packages/clients/dish/CHANGELOG.md | 1 + packages/clients/dish/src/language.ts | 52 ++++++ packages/clients/dish/src/locales.ts | 47 ------ packages/clients/dish/src/mapConfig.ts | 4 +- .../dish/src/plugins/Gfi/ActionButton.vue | 8 +- .../clients/dish/src/plugins/Gfi/Content.vue | 4 +- .../dish/src/plugins/Header/Header.vue | 2 +- .../dish/src/plugins/Header/language.ts | 10 +- .../dish/src/plugins/Modal/Welcome.vue | 20 +-- .../dish/src/plugins/Modal/language.ts | 52 +++--- .../dish/src/utils/navigateToDenkmal.ts | 2 +- packages/clients/dish/src/utils/search.ts | 4 +- packages/clients/dish/tsconfig.json | 3 - packages/clients/generic/tsconfig.json | 3 - packages/clients/meldemichel/src/language.ts | 74 ++++----- .../src/plugins/AfmButton/AfmButton.vue | 4 +- .../src/plugins/AfmButton/language.ts | 16 +- .../src/plugins/Gfi/ActionButtons.vue | 4 +- .../meldemichel/src/plugins/Gfi/Feature.vue | 2 +- packages/clients/meldemichel/tsconfig.json | 3 - packages/clients/snowbox/src/language.ts | 48 +++--- packages/clients/snowbox/tsconfig.json | 3 - .../textLocator/src/components/ResultInfo.vue | 8 +- packages/clients/textLocator/src/language.ts | 116 ++++++++++++++ packages/clients/textLocator/src/locales.ts | 115 ------------- packages/clients/textLocator/src/mapConfig.ts | 2 +- .../GeometrySearch/components/DrawMode.vue | 8 +- .../components/GeometrySearch.vue | 8 +- .../GeometrySearch/components/ViewToggle.vue | 4 +- .../src/plugins/GeometrySearch/language.ts | 85 +++++----- .../textLocator/src/plugins/Header/Header.vue | 2 +- .../src/plugins/Header/language.ts | 12 +- .../findLiterature/searchLiterature.ts | 2 +- packages/clients/textLocator/tsconfig.json | 3 - packages/core/src/components/MapContainer.vue | 6 +- packages/core/src/language/locales/de.ts | 35 ++-- packages/core/src/language/locales/en.ts | 3 +- .../actions/checkServiceAvailability.ts | 2 +- packages/core/tsconfig.json | 6 - packages/lib/getCluster/tsconfig.json | 3 - packages/lib/getFeatures/tsconfig.json | 3 - packages/lib/idx/tsconfig.json | 3 - packages/lib/invisibleStyle/tsconfig.json | 3 - .../lib/passesBoundaryCheck/tsconfig.json | 3 - .../lib/testMountParameters/tsconfig.json | 3 - packages/lib/tooltip/index.ts | 1 + packages/lib/tooltip/tsconfig.json | 3 - .../src/components/GroupSelect.vue | 2 +- .../AddressSearch/src/components/Results.vue | 4 +- .../plugins/AddressSearch/src/language.ts | 89 ++++++----- .../AddressSearch/src/store/getters.ts | 10 +- packages/plugins/AddressSearch/tsconfig.json | 3 - .../src/components/AttributionButton.vue | 6 +- .../src/components/AttributionContent.vue | 2 +- packages/plugins/Attributions/src/language.ts | 56 ++++--- packages/plugins/Attributions/tsconfig.json | 3 - packages/plugins/Draw/src/components/Draw.vue | 6 +- .../Draw/src/components/DrawOptions.vue | 4 +- packages/plugins/Draw/src/language.ts | 128 ++++++++------- packages/plugins/Draw/src/store/index.ts | 20 +-- packages/plugins/Draw/tsconfig.json | 3 - .../plugins/Export/src/components/Export.vue | 14 +- packages/plugins/Export/src/language.ts | 52 +++--- packages/plugins/Export/tsconfig.json | 3 - .../Filter/src/components/ChooseTimeFrame.vue | 18 +-- .../plugins/Filter/src/components/Filter.vue | 12 +- .../Filter/src/components/FilterContent.vue | 14 +- packages/plugins/Filter/src/language.ts | 130 +++++++-------- packages/plugins/Filter/src/store/index.ts | 2 +- .../Filter/src/utils/parseTimeOption.ts | 4 +- packages/plugins/Filter/tsconfig.json | 3 - .../Fullscreen/src/components/Fullscreen.vue | 8 +- packages/plugins/Fullscreen/src/language.ts | 50 +++--- packages/plugins/Fullscreen/tsconfig.json | 3 - .../src/components/GeoLocation.vue | 6 +- packages/plugins/GeoLocation/src/language.ts | 78 ++++----- .../plugins/GeoLocation/src/store/actions.ts | 2 +- .../plugins/GeoLocation/tests/store.spec.ts | 2 +- packages/plugins/GeoLocation/tsconfig.json | 3 - .../plugins/Gfi/src/components/Feature.vue | 2 +- .../Gfi/src/components/FeatureButtonGroup.vue | 6 +- .../src/components/FeatureSwitchButtons.vue | 4 +- .../Gfi/src/components/FeatureTableBody.vue | 10 +- .../Gfi/src/components/FeatureTableHead.vue | 4 +- packages/plugins/Gfi/src/components/Gfi.vue | 2 +- packages/plugins/Gfi/src/components/List.vue | 22 ++- packages/plugins/Gfi/src/language.ts | 151 +++++++++--------- packages/plugins/Gfi/tsconfig.json | 3 - .../IconMenu/src/components/IconMenu.vue | 8 +- packages/plugins/IconMenu/src/language.ts | 60 +++---- packages/plugins/IconMenu/src/store/index.ts | 2 +- packages/plugins/IconMenu/tsconfig.json | 3 - .../src/components/LayerWrapper.vue | 4 +- .../LayerChooser/src/components/Options.vue | 6 +- .../LayerChooser/src/components/Selection.vue | 4 +- packages/plugins/LayerChooser/src/language.ts | 56 ++++--- packages/plugins/LayerChooser/tsconfig.json | 3 - .../plugins/Legend/src/components/Legend.vue | 16 +- packages/plugins/Legend/src/language.ts | 60 +++---- packages/plugins/Legend/tsconfig.json | 3 - .../src/components/LoadingIndicator.vue | 2 +- .../plugins/LoadingIndicator/src/language.ts | 32 ++-- .../plugins/LoadingIndicator/tsconfig.json | 3 - packages/plugins/Pins/src/language.ts | 48 +++--- packages/plugins/Pins/tsconfig.json | 3 - .../plugins/ReverseGeocoder/tsconfig.json | 3 - .../plugins/Scale/src/components/Scale.vue | 8 +- packages/plugins/Scale/src/language.ts | 40 ++--- packages/plugins/Scale/src/store/index.ts | 2 +- packages/plugins/Scale/tsconfig.json | 3 - .../plugins/Toast/src/components/Toast.vue | 2 +- packages/plugins/Toast/src/language.ts | 31 ++-- packages/plugins/Toast/tsconfig.json | 3 - packages/plugins/Zoom/src/components/Zoom.vue | 10 +- .../Zoom/src/components/ZoomSlider.vue | 2 +- packages/plugins/Zoom/src/language.ts | 40 ++--- packages/plugins/Zoom/tsconfig.json | 3 - tsconfig.json | 3 +- 120 files changed, 1178 insertions(+), 1121 deletions(-) create mode 100644 @types/i18next.d.ts delete mode 100644 packages/clients/afm/tsconfig.json create mode 100644 packages/clients/dish/src/language.ts delete mode 100644 packages/clients/dish/src/locales.ts delete mode 100644 packages/clients/dish/tsconfig.json delete mode 100644 packages/clients/generic/tsconfig.json delete mode 100644 packages/clients/meldemichel/tsconfig.json delete mode 100644 packages/clients/snowbox/tsconfig.json create mode 100644 packages/clients/textLocator/src/language.ts delete mode 100644 packages/clients/textLocator/src/locales.ts delete mode 100644 packages/clients/textLocator/tsconfig.json delete mode 100644 packages/core/tsconfig.json delete mode 100644 packages/lib/getCluster/tsconfig.json delete mode 100644 packages/lib/getFeatures/tsconfig.json delete mode 100644 packages/lib/idx/tsconfig.json delete mode 100644 packages/lib/invisibleStyle/tsconfig.json delete mode 100644 packages/lib/passesBoundaryCheck/tsconfig.json delete mode 100644 packages/lib/testMountParameters/tsconfig.json delete mode 100644 packages/lib/tooltip/tsconfig.json delete mode 100644 packages/plugins/AddressSearch/tsconfig.json delete mode 100644 packages/plugins/Attributions/tsconfig.json delete mode 100644 packages/plugins/Draw/tsconfig.json delete mode 100644 packages/plugins/Export/tsconfig.json delete mode 100644 packages/plugins/Filter/tsconfig.json delete mode 100644 packages/plugins/Fullscreen/tsconfig.json delete mode 100644 packages/plugins/GeoLocation/tsconfig.json delete mode 100644 packages/plugins/Gfi/tsconfig.json delete mode 100644 packages/plugins/IconMenu/tsconfig.json delete mode 100644 packages/plugins/LayerChooser/tsconfig.json delete mode 100644 packages/plugins/Legend/tsconfig.json delete mode 100644 packages/plugins/LoadingIndicator/tsconfig.json delete mode 100644 packages/plugins/Pins/tsconfig.json delete mode 100644 packages/plugins/ReverseGeocoder/tsconfig.json delete mode 100644 packages/plugins/Scale/tsconfig.json delete mode 100644 packages/plugins/Toast/tsconfig.json delete mode 100644 packages/plugins/Zoom/tsconfig.json diff --git a/@types/i18next.d.ts b/@types/i18next.d.ts new file mode 100644 index 000000000..6de04ed5f --- /dev/null +++ b/@types/i18next.d.ts @@ -0,0 +1,84 @@ +import 'i18next' + +// // // core/plugins // // // + +import { common as resourcesDeCore } from '../packages/core/src/language/locales/de' +import { resourcesDe as resourcesDeAddressSearch } from '../packages/plugins/AddressSearch/src/language' +import { resourcesDe as resourcesDeAttributions } from '../packages/plugins/Attributions/src/language' +import { resourcesDe as resourcesDeDraw } from '../packages/plugins/Draw/src/language' +import { resourcesDe as resourcesDeExport } from '../packages/plugins/Export/src/language' +import { resourcesDe as resourcesDeFilter } from '../packages/plugins/Filter/src/language' +import { resourcesDe as resourcesDeFullscreen } from '../packages/plugins/Fullscreen/src/language' +import { resourcesDe as resourcesDeGeoLocation } from '../packages/plugins/GeoLocation/src/language' +import { resourcesDe as resourcesDeGfi } from '../packages/plugins/Gfi/src/language' +import { resourcesDe as resourcesDeIconMenu } from '../packages/plugins/IconMenu/src/language' +import { resourcesDe as resourcesDeLayerChooser } from '../packages/plugins/LayerChooser/src/language' +import { resourcesDe as resourcesDeLegend } from '../packages/plugins/Legend/src/language' +import { resourcesDe as resourcesDeLoadingIndicator } from '../packages/plugins/LoadingIndicator/src/language' +import { resourcesDe as resourcesDePins } from '../packages/plugins/Pins/src/language' +import { resourcesDe as resourcesDeScale } from '../packages/plugins/Scale/src/language' +import { resourcesDe as resourcesDeToast } from '../packages/plugins/Toast/src/language' +import { resourcesDe as resourcesDeZoom } from '../packages/plugins/Zoom/src/language' + +// // // clients // // // + +import { dishDe } from '../packages/clients/dish/src/language' +import { dishHeaderDe } from '../packages/clients/dish/src/plugins/Header/language' +import { dishModalDe } from '../packages/clients/dish/src/plugins/Modal/language' +import { meldemichelDe } from '../packages/clients/meldemichel/src/language' +import { meldemichelDe as meldemichelAfmButtonDe } from '../packages/clients/meldemichel/src/plugins/AfmButton/language' +import { snowboxDe } from '../packages/clients/snowbox/src/language' +import { textLocatorDe } from '../packages/clients/textLocator/src/language' +import { textLocatorDe as textLocatorHeaderDe } from '../packages/clients/textLocator/src/plugins/Header/language' +import { geometrySearchDe } from '../packages/clients/textLocator/src/plugins/GeometrySearch/language' + +// // // resources // // // + +const resources = { + common: { + ...resourcesDeCore, + dish: dishDe, + meldemichel: meldemichelDe, + snowbox: snowboxDe, + textLocator: textLocatorDe, + plugins: { + addressSearch: resourcesDeAddressSearch.plugins.addressSearch, + attributions: resourcesDeAttributions.plugins.attributions, + dish: { + ...dishHeaderDe, + ...dishModalDe + }, + draw: resourcesDeDraw.plugins.draw, + export: resourcesDeExport.plugins.export, + filter: resourcesDeFilter.plugins.filter, + fullscreen: resourcesDeFullscreen.plugins.fullscreen, + geoLocation: resourcesDeGeoLocation.plugins.geoLocation, + // geometrySearch is from textLocator + geometrySearch: { + ...geometrySearchDe + }, + gfi: resourcesDeGfi.plugins.gfi, + iconMenu: resourcesDeIconMenu.plugins.iconMenu, + layerChooser: resourcesDeLayerChooser.plugins.layerChooser, + legend: resourcesDeLegend.plugins.legend, + loadingIndicator: resourcesDeLoadingIndicator.plugins.loadingIndicator, + meldemichel: { + ...meldemichelAfmButtonDe + }, + pins: resourcesDePins.plugins.pins, + scale: resourcesDeScale.plugins.scale, + textLocator: { + ...textLocatorHeaderDe + }, + toast: resourcesDeToast.plugins.toast, + zoom: resourcesDeZoom.plugins.zoom, + } + } +} as const + +declare module 'i18next' { + interface CustomTypeOptions { + defaultNS: "common" + resources: typeof resources + } +} diff --git a/packages/clients/afm/tsconfig.json b/packages/clients/afm/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/clients/afm/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/clients/dish/CHANGELOG.md b/packages/clients/dish/CHANGELOG.md index 360c579f4..ef2b01b74 100644 --- a/packages/clients/dish/CHANGELOG.md +++ b/packages/clients/dish/CHANGELOG.md @@ -6,6 +6,7 @@ - Fix: Extend typing for search result function according to type package update. - Fix: Import types `AddressSearchState` and `AddressSearchGetters` from correct position. - Fix: Import enum `SearchResultSymbols` from correct position. +- Fix: The alt text to the "Landesdachmarke" for screen readers was missing. - Chore: Change value of `pins.movable` configuration to `'drag'` as using a boolean has been deprecated in a future release. - Chore: Upgrade `@masterportal/masterportalapi` from `2.8.0` to `2.40.0` and subsequently `ol` from `^7.1.0` to `^9.2.4`. - Chore: Update `@polar`-dependencies to the latest versions. diff --git a/packages/clients/dish/src/language.ts b/packages/clients/dish/src/language.ts new file mode 100644 index 000000000..9c51041b4 --- /dev/null +++ b/packages/clients/dish/src/language.ts @@ -0,0 +1,52 @@ +export const dishDe = { + backendSizeError: + 'Die Suche ist zu allgemein. Bitte wählen Sie weitere Suchbegriffe oder schränken Sie die Suche über einen Filter ein.', + unknownError: 'Ein unbekannter Fehler ist aufgetreten.', + idNotFound: + 'Die verlinkte ID konnte leider nicht aufgelöst werden. Bitte verwenden Sie Suche und Karte, um zum Denkmal zu navigieren.', + addressSearchHint: 'Eingabe von z.B. Bezeichnung, Lage, Adresse, ...', +} as const + +export const resourcesDe = { + dish: dishDe, + plugins: { + gfi: { + property: { + export: 'Export Detailinformationen', + }, + toggle: 'Informationen zu Sachgesamtheit öffnen/schließen', + }, + }, +} as const + +export const resourcesEn = { + dish: { + backendSizeError: + 'Too broad search. Please choose additional search terms or use a filter.', + unknownError: 'An unknown error occurred.', + idNotFound: + 'The linked ID could not be found. Please use the search function or map to navigate to your point of interest.', + addressSearchHint: 'Entry of e.g. monument names, location, address, ...', + }, + plugins: { + gfi: { + property: { + export: 'Detail information export', + }, + toggle: 'Open/close additional information', + }, + }, +} as const + +const locales = [ + { + type: 'de', + resources: resourcesDe, + }, + { + type: 'en', + resources: resourcesEn, + }, +] + +export default locales diff --git a/packages/clients/dish/src/locales.ts b/packages/clients/dish/src/locales.ts deleted file mode 100644 index 204ce5bd6..000000000 --- a/packages/clients/dish/src/locales.ts +++ /dev/null @@ -1,47 +0,0 @@ -const locales = [ - { - type: 'de', - resources: { - dish: { - backendSizeError: - 'Die Suche ist zu allgemein. Bitte wählen Sie weitere Suchbegriffe oder schränken Sie die Suche über einen Filter ein.', - unknownError: 'Ein unbekannter Fehler ist aufgetreten.', - idNotFound: - 'Die verlinkte ID konnte leider nicht aufgelöst werden. Bitte verwenden Sie Suche und Karte, um zum Denkmal zu navigieren.', - addressSearchHint: 'Eingabe von z.B. Bezeichnung, Lage, Adresse, ...', - }, - plugins: { - gfi: { - property: { - export: 'Export Detailinformationen', - }, - toggle: 'Informationen zu Sachgesamtheit öffnen/schließen', - }, - }, - }, - }, - { - type: 'en', - resources: { - dish: { - backendSizeError: - 'Too broad search. Please choose additional search terms or use a filter.', - unknownError: 'An unknown error occurred.', - idNotFound: - 'The linked ID could not be found. Please use the search function or map to navigate to your point of interest.', - addressSearchHint: - 'Entry of e.g. monument names, location, address, ...', - }, - plugins: { - gfi: { - property: { - export: 'Detail information export', - }, - toggle: 'Open/close additional information', - }, - }, - }, - }, -] - -export default locales diff --git a/packages/clients/dish/src/mapConfig.ts b/packages/clients/dish/src/mapConfig.ts index 0d674cd58..7cf3c59cc 100644 --- a/packages/clients/dish/src/mapConfig.ts +++ b/packages/clients/dish/src/mapConfig.ts @@ -7,7 +7,7 @@ import { dishBaseUrl, // servicePrefix, s.u. } from './services' -import locales from './locales' +import locales from './language' const shBlue = '#003064' const shWhite = '#FFFFFF' @@ -171,7 +171,7 @@ export const mapConfiguration = { groupProperties: { groupDenkmalsuche: { label: 'Denkmalsuche', - hint: 'common:dish.addressSearchHint', + hint: 'dish.addressSearchHint', resultDisplayMode: 'categorized', limitResults: 3, }, diff --git a/packages/clients/dish/src/plugins/Gfi/ActionButton.vue b/packages/clients/dish/src/plugins/Gfi/ActionButton.vue index b5aacb833..1eed4c6b3 100644 --- a/packages/clients/dish/src/plugins/Gfi/ActionButton.vue +++ b/packages/clients/dish/src/plugins/Gfi/ActionButton.vue @@ -5,13 +5,13 @@ text :href="exportProperty" target="_blank" - :alt="$t('common:plugins.gfi.property.imageAlt')" - :title="$t('common:plugins.gfi.property.linkTitle')" - :aria-label="$t('common:plugins.gfi.property.export')" + :alt="$t('plugins.gfi.property.imageAlt')" + :title="$t('plugins.gfi.property.linkTitle')" + :aria-label="$t('plugins.gfi.property.export')" onmousedown="return false" > fa-download - {{ $t('common:plugins.gfi.property.export') }} + {{ $t('plugins.gfi.property.export') }} diff --git a/packages/clients/dish/src/plugins/Gfi/Content.vue b/packages/clients/dish/src/plugins/Gfi/Content.vue index 0c3831ec4..f54bf8ac5 100644 --- a/packages/clients/dish/src/plugins/Gfi/Content.vue +++ b/packages/clients/dish/src/plugins/Gfi/Content.vue @@ -6,7 +6,7 @@ fa-xmark @@ -49,7 +49,7 @@ diff --git a/packages/clients/dish/src/plugins/Header/Header.vue b/packages/clients/dish/src/plugins/Header/Header.vue index 36def29be..f17172e9c 100644 --- a/packages/clients/dish/src/plugins/Header/Header.vue +++ b/packages/clients/dish/src/plugins/Header/Header.vue @@ -1,6 +1,6 @@ diff --git a/packages/clients/dish/src/plugins/Header/language.ts b/packages/clients/dish/src/plugins/Header/language.ts index 05ac65753..08a2f7f02 100644 --- a/packages/clients/dish/src/plugins/Header/language.ts +++ b/packages/clients/dish/src/plugins/Header/language.ts @@ -1,14 +1,18 @@ import { LanguageOption } from '@polar/lib-custom-types' +export const dishHeaderDe = { + header: { + text: 'Denkmalkarte Schleswig-Holstein', + }, +} as const + const lang: LanguageOption[] = [ { type: 'de', resources: { plugins: { dish: { - header: { - text: 'Denkmalkarte Schleswig-Holstein', - }, + ...dishHeaderDe, }, }, }, diff --git a/packages/clients/dish/src/plugins/Modal/Welcome.vue b/packages/clients/dish/src/plugins/Modal/Welcome.vue index aac34a406..34372b608 100644 --- a/packages/clients/dish/src/plugins/Modal/Welcome.vue +++ b/packages/clients/dish/src/plugins/Modal/Welcome.vue @@ -3,44 +3,44 @@ - {{ $t('common:plugins.dish.modal.welcome.header') }} + {{ $t('plugins.dish.modal.welcome.header') }} - {{ $t('common:plugins.dish.modal.welcome.p1') }} + {{ $t('plugins.dish.modal.welcome.p1') }} - {{ $t('common:plugins.dish.modal.welcome.p2') }} + {{ $t('plugins.dish.modal.welcome.p2') }} - {{ $t('common:plugins.dish.modal.welcome.p3') }} + {{ $t('plugins.dish.modal.welcome.p3') }} fa-chevron-right - {{ $t('common:plugins.dish.modal.welcome.link1') }}. + {{ $t('plugins.dish.modal.welcome.link1') }}. - {{ $t('common:plugins.dish.modal.welcome.p4') }} + {{ $t('plugins.dish.modal.welcome.p4') }} fa-chevron-right - {{ $t('common:plugins.dish.modal.welcome.link2') }}. + {{ $t('plugins.dish.modal.welcome.link2') }}. - {{ $t('common:plugins.dish.modal.welcome.closeInfo') }} + {{ $t('plugins.dish.modal.welcome.closeInfo') }} diff --git a/packages/clients/dish/src/plugins/Modal/language.ts b/packages/clients/dish/src/plugins/Modal/language.ts index cd4bd1fb7..2c376201b 100644 --- a/packages/clients/dish/src/plugins/Modal/language.ts +++ b/packages/clients/dish/src/plugins/Modal/language.ts @@ -1,35 +1,39 @@ import { LanguageOption } from '@polar/lib-custom-types' +export const dishModalDe = { + modal: { + welcome: { + header: 'Willkommen in der Denkmalkarte Schleswig-Holstein', + landesdachmarkeAlt: + 'Logo der Landesdachmarke "Schleswig-Holstein. Der echte Norden."', + p1: 'Kulturdenkmale sind gesetzlich geschützt, und nachrichtlich in ein Verzeichnis, die sogenannte Denkmalliste, aufzunehmen. Die Denkmaleigenschaft ist nicht von der Eintragung in die Denkmalliste, oder von der Darstellung in der Denkmalkarte abhängig. Auch Objekte, die nicht hier verzeichnet sind, können als Kulturdenkmale kraft Gesetz (Ipsa Lege) geschützt sein, wenn sie die gesetzlichen Kriterien für die Denkmaleigenschaft erfüllen.', + p2: 'In der Denkmalkarte werden Kulturdenkmale in der Zuständigkeit des Landesamtes für Denkmalpflege Schleswig-Holstein (Baudenkmale, Gründenkmale, Schutzzonen vom Typ Denkmalbereich) dargestellt, mit Ausnahme der Hansestadt Lübeck.', + p3: 'Die Darstellungen in der Denkmalkarte haben informatorischen Charakter. Sie sind nicht rechtsverbindlich. Für tagesaktuelle, rechtsverbindliche Auskünfte wenden Sie sich bitte an:', + link1: 'Landesamt für Denkmalpflege Schleswig-Holstein', + link2: 'Planungs- und Genehmigungsverfahren', + p4: 'Die Nutzung der Denkmalkarte ersetzt nicht die förmliche Beteiligung der jeweils zuständigen Denkmalbehörde in', + confirmRead: + 'Hiermit bestätige ich, dass ich die Informationen zur Kenntnis genommen habe.', + closeInfo: "Los geht's!", + }, + hints: { + /* NOTE + * There's lots of special formatting and links in that + * text block, and no multilingual support in sight. + * For that reason, this part is currently maintained + * in the Hints.vue file, until the need arises. + */ + }, + }, +} as const + const lang: LanguageOption[] = [ { type: 'de', resources: { plugins: { dish: { - modal: { - welcome: { - header: 'Willkommen in der Denkmalkarte Schleswig-Holstein', - landesdachmarkeAlt: - 'Logo der Landesdachmarke "Schleswig-Holstein. Der echte Norden."', - p1: 'Kulturdenkmale sind gesetzlich geschützt, und nachrichtlich in ein Verzeichnis, die sogenannte Denkmalliste, aufzunehmen. Die Denkmaleigenschaft ist nicht von der Eintragung in die Denkmalliste, oder von der Darstellung in der Denkmalkarte abhängig. Auch Objekte, die nicht hier verzeichnet sind, können als Kulturdenkmale kraft Gesetz (Ipsa Lege) geschützt sein, wenn sie die gesetzlichen Kriterien für die Denkmaleigenschaft erfüllen.', - p2: 'In der Denkmalkarte werden Kulturdenkmale in der Zuständigkeit des Landesamtes für Denkmalpflege Schleswig-Holstein (Baudenkmale, Gründenkmale, Schutzzonen vom Typ Denkmalbereich) dargestellt, mit Ausnahme der Hansestadt Lübeck.', - p3: 'Die Darstellungen in der Denkmalkarte haben informatorischen Charakter. Sie sind nicht rechtsverbindlich. Für tagesaktuelle, rechtsverbindliche Auskünfte wenden Sie sich bitte an:', - link1: 'Landesamt für Denkmalpflege Schleswig-Holstein', - link2: 'Planungs- und Genehmigungsverfahren', - p4: 'Die Nutzung der Denkmalkarte ersetzt nicht die förmliche Beteiligung der jeweils zuständigen Denkmalbehörde in', - confirmRead: - 'Hiermit bestätige ich, dass ich die Informationen zur Kenntnis genommen habe.', - closeInfo: "Los geht's!", - }, - hints: { - /* NOTE - * There's lots of special formatting and links in that - * text block, and no multilingual support in sight. - * For that reason, this part is currently maintained - * in the Hints.vue file, until the need arises. - */ - }, - }, + ...dishModalDe, }, }, }, diff --git a/packages/clients/dish/src/utils/navigateToDenkmal.ts b/packages/clients/dish/src/utils/navigateToDenkmal.ts index dd98581b7..515032c93 100644 --- a/packages/clients/dish/src/utils/navigateToDenkmal.ts +++ b/packages/clients/dish/src/utils/navigateToDenkmal.ts @@ -44,7 +44,7 @@ export function navigateToDenkmal(instance, objektId: string) { console.error('@polar/client-dish', error) instance.$store.dispatch('plugin/toast/addToast', { type: 'warning', - text: 'common:dish.idNotFound', + text: 'dish.idNotFound', }) }) } diff --git a/packages/clients/dish/src/utils/search.ts b/packages/clients/dish/src/utils/search.ts index c7329f608..20acadf6e 100644 --- a/packages/clients/dish/src/utils/search.ts +++ b/packages/clients/dish/src/utils/search.ts @@ -162,12 +162,12 @@ export function search( if (error.message === dishBackendSizeError) { this.dispatch('plugin/toast/addToast', { type: 'warning', - text: 'common:dish.backendSizeError', + text: 'dish.backendSizeError', }) } else { this.dispatch('plugin/toast/addToast', { type: 'error', - text: 'common:dish.unknownError', + text: 'dish.unknownError', }) } } diff --git a/packages/clients/dish/tsconfig.json b/packages/clients/dish/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/clients/dish/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/clients/generic/tsconfig.json b/packages/clients/generic/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/clients/generic/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/clients/meldemichel/src/language.ts b/packages/clients/meldemichel/src/language.ts index 1fdf249fa..8ffb2c165 100644 --- a/packages/clients/meldemichel/src/language.ts +++ b/packages/clients/meldemichel/src/language.ts @@ -46,46 +46,48 @@ const filterCategory = { title: { skat: 'Kategorien', statu: 'Status' }, } +export const meldemichelDe = { + attributions: { + stadtplan: + 'Kartografie Stadtplan: Landesbetrieb Geoinformation und Vermessung', + luftbilder: + 'Kartografie Luftbilder: Landesbetrieb Geoinformation und Vermessung', + reports: 'Meldungen durch Bürger', + }, + gfi: { + title: 'Meldung', + skat: 'Kategorie', + beschr: 'Beschreibung', + rueck: 'Rückmeldung', + start: 'Gemeldet am', + statu: 'Status', + tooltip: { + multiHeader: 'Mehrere Anliegen', + multiBody: 'Klick zum Zoomen', + multiBodyUnresolvable: 'Klick zum Öffnen', + }, + }, + layers: { + stadtplan: 'Stadtplan', + luftbilder: 'Luftbildansicht', + reports: 'Meldungen', + hamburgBorder: 'Stadtgrenze Hamburg', + }, + skat, + status, + time: { + [TIME_FILTER.NONE]: 'Keine Einschränkung', + [TIME_FILTER.DAYS_7]: 'Die letzten 7 Tage', + [TIME_FILTER.DAYS_30]: 'Die letzten 30 Tage', + [TIME_FILTER.SELECTABLE]: 'Zeitraum wählen', + }, +} as const + const language: LanguageOption[] = [ { type: 'de', resources: { - meldemichel: { - attributions: { - stadtplan: - 'Kartografie Stadtplan: Landesbetrieb Geoinformation und Vermessung', - luftbilder: - 'Kartografie Luftbilder: Landesbetrieb Geoinformation und Vermessung', - reports: 'Meldungen durch Bürger', - }, - gfi: { - title: 'Meldung', - skat: 'Kategorie', - beschr: 'Beschreibung', - rueck: 'Rückmeldung', - start: 'Gemeldet am', - statu: 'Status', - tooltip: { - multiHeader: 'Mehrere Anliegen', - multiBody: 'Klick zum Zoomen', - multiBodyUnresolvable: 'Klick zum Öffnen', - }, - }, - layers: { - stadtplan: 'Stadtplan', - luftbilder: 'Luftbildansicht', - reports: 'Meldungen', - hamburgBorder: 'Stadtgrenze Hamburg', - }, - skat, - status, - time: { - [TIME_FILTER.NONE]: 'Keine Einschränkung', - [TIME_FILTER.DAYS_7]: 'Die letzten 7 Tage', - [TIME_FILTER.DAYS_30]: 'Die letzten 30 Tage', - [TIME_FILTER.SELECTABLE]: 'Zeitraum wählen', - }, - }, + meldemichel: meldemichelDe, plugins: { filter: { layerName: { diff --git a/packages/clients/meldemichel/src/plugins/AfmButton/AfmButton.vue b/packages/clients/meldemichel/src/plugins/AfmButton/AfmButton.vue index 0465de0b4..3b0421a33 100644 --- a/packages/clients/meldemichel/src/plugins/AfmButton/AfmButton.vue +++ b/packages/clients/meldemichel/src/plugins/AfmButton/AfmButton.vue @@ -18,10 +18,10 @@ v-on="on" > fa-map-location - {{ $t('common:plugins.meldemichel.afmButton.buttonText') }} + {{ $t('plugins.meldemichel.afmButton.buttonText') }} - {{ $t('common:plugins.meldemichel.afmButton.hint') }} + {{ $t('plugins.meldemichel.afmButton.hint') }} diff --git a/packages/clients/meldemichel/src/plugins/AfmButton/language.ts b/packages/clients/meldemichel/src/plugins/AfmButton/language.ts index c1b623fab..9eab91981 100644 --- a/packages/clients/meldemichel/src/plugins/AfmButton/language.ts +++ b/packages/clients/meldemichel/src/plugins/AfmButton/language.ts @@ -1,17 +1,21 @@ import { LanguageOption } from '@polar/lib-custom-types' +export const meldemichelDe = { + afmButton: { + buttonText: 'Neues Anliegen', + missingAddress: + 'Bitte geben Sie eine Adresse ein oder wählen Sie eine Position durch Klick in die Karte.', + hint: 'Einen neuen Schaden melden', + }, +} as const + const language: LanguageOption[] = [ { type: 'de', resources: { plugins: { meldemichel: { - afmButton: { - buttonText: 'Neues Anliegen', - missingAddress: - 'Bitte geben Sie eine Adresse ein oder wählen Sie eine Position durch Klick in die Karte.', - hint: 'Einen neuen Schaden melden', - }, + ...meldemichelDe, }, }, }, diff --git a/packages/clients/meldemichel/src/plugins/Gfi/ActionButtons.vue b/packages/clients/meldemichel/src/plugins/Gfi/ActionButtons.vue index 857f65264..c23b467aa 100644 --- a/packages/clients/meldemichel/src/plugins/Gfi/ActionButtons.vue +++ b/packages/clients/meldemichel/src/plugins/Gfi/ActionButtons.vue @@ -3,7 +3,7 @@ fa-arrow-left-long @@ -11,7 +11,7 @@ fa-arrow-right-long diff --git a/packages/clients/meldemichel/src/plugins/Gfi/Feature.vue b/packages/clients/meldemichel/src/plugins/Gfi/Feature.vue index b06bcffd2..f26d7e4a7 100644 --- a/packages/clients/meldemichel/src/plugins/Gfi/Feature.vue +++ b/packages/clients/meldemichel/src/plugins/Gfi/Feature.vue @@ -6,7 +6,7 @@ fa-angles-right diff --git a/packages/clients/meldemichel/tsconfig.json b/packages/clients/meldemichel/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/clients/meldemichel/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/clients/snowbox/src/language.ts b/packages/clients/snowbox/src/language.ts index eb71670fc..8d68f3656 100644 --- a/packages/clients/snowbox/src/language.ts +++ b/packages/clients/snowbox/src/language.ts @@ -1,32 +1,34 @@ import { LanguageOption } from '@polar/lib-custom-types' +export const snowboxDe = { + attributions: { + basemap: 'Basemap © basemap.de / BKG ', + basemapGrey: 'Basemap Grau © basemap.de / BKG ', + underground: + 'Strecken U-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', + rapid: + 'Strecken S-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', + reports: 'Meldungen durch Bürger', + ausgleichsflaechen: + 'Ausgleichsflächen © Freie und Hansestadt Hamburg, Behörde für Umwelt und Energie', + hamburgBorder: 'Landesgrenze Hamburg © Freie und Hansestadt Hamburg', + }, + layers: { + basemap: 'Basemap.de (Farbe)', + basemapGrey: 'Basemap.de (Grau)', + underground: 'U-Bahn', + rapid: 'S-Bahn', + reports: 'Anliegen (MML)', + ausgleichsflaechen: 'Ausgleichsflächen', + hamburgBorder: 'Landesgrenze Hamburg', + }, +} as const + const language: LanguageOption[] = [ { type: 'de', resources: { - snowbox: { - attributions: { - basemap: 'Basemap © basemap.de / BKG ', - basemapGrey: 'Basemap Grau © basemap.de / BKG ', - underground: - 'Strecken U-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', - rapid: - 'Strecken S-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', - reports: 'Meldungen durch Bürger', - ausgleichsflaechen: - 'Ausgleichsflächen © Freie und Hansestadt Hamburg, Behörde für Umwelt und Energie', - hamburgBorder: 'Landesgrenze Hamburg © Freie und Hansestadt Hamburg', - }, - layers: { - basemap: 'Basemap.de (Farbe)', - basemapGrey: 'Basemap.de (Grau)', - underground: 'U-Bahn', - rapid: 'S-Bahn', - reports: 'Anliegen (MML)', - ausgleichsflaechen: 'Ausgleichsflächen', - hamburgBorder: 'Landesgrenze Hamburg', - }, - }, + snowbox: snowboxDe, plugins: { pins: { toast: { diff --git a/packages/clients/snowbox/tsconfig.json b/packages/clients/snowbox/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/clients/snowbox/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/clients/textLocator/src/components/ResultInfo.vue b/packages/clients/textLocator/src/components/ResultInfo.vue index ee59efd17..2ef496103 100644 --- a/packages/clients/textLocator/src/components/ResultInfo.vue +++ b/packages/clients/textLocator/src/components/ResultInfo.vue @@ -18,16 +18,16 @@ - {{ $t('common:textLocator.addressSearch.resultInfo.name') }} + {{ $t('textLocator.addressSearch.resultInfo.name') }} - {{ $t('common:textLocator.addressSearch.resultInfo.type') }} + {{ $t('textLocator.addressSearch.resultInfo.type') }} - {{ $t('common:textLocator.addressSearch.resultInfo.language') }} + {{ $t('textLocator.addressSearch.resultInfo.language') }} - {{ $t('common:textLocator.addressSearch.resultInfo.timeFrame') }} + {{ $t('textLocator.addressSearch.resultInfo.timeFrame') }} diff --git a/packages/clients/textLocator/src/language.ts b/packages/clients/textLocator/src/language.ts new file mode 100644 index 000000000..e086e096f --- /dev/null +++ b/packages/clients/textLocator/src/language.ts @@ -0,0 +1,116 @@ +import { LanguageOption } from '@polar/lib-custom-types' +import { + openStreetMap, + openSeaMap, + mdiSeaNames, + wmtsTopplusOpenWeb, + wmtsTopplusOpenWebGrey, + wmtsTopplusOpenLight, + wmtsTopplusOpenLightGrey, + aerial, +} from './services' + +export const textLocatorDe = { + layers: { + [openStreetMap]: 'OpenStreetMap', + [openSeaMap]: 'OpenSeaMap', + [mdiSeaNames]: 'Namensdienst Küste', + [wmtsTopplusOpenWeb]: 'TopPlusOpen (Web)', + [wmtsTopplusOpenWebGrey]: 'TopPlusOpen (Web, Grau)', + [wmtsTopplusOpenLight]: 'TopPlusOpen (Light)', + [wmtsTopplusOpenLightGrey]: 'TopPlusOpen (Light, Grau)', + [aerial]: 'Luftbilder Sen2Europe', + }, + addressSearch: { + resultInfo: { + name: 'Name', + type: 'Typ', + language: 'Sprache', + timeFrame: 'Zeitraum', + }, + groupTL: 'Literatur- und Ortssuche', + toponym: 'Ortssuche', + literature: 'Literatursuche', + }, + attributions: { + [openStreetMap]: `$t(textLocator.layers.${openStreetMap}): © OpenStreetMap contributors`, + [openSeaMap]: `$t(textLocator.layers.${openSeaMap}): © OpenSeaMap`, + [mdiSeaNames]: `$t(textLocator.layers.${mdiSeaNames}): © MDI DE`, + [wmtsTopplusOpenWeb]: `$t(textLocator.layers.${wmtsTopplusOpenWeb}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [wmtsTopplusOpenWebGrey]: `$t(textLocator.layers.${wmtsTopplusOpenWebGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [wmtsTopplusOpenLight]: `$t(textLocator.layers.${wmtsTopplusOpenLight}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [wmtsTopplusOpenLightGrey]: `$t(textLocator.layers.${wmtsTopplusOpenLightGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [aerial]: `$t(textLocator.layers.${aerial}): © Europäische Union, enthält veränderte Copernicus Sentinel-Daten ({{YEAR}})`, + kuestengazetteer: + '
Zur Ortssuche wird der Küstengazetteer eingesetzt.', + static: + 'Impressum', + }, + info: { + noLiteratureFound: 'Es wurden keine Texte zu diesen Orten gefunden.', + noGeometriesFound: 'Es wurden keine Orte zu dieser Geometrie gefunden.', + loadingTime: + 'Es gibt viele Ergebnisse zu der letzten Anfrage. Der Ladevorgang kann einen Moment länger dauern.', + }, + error: { + search: + 'Die Suche ist mit einem unbekannten Fehler fehlgeschlagen. Bitte versuchen Sie es später erneut.', + }, +} as const + +const locales: LanguageOption[] = [ + { + type: 'de', + resources: { + textLocator: textLocatorDe, + }, + }, + // NOTE: English translation not yet required and may be incomplete + { + type: 'en', + resources: { + textLocator: { + layers: { + [openStreetMap]: 'OpenStreetMap', + [openSeaMap]: 'OpenSeaMap', + [mdiSeaNames]: 'Coastal name service', + [wmtsTopplusOpenWeb]: 'TopPlusOpen (Web)', + [wmtsTopplusOpenWebGrey]: 'TopPlusOpen (Web, Grey)', + [wmtsTopplusOpenLight]: 'TopPlusOpen (Light)', + [wmtsTopplusOpenLightGrey]: 'TopPlusOpen (Light, Grey)', + [aerial]: 'Aerial photographs Sen2Europe', + }, + addressSearch: { + unnamed: 'Unnamed', + }, + attributions: { + [openStreetMap]: `$t(textLocator.layers.${openStreetMap}): © OpenStreetMap contributors`, + [openSeaMap]: `$t(textLocator.layers.${openSeaMap}): © OpenSeaMap`, + [mdiSeaNames]: `$t(textLocator.layers.${mdiSeaNames}): © MDI DE`, + [wmtsTopplusOpenWeb]: `$t(textLocator.layers.${wmtsTopplusOpenWeb}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [wmtsTopplusOpenWebGrey]: `$t(textLocator.layers.${wmtsTopplusOpenWebGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [wmtsTopplusOpenLight]: `$t(textLocator.layers.${wmtsTopplusOpenLight}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [wmtsTopplusOpenLightGrey]: `$t(textLocator.layers.${wmtsTopplusOpenLightGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, + [aerial]: `$t(textLocator.layers.${aerial}): © European Union, contains modified Copernicus Sentinel data ({{YEAR}})`, + static: + '
Legal notice (Impressum)', + }, + info: { + noLiteratureFound: 'No texts were found regarding these places.', + noGeometriesFound: 'No places were found regarding this geometry.', + }, + error: { + searchCoastalGazetteer: + 'The search failed with an unknown error. Please try again later.', + }, + }, + plugins: { + addressSearch: { + defaultGroup: 'Location search', + }, + }, + }, + }, +] + +export default locales diff --git a/packages/clients/textLocator/src/locales.ts b/packages/clients/textLocator/src/locales.ts deleted file mode 100644 index ae13f0124..000000000 --- a/packages/clients/textLocator/src/locales.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { LanguageOption } from '@polar/lib-custom-types' -import { - openStreetMap, - openSeaMap, - mdiSeaNames, - wmtsTopplusOpenWeb, - wmtsTopplusOpenWebGrey, - wmtsTopplusOpenLight, - wmtsTopplusOpenLightGrey, - aerial, -} from './services' - -const locales: LanguageOption[] = [ - { - type: 'de', - resources: { - textLocator: { - layers: { - [openStreetMap]: 'OpenStreetMap', - [openSeaMap]: 'OpenSeaMap', - [mdiSeaNames]: 'Namensdienst Küste', - [wmtsTopplusOpenWeb]: 'TopPlusOpen (Web)', - [wmtsTopplusOpenWebGrey]: 'TopPlusOpen (Web, Grau)', - [wmtsTopplusOpenLight]: 'TopPlusOpen (Light)', - [wmtsTopplusOpenLightGrey]: 'TopPlusOpen (Light, Grau)', - [aerial]: 'Luftbilder Sen2Europe', - }, - addressSearch: { - resultInfo: { - name: 'Name', - type: 'Typ', - language: 'Sprache', - timeFrame: 'Zeitraum', - }, - groupTL: 'Literatur- und Ortssuche', - toponym: 'Ortssuche', - literature: 'Literatursuche', - }, - attributions: { - [openStreetMap]: `$t(textLocator.layers.${openStreetMap}): © OpenStreetMap contributors`, - [openSeaMap]: `$t(textLocator.layers.${openSeaMap}): © OpenSeaMap`, - [mdiSeaNames]: `$t(textLocator.layers.${mdiSeaNames}): © MDI DE`, - [wmtsTopplusOpenWeb]: `$t(textLocator.layers.${wmtsTopplusOpenWeb}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [wmtsTopplusOpenWebGrey]: `$t(textLocator.layers.${wmtsTopplusOpenWebGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [wmtsTopplusOpenLight]: `$t(textLocator.layers.${wmtsTopplusOpenLight}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [wmtsTopplusOpenLightGrey]: `$t(textLocator.layers.${wmtsTopplusOpenLightGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [aerial]: `$t(textLocator.layers.${aerial}): © Europäische Union, enthält veränderte Copernicus Sentinel-Daten ({{YEAR}})`, - kuestengazetteer: - '
Zur Ortssuche wird der Küstengazetteer eingesetzt.', - static: - 'Impressum', - }, - info: { - noLiteratureFound: 'Es wurden keine Texte zu diesen Orten gefunden.', - noGeometriesFound: - 'Es wurden keine Orte zu dieser Geometrie gefunden.', - loadingTime: - 'Es gibt viele Ergebnisse zu der letzten Anfrage. Der Ladevorgang kann einen Moment länger dauern.', - }, - error: { - search: - 'Die Suche ist mit einem unbekannten Fehler fehlgeschlagen. Bitte versuchen Sie es später erneut.', - }, - }, - }, - }, - // NOTE: English translation not yet required and may be incomplete - { - type: 'en', - resources: { - textLocator: { - layers: { - [openStreetMap]: 'OpenStreetMap', - [openSeaMap]: 'OpenSeaMap', - [mdiSeaNames]: 'Coastal name service', - [wmtsTopplusOpenWeb]: 'TopPlusOpen (Web)', - [wmtsTopplusOpenWebGrey]: 'TopPlusOpen (Web, Grey)', - [wmtsTopplusOpenLight]: 'TopPlusOpen (Light)', - [wmtsTopplusOpenLightGrey]: 'TopPlusOpen (Light, Grey)', - [aerial]: 'Aerial photographs Sen2Europe', - }, - addressSearch: { - unnamed: 'Unnamed', - }, - attributions: { - [openStreetMap]: `$t(textLocator.layers.${openStreetMap}): © OpenStreetMap contributors`, - [openSeaMap]: `$t(textLocator.layers.${openSeaMap}): © OpenSeaMap`, - [mdiSeaNames]: `$t(textLocator.layers.${mdiSeaNames}): © MDI DE`, - [wmtsTopplusOpenWeb]: `$t(textLocator.layers.${wmtsTopplusOpenWeb}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [wmtsTopplusOpenWebGrey]: `$t(textLocator.layers.${wmtsTopplusOpenWebGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [wmtsTopplusOpenLight]: `$t(textLocator.layers.${wmtsTopplusOpenLight}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [wmtsTopplusOpenLightGrey]: `$t(textLocator.layers.${wmtsTopplusOpenLightGrey}): © Bundesamt für Kartographie und Geodäsie {{YEAR}}`, - [aerial]: `$t(textLocator.layers.${aerial}): © European Union, contains modified Copernicus Sentinel data ({{YEAR}})`, - static: - '
Legal notice (Impressum)', - }, - info: { - noLiteratureFound: 'No texts were found regarding these places.', - noGeometriesFound: 'No places were found regarding this geometry.', - }, - error: { - searchCoastalGazetteer: - 'The search failed with an unknown error. Please try again later.', - }, - }, - plugins: { - addressSearch: { - defaultGroup: 'Location search', - }, - }, - }, - }, -] - -export default locales diff --git a/packages/clients/textLocator/src/mapConfig.ts b/packages/clients/textLocator/src/mapConfig.ts index fa8ca3c30..ab54b5ba4 100644 --- a/packages/clients/textLocator/src/mapConfig.ts +++ b/packages/clients/textLocator/src/mapConfig.ts @@ -1,5 +1,5 @@ import { MapConfig } from '@polar/lib-custom-types' -import locales from './locales' +import locales from './language' import { openStreetMap, openSeaMap, diff --git a/packages/clients/textLocator/src/plugins/GeometrySearch/components/DrawMode.vue b/packages/clients/textLocator/src/plugins/GeometrySearch/components/DrawMode.vue index ac25ccd55..1a9ffebb4 100644 --- a/packages/clients/textLocator/src/plugins/GeometrySearch/components/DrawMode.vue +++ b/packages/clients/textLocator/src/plugins/GeometrySearch/components/DrawMode.vue @@ -1,16 +1,16 @@ diff --git a/packages/clients/textLocator/src/plugins/GeometrySearch/language.ts b/packages/clients/textLocator/src/plugins/GeometrySearch/language.ts index f05e8c159..f765f02d3 100644 --- a/packages/clients/textLocator/src/plugins/GeometrySearch/language.ts +++ b/packages/clients/textLocator/src/plugins/GeometrySearch/language.ts @@ -2,6 +2,49 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { LanguageOption } from '@polar/lib-custom-types' +export const geometrySearchDe = { + draw: { + title: 'Zeichenmodus', + description: { + Point: + 'Klicken Sie in die Karte, um Ortsnamen und Literatur zu einer Punktkoordinate abzufragen. $t(plugins.geometrySearch.draw.description.Common)', + Polygon: + 'Klicken Sie wiederholt in die Karte, um eine Fläche zu zeichnen, zu der Ortsnamen und Literatur abgefragt werden. Doppelklick beendet eine Zeichnung. $t(plugins.geometrySearch.draw.description.Common)', + Common: 'Neue Zeichnungen verwerfen vorangehende Ergebnisse.', + }, + }, + tooltip: { + title: 'Orte', + highlight: { + cold: 'Auf Fund zoomen', + heat: 'Auf Funde zoomen und nach Relevanz färben', + }, + focusSearch: 'Neue Suche nach allen Geometrien zu dieser Geometrie', + textSearch: 'Suche nach allen Geometrien zu diesem Text', + badge: { + textToToponym: + 'Anzahl der Ortsnennungen zu den aktuell angezeigten Geometrien in diesem Text', + toponymInText: 'Anzahl der Funde dieses Ortes im aktuell geöffneten Text', + toponymToText: + 'Anzahl der Ortsnennungen dieses Ortes über alle aktuell betrachteten Texte', + textInToponym: + 'Anzahl der Funde des aktuellen geöffneten Ortes in diesem Text', + }, + }, + results: { + title: 'Funde', + source: 'aus der {{ searchType }}', + sourceOptions: { + geometrySearch: 'Geometriesuche', + literatureSearch: 'Literatursuche', + toponymSearch: 'Ortssuche', + }, + byLocation: 'Ort', + byText: 'Text', + none: 'Keine Suchergebnisse', + }, +} as const + const language: LanguageOption[] = [ { type: 'de', @@ -13,47 +56,7 @@ const language: LanguageOption[] = [ }, }, geometrySearch: { - draw: { - title: 'Zeichenmodus', - description: { - Point: - 'Klicken Sie in die Karte, um Ortsnamen und Literatur zu einer Punktkoordinate abzufragen. $t(plugins.geometrySearch.draw.description.Common)', - Polygon: - 'Klicken Sie wiederholt in die Karte, um eine Fläche zu zeichnen, zu der Ortsnamen und Literatur abgefragt werden. Doppelklick beendet eine Zeichnung. $t(plugins.geometrySearch.draw.description.Common)', - Common: 'Neue Zeichnungen verwerfen vorangehende Ergebnisse.', - }, - }, - tooltip: { - title: 'Orte', - highlight: { - cold: 'Auf Fund zoomen', - heat: 'Auf Funde zoomen und nach Relevanz färben', - }, - focusSearch: 'Neue Suche nach allen Geometrien zu dieser Geometrie', - textSearch: 'Suche nach allen Geometrien zu diesem Text', - badge: { - textToToponym: - 'Anzahl der Ortsnennungen zu den aktuell angezeigten Geometrien in diesem Text', - toponymInText: - 'Anzahl der Funde dieses Ortes im aktuell geöffneten Text', - toponymToText: - 'Anzahl der Ortsnennungen dieses Ortes über alle aktuell betrachteten Texte', - textInToponym: - 'Anzahl der Funde des aktuellen geöffneten Ortes in diesem Text', - }, - }, - results: { - title: 'Funde', - source: 'aus der {{ searchType }}', - sourceOptions: { - geometrySearch: 'Geometriesuche', - literatureSearch: 'Literatursuche', - toponymSearch: 'Ortssuche', - }, - byLocation: 'Ort', - byText: 'Text', - none: 'Keine Suchergebnisse', - }, + ...geometrySearchDe, }, }, }, diff --git a/packages/clients/textLocator/src/plugins/Header/Header.vue b/packages/clients/textLocator/src/plugins/Header/Header.vue index dc4c5eee1..0bd1fa8e5 100644 --- a/packages/clients/textLocator/src/plugins/Header/Header.vue +++ b/packages/clients/textLocator/src/plugins/Header/Header.vue @@ -1,6 +1,6 @@ @@ -17,7 +17,7 @@ ref="polar-map-container" class="polar-map" tabindex="0" - :aria-label="$t('common:canvas.label')" + :aria-label="$t('canvas.label')" > + // @ts-expect-error | can't control key configuration `<${element}>${i18next.t(localeKey)}` ) .join('')) diff --git a/packages/lib/tooltip/tsconfig.json b/packages/lib/tooltip/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/lib/tooltip/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/plugins/AddressSearch/src/components/GroupSelect.vue b/packages/plugins/AddressSearch/src/components/GroupSelect.vue index 344b73164..71030cf86 100644 --- a/packages/plugins/AddressSearch/src/components/GroupSelect.vue +++ b/packages/plugins/AddressSearch/src/components/GroupSelect.vue @@ -4,7 +4,7 @@ v-model="selectedItem" dense class="polar-plugin-address-search-group-select" - :aria-label="$t('common:plugins.addressSearch.groupSelector')" + :aria-label="$t('plugins.addressSearch.groupSelector')" :items=" // mapping in template to guarantee update on language change groupSelectOptions.map(({ value, text }) => ({ value, text: $t(text) })) diff --git a/packages/plugins/AddressSearch/src/components/Results.vue b/packages/plugins/AddressSearch/src/components/Results.vue index 98efc708f..a62ee5dc6 100644 --- a/packages/plugins/AddressSearch/src/components/Results.vue +++ b/packages/plugins/AddressSearch/src/components/Results.vue @@ -24,7 +24,7 @@ > {{ $t(category) }} {{ - $t('common:plugins.addressSearch.resultCount', { + $t('plugins.addressSearch.resultCount', { count: features.length, }) }} @@ -86,7 +86,7 @@ {{ $t( - `common:plugins.addressSearch.resultList.${ + `plugins.addressSearch.resultList.${ areResultsExpanded(category) ? 'reduce' : `extend${hasMaximum(selectedGroup[index]) ? 'Max' : ''}` diff --git a/packages/plugins/AddressSearch/src/language.ts b/packages/plugins/AddressSearch/src/language.ts index 98e03a1e2..b6c9edb58 100644 --- a/packages/plugins/AddressSearch/src/language.ts +++ b/packages/plugins/AddressSearch/src/language.ts @@ -1,54 +1,57 @@ import { LanguageOption } from '@polar/lib-custom-types' +export const resourcesDe = { + plugins: { + addressSearch: { + hint: { + error: 'Etwas ist bei der Suche schiefgegangen.', + noResults: 'Keine Ergebnisse gefunden.', + loading: 'Suche ...', + tooShort: + 'Für die Suche bitte mindestens {{minLength}} Zeichen eingeben.', + }, + defaultGroup: 'Adresssuche', + groupSelector: 'Suchthema auswählen', + resultCount: '({{count}} Ergebnisse)', + resultList: { + extend: 'Alle Ergebnisse anzeigen', + extendMax: + 'Alle Ergebnisse (max. {{queryParameters.maxFeatures}}) anzeigen', + reduce: 'Ergebnisliste reduzieren', + }, + }, + }, +} as const + +export const resourcesEn = { + plugins: { + addressSearch: { + hint: { + error: 'Something went wrong.', + noResults: 'No results for the current query.', + loading: 'Searching ...', + tooShort: 'Please enter at least {{minLength}} characters.', + }, + defaultGroup: 'Address Search', + groupSelector: 'Select search topic', + resultCount: '({{count}} results)', + resultList: { + extend: 'Show all results', + extendMax: 'Show all results (max. {{queryParameters.maxFeatures}})', + reduce: 'Reduce result list', + }, + }, + }, +} as const + const language: LanguageOption[] = [ { type: 'de', - resources: { - plugins: { - addressSearch: { - hint: { - error: 'Etwas ist bei der Suche schiefgegangen.', - noResults: 'Keine Ergebnisse gefunden.', - loading: 'Suche ...', - tooShort: - 'Für die Suche bitte mindestens {{minLength}} Zeichen eingeben.', - }, - defaultGroup: 'Adresssuche', - groupSelector: 'Suchthema auswählen', - resultCount: '({{count}} Ergebnisse)', - resultList: { - extend: 'Alle Ergebnisse anzeigen', - extendMax: - 'Alle Ergebnisse (max. {{queryParameters.maxFeatures}}) anzeigen', - reduce: 'Ergebnisliste reduzieren', - }, - }, - }, - }, + resources: resourcesDe, }, { type: 'en', - resources: { - plugins: { - addressSearch: { - hint: { - error: 'Something went wrong.', - noResults: 'No results for the current query.', - loading: 'Searching ...', - tooShort: 'Please enter at least {{minLength}} characters.', - }, - defaultGroup: 'Address Search', - groupSelector: 'Select search topic', - resultCount: '({{count}} results)', - resultList: { - extend: 'Show all results', - extendMax: - 'Show all results (max. {{queryParameters.maxFeatures}})', - reduce: 'Reduce result list', - }, - }, - }, - }, + resources: resourcesEn, }, ] diff --git a/packages/plugins/AddressSearch/src/store/getters.ts b/packages/plugins/AddressSearch/src/store/getters.ts index d13e7fb71..9b41f7a5f 100644 --- a/packages/plugins/AddressSearch/src/store/getters.ts +++ b/packages/plugins/AddressSearch/src/store/getters.ts @@ -14,7 +14,7 @@ import { import { getInitialState } from './state' const defaultGroupProperties: AddressSearchGroupProperties = { - label: 'common:plugins.addressSearch.defaultGroup', + label: 'plugins.addressSearch.defaultGroup', placeholder: '', hint: '', resultDisplayMode: 'mixed', @@ -159,19 +159,19 @@ const getters: PolarGetterTree = { { selectedGroupHint, minLength, featuresAvailable, loading } ) { if (loading) { - return 'common:plugins.addressSearch.hint.loading' + return 'plugins.addressSearch.hint.loading' } if (searchResults === SearchResults.ERROR) { - return 'common:plugins.addressSearch.hint.error' + return 'plugins.addressSearch.hint.error' } if (inputValue && inputValue.length > 0 && inputValue.length < minLength) { - return 'common:plugins.addressSearch.hint.tooShort' + return 'plugins.addressSearch.hint.tooShort' } if (searchResults !== SearchResults.NO_SEARCH && !featuresAvailable) { - return 'common:plugins.addressSearch.hint.noResults' + return 'plugins.addressSearch.hint.noResults' } return selectedGroupHint diff --git a/packages/plugins/AddressSearch/tsconfig.json b/packages/plugins/AddressSearch/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/plugins/AddressSearch/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/plugins/Attributions/src/components/AttributionButton.vue b/packages/plugins/Attributions/src/components/AttributionButton.vue index 9c4cce0ff..1bd1b3bfb 100644 --- a/packages/plugins/Attributions/src/components/AttributionButton.vue +++ b/packages/plugins/Attributions/src/components/AttributionButton.vue @@ -5,11 +5,7 @@ fab color="secondary" :title=" - $t( - `common:plugins.attributions.button.${ - windowIsOpen ? 'close' : 'open' - }Title` - ) + $t(`plugins.attributions.button.${windowIsOpen ? 'close' : 'open'}Title`) " @click="toggleMapInfo" > diff --git a/packages/plugins/Attributions/src/components/AttributionContent.vue b/packages/plugins/Attributions/src/components/AttributionContent.vue index e57bcc555..97269027a 100644 --- a/packages/plugins/Attributions/src/components/AttributionContent.vue +++ b/packages/plugins/Attributions/src/components/AttributionContent.vue @@ -9,7 +9,7 @@ :max-width="maxWidth" > - {{ $t('common:plugins.attributions.title') }} + {{ $t('plugins.attributions.title') }} { 'setMoveHandle', { closeLabel: t('plugins.iconMenu.mobileCloseButton', { - plugin: hint || `common:plugins.iconMenu.hints.${id}`, + plugin: hint || `plugins.iconMenu.hints.${id}`, }), closeFunction: () => commit('setOpen', null), component: plugin, diff --git a/packages/plugins/IconMenu/tsconfig.json b/packages/plugins/IconMenu/tsconfig.json deleted file mode 100644 index 618c6c3e9..000000000 --- a/packages/plugins/IconMenu/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} diff --git a/packages/plugins/LayerChooser/src/components/LayerWrapper.vue b/packages/plugins/LayerChooser/src/components/LayerWrapper.vue index e5cb7c5db..eb5159437 100644 --- a/packages/plugins/LayerChooser/src/components/LayerWrapper.vue +++ b/packages/plugins/LayerChooser/src/components/LayerWrapper.vue @@ -9,7 +9,7 @@ - {{ $t('common:plugins.layerChooser.tooltipDisabledLayer') }} + {{ $t('plugins.layerChooser.tooltipDisabledLayer') }} diff --git a/packages/plugins/LayerChooser/src/components/Options.vue b/packages/plugins/LayerChooser/src/components/Options.vue index 39a485098..732ec3259 100644 --- a/packages/plugins/LayerChooser/src/components/Options.vue +++ b/packages/plugins/LayerChooser/src/components/Options.vue @@ -4,20 +4,20 @@ fa-chevron-left {{ - $t('common:plugins.layerChooser.optionsHeader', openedOptionsService) + $t('plugins.layerChooser.optionsHeader', openedOptionsService) }}