From ec0a13d95f4298d5ce396c5cdbb51e87457d2705 Mon Sep 17 00:00:00 2001 From: Alexandre_BRAVO Date: Fri, 29 Nov 2024 16:23:45 +0100 Subject: [PATCH] fonction traduction --- package-lock.json | 32 ++++++++++++++++++++++++++++++++ package.json | 1 + src/assets/traduction.json | 14 ++++++++++++++ src/components/FileTable.vue | 18 ++++++++++++++++-- 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/assets/traduction.json diff --git a/package-lock.json b/package-lock.json index 80fe678..7d115c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@nextcloud/files": "^3.10.0", "@nextcloud/initial-state": "^2.2.0", "@nextcloud/vue": "^8.20.0", + "i18next": "^24.0.2", "jszip": "^3.10.1", "vue": "^2.7.16", "vue-material-design-icons": "^5.3.1" @@ -7782,6 +7783,37 @@ "node": ">=10.18" } }, + "node_modules/i18next": { + "version": "24.0.2", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.0.2.tgz", + "integrity": "sha512-D88xyIGcWAKwBTAs4RSqASi8NXR/NhCVSTM4LDbdoU8qb/5dcEZjNCLDhtQBB7Epw/Cp1w2vH/3ujoTbqLSs5g==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2" + }, + "peerDependencies": { + "typescript": "^5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/ical.js": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ical.js/-/ical.js-2.1.0.tgz", diff --git a/package.json b/package.json index 21e0260..48e63da 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@nextcloud/files": "^3.10.0", "@nextcloud/initial-state": "^2.2.0", "@nextcloud/vue": "^8.20.0", + "i18next": "^24.0.2", "jszip": "^3.10.1", "vue": "^2.7.16", "vue-material-design-icons": "^5.3.1" diff --git a/src/assets/traduction.json b/src/assets/traduction.json new file mode 100644 index 0000000..597c0ab --- /dev/null +++ b/src/assets/traduction.json @@ -0,0 +1,14 @@ +{ + "en": { + "translation": { + "welcome": "Welcome to the app!", + "hello": "Hello, {{name}}!" + } + }, + "fr": { + "translation": { + "welcome": "Bienvenue dans l'application !", + "hello": "Bonjour, {{name}} !" + } + } +} \ No newline at end of file diff --git a/src/components/FileTable.vue b/src/components/FileTable.vue index b092f63..627989a 100644 --- a/src/components/FileTable.vue +++ b/src/components/FileTable.vue @@ -152,8 +152,6 @@ - -