Add fonts and Intl support for Sorani Kurdish

This commit is contained in:
root
2022-02-08 01:18:12 +05:30
parent 961abaa756
commit c5636992aa
7 changed files with 26 additions and 3 deletions
+1
View File
@@ -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",
+2 -1
View File
@@ -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) => {
+5 -1
View File
@@ -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
+8 -1
View File
@@ -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)
+4
View File
@@ -43,6 +43,10 @@
@include addFonts('Nunito Sans');
}
.sorani-kurdish {
@include addFonts('Noto Naskh Arabic')
}
.v-application {
max-width: 100vw;
overflow: hidden;
+1
View File
@@ -0,0 +1 @@
{}
+5
View File
@@ -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"