From ab35cdb92f2a51816e07d69205442a0fe227e14d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Jan 2022 11:05:37 +0530 Subject: [PATCH] Internationalization upgrades (PR 13) commit 56e4933c639ff32ea18470ae1534fa4d06b448e3 Author: root Date: Tue Jan 4 11:09:22 2022 +0530 Also format dates commit 01d379537b2e41819e2093b33dfd2a026bcb7281 Author: root Date: Sun Jan 2 13:48:36 2022 +0530 Another Bengali translation update commit 53063d4265f85db7be14135ffaa095647f233841 Author: root Date: Sat Jan 1 11:41:44 2022 +0530 Standardize to BCP47 and adjust commit 1b48f79cce411f8d18cf9e5059916b1c50719cd5 Author: root Date: Sat Jan 1 11:17:28 2022 +0530 Localized number formatting + Bengali translations update commit 6b3e30db37338334f03d98b92d124741446fb470 Author: root Date: Sat Jan 1 10:41:27 2022 +0530 Fix fontloading commit 5b08962971f8edb5030bc5ba79972bbb209b3d31 Author: root Date: Sat Jan 1 10:38:29 2022 +0530 Even more standardization commit bc6a4dfb335647472ea091b302b627f475bed879 Author: root Date: Sat Jan 1 10:25:29 2022 +0530 Rename as per BCP-47 and standardize commit 106f84fa0486d19504fd244aaab41f9cd4a8a513 Author: root Date: Sat Jan 1 10:13:32 2022 +0530 i18n on steroids --- src/App.vue | 14 ++--- src/components/ExpandableDate.vue | 6 +-- src/components/VideoComment.vue | 5 +- src/components/VideoItem.vue | 7 +-- src/main.js | 18 ++++--- src/plugins/i18n.js | 53 +++++++++++++------ src/routes/SearchResults.vue | 4 -- src/routes/WatchVideo.vue | 16 +++--- src/store/i18n-store.js | 42 +++++++++++++++ src/store/index.js | 4 +- src/styles/main.scss | 2 +- src/tools/libpiped.js | 49 ----------------- .../{bn_beng.json => bn-Beng.json} | 3 +- .../{bn_latn.json => bn-Latn.json} | 0 src/translations/en.json | 3 +- src/translations/{cyrl.json => ja.json} | 0 src/translations/{jp.json => ko.json} | 0 src/translations/{nb_NO.json => nb-NO.json} | 0 src/translations/{kr.json => ru.json} | 0 .../{zh_Hans.json => zh-Hans.json} | 0 .../{zh_Hant.json => zh-Hant.json} | 0 21 files changed, 114 insertions(+), 112 deletions(-) create mode 100644 src/store/i18n-store.js rename src/translations/{bn_beng.json => bn-Beng.json} (97%) rename src/translations/{bn_latn.json => bn-Latn.json} (100%) rename src/translations/{cyrl.json => ja.json} (100%) rename src/translations/{jp.json => ko.json} (100%) rename src/translations/{nb_NO.json => nb-NO.json} (100%) rename src/translations/{kr.json => ru.json} (100%) rename src/translations/{zh_Hans.json => zh-Hans.json} (100%) rename src/translations/{zh_Hant.json => zh-Hant.json} (100%) diff --git a/src/App.vue b/src/App.vue index 3753cbb..716e14e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -110,20 +110,20 @@ export default { data: () => ({ languageOptions: [ - { value: 'zh_Hant', text: 'Chinese (Traditional)' }, { value: 'en', text: 'English' }, { value: 'fr', text: 'French' }, { value: 'de', text: 'German' }, { value: 'el', text: 'Greek' }, - { value: 'zh_Hans', text: 'Chinese (Simplified, only loads the font)' }, - { value: 'jp', text: 'Japanese (only loads fonts)' }, - { value: 'kr', text: 'Korean (only loads fonts)' }, - { value: 'cyrl', text: 'Cyrillic Languages (fonts)' }, + { value: 'zh-Hans', text: 'Chinese (Simplified, only loads the font)' }, + { value: 'zh-Hant', text: 'Chinese (Traditional)' }, + { value: 'ja', text: 'Japanese (only loads fonts)' }, + { value: 'ko', text: 'Korean (only loads fonts)' }, + { value: 'ru', text: 'Russian (only loads fonts)' }, { value: 'lt', text: 'Lithuanian' }, { value: 'ml', text: 'Malayalam' }, - { value: 'nb_NO', text: 'Norwegian Bokmål' }, + { value: 'nb-NO', text: 'Norwegian Bokmål' }, { value: 'tr', text: 'Turkish' }, - { value: 'bn_beng', text: 'Bengali (বাংলা)' } + { value: 'bn-Beng', text: 'Bengali (বাংলা)' } // Incomplete, DO NOT USE /* { value: 'bn_latn', text: 'Bengali (Latin)' }, */ ].sort((a, b) => { diff --git a/src/components/ExpandableDate.vue b/src/components/ExpandableDate.vue index eeb61ba..ff39808 100644 --- a/src/components/ExpandableDate.vue +++ b/src/components/ExpandableDate.vue @@ -10,18 +10,16 @@