Sfoglia il codice sorgente

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 2 mesi fa
parent
commit
27b389371d
2 ha cambiato i file con 20 aggiunte e 4 eliminazioni
  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/es'
 import 'dayjs/locale/it'
+import 'dayjs/locale/ar'
+import 'dayjs/locale/ru'
+import 'dayjs/locale/tr'
+import 'dayjs/locale/vi'
 
 const settings = useSettingsStore()
 
@@ -61,8 +65,8 @@ function init() {
     case 'de':
       dayjs.locale('de')
       break
-    case 'en':
-      dayjs.locale('en')
+    case 'zh_CN':
+      dayjs.locale('zh-cn')
       break
     case 'zh_TW':
       dayjs.locale('zh-tw')
@@ -76,8 +80,20 @@ function init() {
     case 'it':
       dayjs.locale('it')
       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:
-      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}