浏览代码

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.
Jacky 5 月之前
父节点
当前提交
27b389371d
共有 2 个文件被更改,包括 20 次插入4 次删除
  1. 19 3
      app/src/components/SetLanguage/SetLanguage.vue
  2. 1 1
      app/src/version.json

+ 19 - 3
app/src/components/SetLanguage/SetLanguage.vue

@@ -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':
-      dayjs.locale('en')
+    case 'zh_CN':
+      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')
   }
   }
 }
 }
 
 

+ 1 - 1
app/src/version.json

@@ -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}