feat(localization): add support for additional dayjs locales

Expand dayjs locale support by adding Arabic, Russian, Turkish, and Vietnamese locales. Update default locale handling to use English when no specific locale is matched.
This commit is contained in:
Jacky 2025-02-19 02:43:02 +00:00
parent 59ec9136fa
commit 27b389371d
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
2 changed files with 20 additions and 4 deletions

View file

@ -13,6 +13,10 @@ import 'dayjs/locale/zh-tw'
import 'dayjs/locale/pt' import 'dayjs/locale/pt'
import 'dayjs/locale/es' import 'dayjs/locale/es'
import 'dayjs/locale/it' import 'dayjs/locale/it'
import 'dayjs/locale/ar'
import 'dayjs/locale/ru'
import 'dayjs/locale/tr'
import 'dayjs/locale/vi'
const settings = useSettingsStore() const settings = useSettingsStore()
@ -61,8 +65,8 @@ function init() {
case 'de': case 'de':
dayjs.locale('de') dayjs.locale('de')
break break
case 'en': case 'zh_CN':
dayjs.locale('en') dayjs.locale('zh-cn')
break break
case 'zh_TW': case 'zh_TW':
dayjs.locale('zh-tw') dayjs.locale('zh-tw')
@ -76,8 +80,20 @@ function init() {
case 'it': case 'it':
dayjs.locale('it') dayjs.locale('it')
break break
case 'ar':
dayjs.locale('ar')
break
case 'ru':
dayjs.locale('ru')
break
case 'tr':
dayjs.locale('tr')
break
case 'vi':
dayjs.locale('vi')
break
default: default:
dayjs.locale('zh-cn') dayjs.locale('en')
} }
} }

View file

@ -1 +1 @@
{"version":"2.0.0-rc.2","build_id":1,"total_build":383} {"version":"2.0.0-rc.2","build_id":2,"total_build":384}