diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d5d9fde5..60722a38 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -27,7 +27,6 @@ module.exports = { "import/no-extraneous-dependencies": ["error"], "@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }], "import/no-named-as-default": ["warn"], - "import/no-named-as-default-member": ["warn"], "import/no-duplicates": ["warn"], "import/namespace": ["error"], "import/default": ["error"], diff --git a/frontend/package.json b/frontend/package.json index 04125093..b86ff2e8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -52,6 +52,7 @@ "facilmap-utils": "workspace:^", "file-saver": "^2.0.5", "hammerjs": "^2.0.8", + "i18next": "^23.10.1", "jquery": "^3.7.1", "leaflet": "^1.9.4", "leaflet-draggable-lines": "^2.0.0", diff --git a/frontend/src/i18n/de.ts b/frontend/src/i18n/de.ts new file mode 100644 index 00000000..14ff6b38 --- /dev/null +++ b/frontend/src/i18n/de.ts @@ -0,0 +1,32 @@ +const messagesDe = { + "about-dialog": { + "header": `Über FacilMap {{version}}`, + "license-text": `{{facilmap}} is unter der {{license}} verfügbar.`, + "license-text-facilmap": `FacilMap`, + "license-text-license": `GNU Affero General Public License, Version 3`, + "issues-text": `Bitte melden Sie Fehler und Verbesserungsvorschläge auf {{tracker}}.`, + "issues-text-tracker": `GitHub`, + "help-text": `Wenn Sie Fragen haben, schauen Sie sich die {{documentation}} an, schreiben Sie ins {{discussions}} oder fragen im {{chat}}.`, + "help-text-documentation": `Dokumentation`, + "help-text-discussions": `Forum`, + "help-text-chat": `Matrix-Chat`, + "privacy-information": `Informationen zum Datenschutz`, + "map-data": `Kartendaten`, + "map-data-search": `Suche`, + "map-data-pois": `POIs`, + "map-data-directions": `Routenberechnung`, + "map-data-geoip": `GeoIP`, + "map-data-geoip-description": `Dieses Produkt enthält GeoLine2-Daten von Maxmind, verfügbar unter {{maxmind}}.`, + "attribution-osm-contributors": `OSM-Mitwirkende`, + "programs-libraries": `Programme/Bibliotheken`, + "icons": `Symbole` + }, + + "modal-dialog": { + "close": "Schließen", + "cancel": "Abbrechen", + "save": "Speichern" + } +}; + +export default messagesDe; \ No newline at end of file diff --git a/frontend/src/i18n/en.ts b/frontend/src/i18n/en.ts new file mode 100644 index 00000000..27754212 --- /dev/null +++ b/frontend/src/i18n/en.ts @@ -0,0 +1,32 @@ +const messagesEn = { + "about-dialog": { + "header": `About FacilMap {{version}}`, + "license-text": `{{facilmap}} is available under the {{license}}.`, + "license-text-facilmap": `FacilMap`, + "license-text-license": `GNU Affero General Public License, Version 3`, + "issues-text": `If something does not work or you have a suggestion for improvement, please report on the {{tracker}}.`, + "issues-text-tracker": `issue tracker`, + "help-text": `If you have a question, please have a look at the {{documentation}}, raise a question in the {{discussions}} or ask in the {{chat}}.`, + "help-text-documentation": `documentation`, + "help-text-discussions": `discussion forum`, + "help-text-chat": `Matrix chat`, + "privacy-information": `Privacy information`, + "map-data": `Map data`, + "map-data-search": `Search`, + "map-data-pois": `POIs`, + "map-data-directions": `Directions`, + "map-data-geoip": `GeoIP`, + "map-data-geoip-description": `This product includes GeoLite2 data created by MaxMind, available from {{maxmind}}.`, + "attribution-osm-contributors": `OSM Contributors`, + "programs-libraries": `Programs/libraries`, + "icons": `Icons` + }, + + "modal-dialog": { + "close": "Close", + "cancel": "Cancel", + "save": "Save" + } +}; + +export default messagesEn; \ No newline at end of file diff --git a/frontend/src/lib/components/about-dialog.vue b/frontend/src/lib/components/about-dialog.vue index 119a0ebf..c96cb9b7 100644 --- a/frontend/src/lib/components/about-dialog.vue +++ b/frontend/src/lib/components/about-dialog.vue @@ -4,6 +4,9 @@ import { computed } from "vue"; import ModalDialog from "./ui/modal-dialog.vue"; import { injectContextRequired, requireMapContext } from "./facil-map-context-provider/facil-map-context-provider.vue"; + import { T, useI18n } from "../utils/i18n"; + + const { t } = useI18n(); const context = injectContextRequired(); const mapContext = requireMapContext(context); @@ -18,21 +21,49 @@ }); const fmVersion = __FM_VERSION__; -