From 1db134f59e370858ea29cbb7229d3a12c97e1e42 Mon Sep 17 00:00:00 2001 From: david zynda Date: Wed, 29 Nov 2023 10:48:47 +0100 Subject: [PATCH 01/10] i18n and l10n service --- package-lock.json | 103 +++++++++++++++++- package.json | 1 + .../styles/components/general/header.scss | 17 ++- src/components/general/Header.vue | 25 ++++- src/main.js | 14 +++ src/translations/de.json | 3 + src/translations/en.json | 3 + src/views/SearchView.vue | 10 +- 8 files changed, 152 insertions(+), 24 deletions(-) create mode 100644 src/translations/de.json create mode 100644 src/translations/en.json diff --git a/package-lock.json b/package-lock.json index feb75ea98..048af584b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "vite": ">=4.1.5", "vite-plugin-vuetify": "^1.0.2", "vue": "^3.2.47", + "vue-i18n": "^9.4.1", "vue-router": "^4.0.13", "vue3-qrcode-reader": "^0.0.1", "vuetify": "^3.1.4", @@ -482,6 +483,47 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@intlify/core-base": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.4.1.tgz", + "integrity": "sha512-WIwx+elsZbxSMxRG5+LC+utRohFvmZMoDevfKOfnYMLbpCjCSavqTfHJAtfsY6ruowzqXeKkeLhRHbYbjoJx5g==", + "dependencies": { + "@intlify/message-compiler": "9.4.1", + "@intlify/shared": "9.4.1" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.4.1.tgz", + "integrity": "sha512-aN2N+dUx320108QhH51Ycd2LEpZ+NKbzyQ2kjjhqMcxhHdxtOnkgdx+MDBhOy/CObwBmhC3Nygzc6hNlfKvPNw==", + "dependencies": { + "@intlify/shared": "9.4.1", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.4.1.tgz", + "integrity": "sha512-A51elBmZWf1FS80inf/32diO9DeXoqg9GR9aUDHFcfHoNDuT46Q+fpPOdj8jiJnSHSBh8E1E+6qWRhAZXdK3Ng==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, "node_modules/@mdi/font": { "version": "5.9.55", "license": "Apache-2.0" @@ -663,8 +705,9 @@ } }, "node_modules/@vue/devtools-api": { - "version": "6.0.12", - "license": "MIT" + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.1.tgz", + "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==" }, "node_modules/@vue/reactivity": { "version": "3.2.47", @@ -3301,6 +3344,25 @@ "node": ">=4.0" } }, + "node_modules/vue-i18n": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.4.1.tgz", + "integrity": "sha512-vnQyYE9LBuNOqPpETIcCaGnAyLEqfeIvDcyZ9T+WBCWFTqWw1J8FuF1jfeDwpHBi5JKgAwgXyq1mt8jp/x/GPA==", + "dependencies": { + "@intlify/core-base": "9.4.1", + "@intlify/shared": "9.4.1", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-router": { "version": "4.0.13", "license": "MIT", @@ -3770,6 +3832,29 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@intlify/core-base": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.4.1.tgz", + "integrity": "sha512-WIwx+elsZbxSMxRG5+LC+utRohFvmZMoDevfKOfnYMLbpCjCSavqTfHJAtfsY6ruowzqXeKkeLhRHbYbjoJx5g==", + "requires": { + "@intlify/message-compiler": "9.4.1", + "@intlify/shared": "9.4.1" + } + }, + "@intlify/message-compiler": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.4.1.tgz", + "integrity": "sha512-aN2N+dUx320108QhH51Ycd2LEpZ+NKbzyQ2kjjhqMcxhHdxtOnkgdx+MDBhOy/CObwBmhC3Nygzc6hNlfKvPNw==", + "requires": { + "@intlify/shared": "9.4.1", + "source-map-js": "^1.0.2" + } + }, + "@intlify/shared": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.4.1.tgz", + "integrity": "sha512-A51elBmZWf1FS80inf/32diO9DeXoqg9GR9aUDHFcfHoNDuT46Q+fpPOdj8jiJnSHSBh8E1E+6qWRhAZXdK3Ng==" + }, "@mdi/font": { "version": "5.9.55" }, @@ -3928,7 +4013,9 @@ } }, "@vue/devtools-api": { - "version": "6.0.12" + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.1.tgz", + "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==" }, "@vue/reactivity": { "version": "3.2.47", @@ -5778,6 +5865,16 @@ } } }, + "vue-i18n": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.4.1.tgz", + "integrity": "sha512-vnQyYE9LBuNOqPpETIcCaGnAyLEqfeIvDcyZ9T+WBCWFTqWw1J8FuF1jfeDwpHBi5JKgAwgXyq1mt8jp/x/GPA==", + "requires": { + "@intlify/core-base": "9.4.1", + "@intlify/shared": "9.4.1", + "@vue/devtools-api": "^6.5.0" + } + }, "vue-router": { "version": "4.0.13", "requires": { diff --git a/package.json b/package.json index 1ec81c1ca..e9a9643df 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "vite": ">=4.1.5", "vite-plugin-vuetify": "^1.0.2", "vue": "^3.2.47", + "vue-i18n": "^9.4.1", "vue-router": "^4.0.13", "vue3-qrcode-reader": "^0.0.1", "vuetify": "^3.1.4", diff --git a/src/assets/styles/components/general/header.scss b/src/assets/styles/components/general/header.scss index f9b677538..60ef26f67 100644 --- a/src/assets/styles/components/general/header.scss +++ b/src/assets/styles/components/general/header.scss @@ -19,12 +19,11 @@ * * SPDX-License-Identifier: Apache-2.0 */ - @media (max-width: 585px) { - .header-container{ - padding: 0px 14px 0 0px!important; +@media (max-width: 585px) { + .header-container { + padding: 0px 14px 0 0px !important; } - } - +} .header-container { position: fixed; @@ -110,19 +109,17 @@ line-height: 1.42857; .language { color: $catena-x-blue; - cursor: pointer; + margin: 0px 16px 0px 0px; + font-weight: 500; } .active { - font-weight: 500; color: black; border-bottom: 2px solid; } .inactive { color: rgb(15 113 203 / 50%); - font-weight: 500; - cursor: not-allowed; - margin: 0px 16px 0px 0px; + cursor: pointer; line-height: 1.42857; } } diff --git a/src/components/general/Header.vue b/src/components/general/Header.vue index 8dbab42e7..0bd43ca09 100644 --- a/src/components/general/Header.vue +++ b/src/components/general/Header.vue @@ -87,8 +87,24 @@ Sign Out
- DE - EN + DE + EN
@@ -124,6 +140,7 @@ export default { }, data() { return { + activeLanguage: this.$i18n.locale, profileHover: false, hamburgerMenu: false, profileMenu: false, @@ -142,6 +159,10 @@ export default { } }, methods: { + setLanguage(lang) { + this.activeLanguage = lang; + this.$i18n.locale = lang; + }, logout() { this.auth.logout(); }, diff --git a/src/main.js b/src/main.js index a7dbfde51..8d7ac6d52 100644 --- a/src/main.js +++ b/src/main.js @@ -28,6 +28,19 @@ import { loadFonts } from './assets/plugins/webfontloader'; import router from './router'; import '@/assets/styles/main.scss'; import authentication from '@/services/Authentication'; +import { createI18n } from 'vue-i18n'; +// Import translation files +import en from '@/translations/en.json'; +import de from '@/translations/de.json'; + +const i18n = createI18n({ + locale: 'en', + fallbackLocale: 'en', + messages: { + en, + de + } +}); loadFonts(); @@ -35,6 +48,7 @@ const app = createApp(App); app.use(vuetify); app.use(store); app.use(router); +app.use(i18n); let auth = new authentication(); app.provide('authentication', auth); diff --git a/src/translations/de.json b/src/translations/de.json new file mode 100644 index 000000000..f87079a98 --- /dev/null +++ b/src/translations/de.json @@ -0,0 +1,3 @@ +{ + "welcomeMessage": "Der Begriff \"Batteriepass\" bezieht sich auf ein digitales Dokument, das wesentliche Informationen über eine Batterie enthält, insbesondere im Zusammenhang mit Elektrofahrzeugen (EVs). Dieses Dokument enthält Details zum Hersteller der Batterie, Spezifikationen und Leistungsmerkmale , Gesundheitszustand und Lebenszyklusdaten. Der Zweck eines Batteriepasses besteht darin, die ordnungsgemäße Wartung, Instandhaltung und das Recycling der Batterie zu erleichtern und gleichzeitig Rückverfolgbarkeit und Compliance zu ermöglichen." +} \ No newline at end of file diff --git a/src/translations/en.json b/src/translations/en.json new file mode 100644 index 000000000..31e371bb1 --- /dev/null +++ b/src/translations/en.json @@ -0,0 +1,3 @@ +{ + "welcomeMessage": "The term \"Battery Passport\" refers to a digital document that contains essential information about a battery, specifically in the context of electric vehicles (EVs). This document includes details about the battery's manufacturer, specifications, performance characteristics, health status, and lifecycle data. The purpose of a Battery Passport is to facilitate proper maintenance, servicing, and recycling of the battery, while also enabling traceability and compliance." +} \ No newline at end of file diff --git a/src/views/SearchView.vue b/src/views/SearchView.vue index 3f204082a..3a0d17484 100644 --- a/src/views/SearchView.vue +++ b/src/views/SearchView.vue @@ -26,15 +26,7 @@

Catena-X Battery Passport

-

- The term "Battery Passport" refers to a digital document that contains - essential information about a battery, specifically in the context of - electric vehicles (EVs). This document includes details about the - battery's manufacturer, specifications, performance characteristics, - health status, and lifecycle data. The purpose of a Battery Passport - is to facilitate proper maintenance, servicing, and recycling of the - battery, while also enabling traceability and compliance. -

+

{{ $t("welcomeMessage") }}

Battery scanning From fc2db3d447a3ac6d4b58a94041b7469034c10811 Mon Sep 17 00:00:00 2001 From: david zynda Date: Thu, 7 Dec 2023 09:48:25 +0100 Subject: [PATCH 02/10] translation structure --- src/components/general/Dialog.vue | 4 +- src/components/general/ErrorComponent.vue | 264 ++++--- src/components/general/Footer.vue | 71 +- src/components/general/Header.vue | 9 +- src/components/general/LoadingComponent.vue | 64 +- src/components/general/RecursiveTree.vue | 2 +- src/components/general/SearchInput.vue | 4 +- src/components/general/TabsComponent.vue | 2 +- src/components/passport/BarChart.vue | 4 +- src/components/passport/BatteryCards.vue | 77 +- src/components/passport/Field.vue | 9 +- src/components/passport/GeneralCards.vue | 52 +- src/components/passport/PassportHeader.vue | 2 +- src/components/passport/Section.vue | 254 +++---- .../passport/sections/BatteryComposition.vue | 4 +- .../passport/sections/CellChemistry.vue | 4 +- .../passport/sections/Characteristics.vue | 10 +- .../passport/sections/Commercial.vue | 4 +- .../passport/sections/Components.vue | 13 +- .../sections/ElectrochemicalProperties.vue | 78 +- src/components/passport/sections/Exchange.vue | 714 +++++++++--------- .../passport/sections/GeneralInformation.vue | 34 +- src/components/passport/sections/Handling.vue | 6 +- .../passport/sections/Identification.vue | 2 +- src/components/passport/sections/Metadata.vue | 12 +- .../passport/sections/Operation.vue | 6 +- .../passport/sections/Serialization.vue | 18 +- .../passport/sections/StateOfBattery.vue | 14 +- .../passport/sections/Sustainability.vue | 10 +- src/components/passport/sections/Typology.vue | 10 +- src/config/templates/descriptions.json | 18 - src/config/templates/iconMappings.json | 7 +- src/translations/de.json | 309 +++++++- src/translations/en.json | 309 +++++++- src/views/HomeView.vue | 24 +- src/views/PassportView.vue | 40 +- src/views/SearchView.vue | 33 +- 37 files changed, 1593 insertions(+), 904 deletions(-) delete mode 100644 src/config/templates/descriptions.json diff --git a/src/components/general/Dialog.vue b/src/components/general/Dialog.vue index e2b50b644..59d5d38ab 100644 --- a/src/components/general/Dialog.vue +++ b/src/components/general/Dialog.vue @@ -29,7 +29,7 @@ - Description + {{ $t("dialog.description") }}

404

-

No description

+

{{ $t("dialog.noDescription") }}

diff --git a/src/components/general/ErrorComponent.vue b/src/components/general/ErrorComponent.vue index 1810612aa..75407f8ef 100644 --- a/src/components/general/ErrorComponent.vue +++ b/src/components/general/ErrorComponent.vue @@ -1,115 +1,149 @@ - - - - - - - + + + + + + + diff --git a/src/components/general/Footer.vue b/src/components/general/Footer.vue index 693d3e1a6..d81d376c1 100644 --- a/src/components/general/Footer.vue +++ b/src/components/general/Footer.vue @@ -31,15 +31,16 @@ id="lnkHelp" target="_blank" href="https://portal.int.demo.catena-x.net/documentation/?path=docs" - >Help + {{ $t("footer.help") }} +
Contact{{ $t("footer.contact") }}
@@ -47,98 +48,94 @@ id="lnkHelp" target="_blank" href="https://portal.int.demo.catena-x.net/imprint" - >Imprint + {{ $t("footer.imprint") }} +
Privacy + {{ $t("footer.privacy") }} +
Terms of Service + {{ $t("footer.terms") }} +
Cookies + {{ $t("footer.cookies") }} +
Third Party Licenses + {{ $t("footer.thirdParty") }} +
- Legal notice + {{ $t("footer.legal") }}
- +
@@ -156,7 +153,7 @@ export default { }, data() { return { - baseCommitUrl: REPO_ENDPOINT+'/blob/'+COMMIT_ID, + baseCommitUrl: REPO_ENDPOINT + "/blob/" + COMMIT_ID, }; }, computed: { @@ -171,7 +168,7 @@ export default { return { VERSION, COMMIT_ID, - REPO_ENDPOINT + REPO_ENDPOINT, }; }, }; diff --git a/src/components/general/Header.vue b/src/components/general/Header.vue index 0bd43ca09..4ed327990 100644 --- a/src/components/general/Header.vue +++ b/src/components/general/Header.vue @@ -52,10 +52,9 @@ class="help-btn" :ripple="{ class: 'ripple-background' }" rounded - >Help + >{{ $t("header.helpBtn") }} - Here you can get help if you need to know more about - Catena-X + {{ $t("header.helpTooltip") }} @@ -84,7 +83,9 @@ class="menu-btn" @click="logout" > - Sign Out + {{ + $t("header.signOut") + }}
-
Asset Id: {{ id }}
+
{{ $("loading.assetId") }} {{ id }}
@@ -143,32 +143,32 @@ export default { initialProgressValue: 10, stepsNames: { registrySearch: { - stepTitle: "Registry Search", - initialStepSubtitle: "Searching...", - successStepSubtitle: "Registries available", + stepTitle: "loading.registrySearch", + initialStepSubtitle: "loading.searching", + successStepSubtitle: "loading.registriesAvailable", progressValue: 25, }, contractSearch: { - stepTitle: "Contract Search", - initialStepSubtitle: "Searching...", - successStepSubtitle: "Contract available", + stepTitle: "loading.contractSearch", + initialStepSubtitle: "loading.searching", + successStepSubtitle: "loading.contractAvailable", progressValue: 20, }, contractNegotiation: { - stepTitle: "Contract Negotiation", - initialStepSubtitle: "Negotiating...", - successStepSubtitle: "Contract status: ", + stepTitle: "loading.contractNegotiation", + initialStepSubtitle: "loading.negotiating", + successStepSubtitle: "loading.contractStatus", progressValue: 10, }, contractTransfer: { - stepTitle: "Contract Transfer", - initialStepSubtitle: "Transferring...", - successStepSubtitle: "Transfer completed", + stepTitle: "loading.contractTransfer", + initialStepSubtitle: "loading.transferring", + successStepSubtitle: "loading.transferCompleted", progressValue: 15, }, passportRetrieval: { - stepTitle: "Passport Retrieval", - initialStepSubtitle: "Retrieving... ", + stepTitle: "loading.passportRetrieval", + initialStepSubtitle: "loading.retrieving", successStepSubtitle: "", progressValue: 20, }, diff --git a/src/components/general/RecursiveTree.vue b/src/components/general/RecursiveTree.vue index 0d64191ae..2fa78fef6 100644 --- a/src/components/general/RecursiveTree.vue +++ b/src/components/general/RecursiveTree.vue @@ -122,7 +122,7 @@
[{{ "mdi-minus" }}]
-

Not available

+

{{ $t("recursiveTree.notAvailable") }}

diff --git a/src/components/general/SearchInput.vue b/src/components/general/SearchInput.vue index 92cf6453c..704bbe4a4 100644 --- a/src/components/general/SearchInput.vue +++ b/src/components/general/SearchInput.vue @@ -33,7 +33,7 @@ v-model="typedCode" class="input" type="text" - placeholder="Enter Battery ID" + :placeholder="$t('searchInput.passportId')" > - Search + {{ $t("searchInput.search") }} diff --git a/src/components/general/TabsComponent.vue b/src/components/general/TabsComponent.vue index c75c4dd92..752b29aba 100644 --- a/src/components/general/TabsComponent.vue +++ b/src/components/general/TabsComponent.vue @@ -29,7 +29,7 @@ :value="section.component" > - {{ section.label }} + {{ $t(section.label) }} diff --git a/src/components/passport/BarChart.vue b/src/components/passport/BarChart.vue index 3fed303c1..3f5366925 100644 --- a/src/components/passport/BarChart.vue +++ b/src/components/passport/BarChart.vue @@ -30,10 +30,10 @@ :style="`width: ${barChart(currentValue, maxValue)}; background: #0f71cb`" />
- {{ isNumeric(currentValue) ? currentValue : "No data" }} + {{ isNumeric(currentValue) ? currentValue : $t("barChart.noData") }}
- {{ isNumeric(maxValue) ? maxValue : "No data" }} + {{ isNumeric(maxValue) ? maxValue : $t("barChart.noData") }}
diff --git a/src/components/passport/BatteryCards.vue b/src/components/passport/BatteryCards.vue index 4f203665b..414422107 100644 --- a/src/components/passport/BatteryCards.vue +++ b/src/components/passport/BatteryCards.vue @@ -32,18 +32,21 @@ style="padding: 6px !important" >
- {{ card.title }} + {{ $t(card.title) }} - +
- {{ card.secondLabel }} + {{ $t(card.secondLabel) }}
- {{ card.label }} + {{ $t(card.label) }}
{{ card.value ? card.value : "-" }} {{ card.valueUnits }}
-
-
Charging Cycles
+
+
+ {{ $t("batteryCards.chargingCycles") }} +
- {{ card.secondLabel }} + {{ $t(card.secondLabel) }}
{{ card.secondValue ? card.secondValue : "-" }} @@ -87,10 +95,10 @@ @@ -103,6 +111,7 @@ diff --git a/src/components/passport/Field.vue b/src/components/passport/Field.vue index bdb315ebf..8c069e294 100644 --- a/src/components/passport/Field.vue +++ b/src/components/passport/Field.vue @@ -62,11 +62,14 @@
Temp ranges: - {{ tempMin }} {{ tempUnit }} to {{ tempMax }} {{ tempUnit }} + >{{ $t("field.tempRange") }} + {{ tempMin }} {{ tempUnit }} {{ $t("field.to") }} {{ tempMax }} + {{ tempUnit }} Reference test: {{ test }} + >{{ $t("field.referenceTest") }} {{ test }}
diff --git a/src/components/passport/GeneralCards.vue b/src/components/passport/GeneralCards.vue index 0426f22ba..45173ef6b 100644 --- a/src/components/passport/GeneralCards.vue +++ b/src/components/passport/GeneralCards.vue @@ -31,7 +31,7 @@ style="padding: 6px !important" >
- {{ card.title }} + {{ $t(card.title) }}
- {{ card.label }} + {{ $t(card.label) }}
- {{ card.value ? card.value : "-" }} {{ card.valueUnits }} + {{ card.value ? $t(card.value) : "-" }} {{ $t(card.valueUnits) }}
- {{ card.secondLabel }} + {{ $t(card.secondLabel) }}
{{ card.secondValue ? card.secondValue : "-" }} @@ -63,10 +63,10 @@ @@ -94,9 +94,9 @@ export default { return { cards: [ { - title: "GENERAL", - label: "Product name", - secondLabel: "Product type", + title: "generalCards.titleGeneral", + label: "generalCards.productName", + secondLabel: "generalCards.productType", icon: "mdi-pound", value: this.$props.data.aspect.typology ? this.$props.data.aspect.typology.name @@ -106,9 +106,9 @@ export default { : "-", }, { - title: "MANUFACTURING", - label: "Manufacturer Id", - secondLabel: "Date of Manufacturing", + title: "generalCards.titleManufacturing", + label: "generalCards.manufacturerId", + secondLabel: "generalCards.dateOfManufacturing", icon: "mdi-chart-timeline-variant-shimmer", value: this.$props.data.aspect.operation.manufacturer ? this.$props.data.aspect.operation.manufacturer.manufacturerId @@ -119,39 +119,39 @@ export default { .date : "-", description: { - title: "Manufacturing", - value: "Description of the manufacturing", + title: "generalCards.descriptionManufacturingTitle", + value: "generalCards.descriptionManufacturingValue", }, }, { - title: "ASPECT VERSION", - label: "Current version", - secondLabel: "Issued", + title: "generalCards.titleAspectVersion", + label: "generalCards.currentVersion", + secondLabel: "generalCards.issued", icon: "mdi-aspect", value: this.$props.data.aspect.metadata.version, secondValue: this.$props.data.aspect.metadata.issueDate, description: { - title: "aspect version", - value: "Description of the aspect version", + title: "generalCards.descriptionAspectVersionTitle", + value: "generalCards.descriptionAspectVersionValue", }, }, { - title: "SUSTAINABILITY", - label: "Total CO2 footprint", - secondLabel: "Warranty period", + title: "generalCards.titleSustainability", + label: "generalCards.totalCo2Footprint", + secondLabel: "generalCards.warrantyPeriod", icon: "mdi-leaf", value: this.$props.data.aspect.sustainability.carbonFootprint ? this.$props.data.aspect.sustainability.carbonFootprint .carbonContentTotal : "-", - valueUnits: "t CO2 Total", + valueUnits: "generalCards.tCo2Total", secondValue: this.$props.data.aspect.commercial.warranty, secondValueUnits: this.$props.data.aspect.commercial.warranty - ? "months" + ? "generalCards.months" : "", description: { - title: "Sustainability", - value: "Description of the Sustainability", + title: "generalCards.descriptionSustainabilityTitle", + value: "generalCards.descriptionSustainabilityValue", }, }, ], diff --git a/src/components/passport/PassportHeader.vue b/src/components/passport/PassportHeader.vue index acf1d7466..245dfb8e4 100644 --- a/src/components/passport/PassportHeader.vue +++ b/src/components/passport/PassportHeader.vue @@ -32,7 +32,7 @@ style="border: 2px solid; text-transform: initial" > - Back + {{ $t("passportHeader.backBtn") }}
diff --git a/src/components/passport/Section.vue b/src/components/passport/Section.vue index 2c9e72b4d..a77bce3f1 100644 --- a/src/components/passport/Section.vue +++ b/src/components/passport/Section.vue @@ -1,127 +1,127 @@ - - - - - - - - + + + + + + + + diff --git a/src/components/passport/sections/BatteryComposition.vue b/src/components/passport/sections/BatteryComposition.vue index 8516804a4..dcaaa8f9a 100644 --- a/src/components/passport/sections/BatteryComposition.vue +++ b/src/components/passport/sections/BatteryComposition.vue @@ -34,12 +34,12 @@ data-cy="composition" icon="mdi-newspaper-variant-outline" :attributes-list="propsData.compositionOfBattery" - label="Main Battery Composites" + :label="$t('sections.batteryComposition.batteryComposites')" style="background: #f9f9f9; min-width: 300px" /> diff --git a/src/components/passport/sections/CellChemistry.vue b/src/components/passport/sections/CellChemistry.vue index 48f463c4a..5d94bf71f 100644 --- a/src/components/passport/sections/CellChemistry.vue +++ b/src/components/passport/sections/CellChemistry.vue @@ -28,7 +28,7 @@ @@ -49,7 +49,7 @@ class="element-chart-label" style="margin-left: -5px; margin-bottom: 15px" > - Recyclate Content Active Materials + {{ $t("sections.cellChemistry.recyclateContent") }}
diff --git a/src/components/passport/sections/Characteristics.vue b/src/components/passport/sections/Characteristics.vue index 57b581373..6f8d5579f 100644 --- a/src/components/passport/sections/Characteristics.vue +++ b/src/components/passport/sections/Characteristics.vue @@ -28,14 +28,14 @@ @@ -45,7 +45,7 @@ @@ -55,7 +55,7 @@