From da66691145697c7985c4114841456ff68467c717 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 29 Aug 2021 04:35:39 +0530 Subject: [PATCH] Internationalization Closes #3 Squashed commit of the following: commit 86ffbbc5601f0856e10a01943ff17dfffcc438e9 Author: root Date: Sat Aug 28 22:23:47 2021 +0530 Trim counts.views commit b779b95bfd372a7e733249f02bb310f69aace1d7 Author: root Date: Sat Aug 28 11:02:11 2021 +0530 Update translations commit bd7f4d3098c58333bd57e841fa1cd3a20071f95d Author: root Date: Sat Aug 28 08:18:34 2021 +0530 Minor translation fix commit 0e1b52488e7bf11e78b91a1a99d8dcb953761d45 Author: root Date: Sat Aug 28 08:10:24 2021 +0530 i18n searchbar commit a72917a2aa021888c3a8426f28448d03f5b4c13d Author: root Date: Sat Aug 28 08:07:19 2021 +0530 Enable Bengali in Bengali Script commit be2bb6aa3decea24f553beae07b774f2feabd97e Author: root Date: Sat Aug 28 07:57:47 2021 +0530 Improve Bengali (Bengali script) translations commit 3367e55bb29d13a6f5ee16b8b240e552a9847fbb Author: root Date: Sat Aug 28 07:11:32 2021 +0530 Mark Bengali translations as incomplete commit 4487c90c0ab9369eb8a761a74ddbd1abc0a7af26 Author: root Date: Sat Aug 28 07:11:03 2021 +0530 Translate history commit 70404a15a2e63e071f1b2b498c52e71ee6ff905a Author: root Date: Sat Aug 28 07:05:08 2021 +0530 Translate preferences and move prefs to its own keys commit 753fd408311d6735c6ab7df4eae69062467e4d30 Author: root Date: Sat Aug 28 06:49:50 2021 +0530 Cleanup deadcode commit 4cc0d7679c66055ff44d750e7d0e56f447e1d358 Author: root Date: Sat Aug 28 06:42:24 2021 +0530 A few more translations commit e60833db736c7f46ea6f1fd02ec2cbcdd3fe2bbd Author: root Date: Sat Aug 28 06:28:46 2021 +0530 Translate and use the count system for counts.videos commit 7f119adacf5a20cd16f7257d19e8fe246ed64ec9 Author: root Date: Sat Aug 28 06:23:17 2021 +0530 Eliminate deadcode commit f9d075225cc5be8122111c17386e56158ad4eb43 Author: root Date: Sat Aug 28 06:20:01 2021 +0530 Entirely eliminate offsets commit 846a0b476e34d6e009e591b62796dabd35262617 Author: root Date: Sat Aug 28 06:18:59 2021 +0530 Fixup a few things and use fontsource instead of Google Fonts commit 722369df15cb79df96b899f5cc0e9f66347228e5 Author: root Date: Sat Aug 28 05:27:13 2021 +0530 Fix translation and allow for widely disparate size requirements commit 474e442d5a3d0a7a1bae592366a5cfaa2c38f32d Author: root Date: Sat Aug 28 05:09:55 2021 +0530 Implement i18n and change design around a little bit commit 2c46f3af6c781d4fc59c91ef47b58348dc3ff5a3 Author: root Date: Sat Aug 28 04:39:12 2021 +0530 Implement i18n with a WIP Bengali Latin translation --- package.json | 7 ++- public/index.html | 1 - src/App.vue | 87 +++++++++++++++++++-------- src/components/GenericDisplayItem.vue | 2 +- src/components/Player.vue | 5 +- src/components/VideoItem.vue | 2 +- src/main.js | 13 +++- src/plugins/i18n.js | 74 +++++++++++++++++++++++ src/routes/Channel.vue | 2 +- src/routes/Playlist.vue | 44 +------------- src/routes/Preferences.vue | 84 +++----------------------- src/routes/SearchMenu.vue | 3 +- src/routes/SearchResults.vue | 2 +- src/routes/TrendingPage.vue | 8 ++- src/routes/WatchHistory.vue | 6 ++ src/routes/WatchVideo.vue | 9 +-- src/styles/main.scss | 22 +++++++ src/translations/bn_beng.json | 55 +++++++++++++++++ src/translations/bn_latn.json | 46 ++++++++++++++ src/translations/de.json | 47 +++++++++++++++ src/translations/el.json | 47 +++++++++++++++ src/translations/en.json | 57 ++++++++++++++++++ src/translations/fr.json | 47 +++++++++++++++ src/translations/lt.json | 47 +++++++++++++++ src/translations/ml.json | 43 +++++++++++++ src/translations/nb_NO.json | 47 +++++++++++++++ src/translations/tr.json | 47 +++++++++++++++ src/translations/zh_Hant.json | 25 ++++++++ yarn.lock | 48 +++++++++------ 29 files changed, 749 insertions(+), 178 deletions(-) create mode 100644 src/plugins/i18n.js create mode 100644 src/styles/main.scss create mode 100644 src/translations/bn_beng.json create mode 100644 src/translations/bn_latn.json create mode 100644 src/translations/de.json create mode 100644 src/translations/el.json create mode 100644 src/translations/en.json create mode 100644 src/translations/fr.json create mode 100644 src/translations/lt.json create mode 100644 src/translations/ml.json create mode 100644 src/translations/nb_NO.json create mode 100644 src/translations/tr.json create mode 100644 src/translations/zh_Hant.json diff --git a/package.json b/package.json index 80a2d32..01db144 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "@babel/eslint-parser": "^7.15.0", + "@fontsource/baloo-da-2": "^4.5.0", + "@fontsource/roboto": "^4.5.0", "core-js": "^3.16.1", "dompurify": "^2.3.1", "hotkeys-js": "^3.8.7", @@ -19,6 +22,7 @@ "sass-loader": "^10", "shaka-player": "^3.2.0", "vue": "^2.6.14", + "vue-i18n": "^8.25.0", "vue-meta": "^2.4.0", "vue-router": "^3.5.2", "vuetify": "^2.5.8", @@ -33,7 +37,6 @@ "@vue/cli-plugin-vuex": "~4.5.13", "@vue/cli-service": "~4.5.13", "@vue/eslint-config-standard": "^6.1.0", - "babel-eslint": "^10.1.0", "eslint": "^7.32.0", "eslint-plugin-import": "^2.24.0", "eslint-plugin-node": "^11.1.0", @@ -57,7 +60,7 @@ "@vue/standard" ], "parserOptions": { - "parser": "babel-eslint" + "parser": "@babel/eslint-parser" }, "rules": {} }, diff --git a/public/index.html b/public/index.html index 5ebacfd..73ceb8d 100644 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,6 @@ <%= htmlWebpackPlugin.options.title %> - diff --git a/src/App.vue b/src/App.vue index d55b622..2d4e7ff 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,24 +4,36 @@ app color="primary" dark - flat > - - - {{ link.name }} - - - - - - - + + + + + + {{ $t(link.name) }} + + + + + + + + + @@ -33,37 +45,62 @@