diff --git a/package.json b/package.json index 8e90567..7a5a7be 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "dependencies": { "@babel/eslint-parser": "^7.17.0", "@fontsource/baloo-da-2": "^4.5.3", + "@fontsource/noto-naskh-arabic": "^4.5.3", "@fontsource/noto-sans-jp": "^4.5.3", "@fontsource/noto-sans-kr": "^4.5.3", "@fontsource/noto-sans-sc": "^4.5.3", diff --git a/src/App.vue b/src/App.vue index 716e14e..ad9905a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -123,7 +123,8 @@ export default { { value: 'ml', text: 'Malayalam' }, { value: 'nb-NO', text: 'Norwegian Bokmål' }, { value: 'tr', text: 'Turkish' }, - { value: 'bn-Beng', text: 'Bengali (বাংলা)' } + { value: 'bn-Beng', text: 'Bengali (বাংলা)' }, + { value: 'ckb', text: 'Sorani Kurdish' } // Incomplete, DO NOT USE /* { value: 'bn_latn', text: 'Bengali (Latin)' }, */ ].sort((a, b) => { diff --git a/src/components/VideoItem.vue b/src/components/VideoItem.vue index f547bd7..3b06cb3 100644 --- a/src/components/VideoItem.vue +++ b/src/components/VideoItem.vue @@ -77,7 +77,11 @@ export default { } if (videoId) { - const lastVideo = await findLastWatch(videoId) + let lastVideo = null + try { + lastVideo = await findLastWatch(videoId) + } catch (e) { + } if (lastVideo != null) { this.alreadyWatched = true this.progress = lastVideo.progressPcnt diff --git a/src/plugins/i18n.js b/src/plugins/i18n.js index 6e0b3cf..684bd5e 100644 --- a/src/plugins/i18n.js +++ b/src/plugins/i18n.js @@ -19,10 +19,12 @@ export const i18n = new VueI18n({ export const TIME_AGO_EXCEPTIONS = { 'bn-Beng': 'bn', - 'nb-NO': 'nb' + 'nb-NO': 'nb', + ckb: 'ku' } export const COUNTRY_I18N_EXCEPTIONS = { + ckb: 'ku', 'bn-Beng': 'bn', 'nb-NO': 'nb', 'zh-Hant': 'zh', @@ -52,6 +54,11 @@ async function syncStylesPerLanguage (locale) { break // Other languages // NOTE: if you are a native speaker & want to see a different font, just email me or join the channel + case 'ckb': + await import('@fontsource/noto-naskh-arabic/arabic.css') + document.body.classList.remove(...document.body.classList) + document.body.classList.add('sorani-kurdish') + break case 'zh-Hant': await import('@fontsource/noto-sans-tc/chinese-traditional.css') document.body.classList.remove(...document.body.classList) diff --git a/src/styles/main.scss b/src/styles/main.scss index 0890c36..4d91d37 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -43,6 +43,10 @@ @include addFonts('Nunito Sans'); } +.sorani-kurdish { + @include addFonts('Noto Naskh Arabic') +} + .v-application { max-width: 100vw; overflow: hidden; diff --git a/src/translations/ckb.json b/src/translations/ckb.json new file mode 100644 index 0000000..b6f6e13 --- /dev/null +++ b/src/translations/ckb.json @@ -0,0 +1,69 @@ +{ + "titles": { + "homepage": "پەڕەی سەرەکی", + "trending": "ڕەوەت", + "login": "چوونەژوورەوە", + "register": "تۆمارکردن", + "feed": "پوختە", + "preferences": "ڕێکخستنەکان", + "history": "مێژووی سەیرکردن" + }, + "counts": { + "videos": "بێ ڤیدیۆ | یەک ڤیدیۆ | {count} ڤیدیۆ", + "views": "هیچ بینینێک نییە | یەک بینین | {n} بینین" + }, + "errors": { + "trendingFetchError": "نەتوانرا ڤیدیۆ ڕەوەتەکان وەربگیرێن. بپشکنە کە ئایا وڵاتەکەت لەلایەن یوتوبەوە پشتگیری دەکرێت یان نا" + }, + "misc": { + "searchBarLabel": "بە دوای چی دەگەڕێیت?", + "lastWatchedTill": "سەیری دەکرد تا {t}", + "watchedAgo": "سەیرکراوە {t} تا {p}" + }, + "actions": { + "subscribe": "بەشداریکردن", + "unsubscribe": "بەشداری نەکردن", + "view_subscriptions": "بینینی بەشداریکردنەکان", + "sort_by": "پۆلێنکردن بەپێی:", + "most_recent": "تازەترین", + "least_recent": "کۆنترین", + "channel_name_asc": "ناوی کەناڵ (A-Z)", + "channel_name_desc": "ناوی کەناڵ (Z-A)", + "back": "گەڕانەوە", + "uses_api_from": "API بەکاردێنێت لە ", + "enable_sponsorblock": "چالاککردنی سپۆنسەربلوک", + "skip_sponsors": "پەڕین لە سپۆنسەرەکان", + "skip_intro": "پەڕین لە سەرەتاکان", + "skip_outro": "پەڕین لە کۆتاییەکان", + "skip_preview": "پەڕین لە دووبارە بوونەوە", + "skip_interaction": "پەڕین لە بەبیرهێنانەوەی بەشداری کردن", + "skip_self_promo": "پەڕین لە ڕێکلام", + "skip_non_music": "پەڕین لە میۆزیک", + "theme": "ڕووکار", + "auto": "خۆکار", + "dark": "تاریک", + "light": "ڕووناک", + "buffering_goal": "ئامانجی بەفەرکردن (بە چرکە)", + "show_comments": "نیشاندانی سەرنجەکان", + "minimize_description": "وەسفەکە بە بنەڕەت بچووک بکەوە", + "store_watch_history": "پاشەکەوت کردنی مێژووی سەیرکراوەکان", + "language_selection": "دەستنیشانکردنی زمان", + "instances_list": "لیستی نموونەی ڕاژەکان", + "enabled_codecs": "چاڵاک کردنی کۆدێکەکانی (هەمەجۆر)" + }, + "preferences": { + "feedColumns": "ژمارەی ئەستوونەکان لە پەڕەی پوختەکان", + "sponsorblock": "چالاککردنی سپۆنسەربلوک", + "selectedSkip": "پەڕین لە بەشەکان", + "skipToLastPoint": "پەڕین بۆ دوایین خاڵی سەیرکراو کاتێک ڕووبەڕووی ڤیدیۆیەک دەبیەوە کە پێشتر سەیرکراوە", + "disableLBRY": "ناچالاککردنی LBRY", + "proxyLBRY": "پەخشکردنی ڤیدیۆیەکانی LBRY", + "playerAutoplay": "کارکردنی خۆکارانەی ڤیدیۆی", + "bufferGoal": "ئامانجی بەفەرکردن", + "listen": "تەنها دەنگ", + "quality": "کوالێتی بنەڕەت", + "region": "هەڵبژاردەی وڵات", + "homepage": "پەڕەی سەرەکی بنەڕەت", + "instance": "نموونە ڕاژە" + } +} diff --git a/yarn.lock b/yarn.lock index ca10ef9..bdc402f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -968,6 +968,11 @@ resolved "https://registry.yarnpkg.com/@fontsource/baloo-da-2/-/baloo-da-2-4.5.3.tgz#61a378cfa46bf03085927eedc6a10943a2ac7124" integrity sha512-7v+BXA1SShqOZIEpGTyrKImo1SGRMMIsSKeISDfHjkTzE9ZQ7xA6DUpMdMazfegNoitwbVuQhheL8lHJSZChZw== +"@fontsource/noto-naskh-arabic@^4.5.3": + version "4.5.3" + resolved "https://registry.yarnpkg.com/@fontsource/noto-naskh-arabic/-/noto-naskh-arabic-4.5.3.tgz#1dc63eb985f2eeecc07e90e9349cd1203f5f4638" + integrity sha512-esH7Lawhlda6bE+FMQdqmNaMH1pePepz4q5ULShRgu4O/vuAuYoNbBW/ZgGUncY22sFwAlGKvsZ46Co9Y2LzCw== + "@fontsource/noto-sans-jp@^4.5.3": version "4.5.3" resolved "https://registry.yarnpkg.com/@fontsource/noto-sans-jp/-/noto-sans-jp-4.5.3.tgz#21288f57b6735cc39c5d5e33df6d9ba9590f9d34"