File tree Expand file tree Collapse file tree 8 files changed +39
-11
lines changed Expand file tree Collapse file tree 8 files changed +39
-11
lines changed Original file line number Diff line number Diff line change 1- VITE_APP_VERSION = 0.9.0
2- VITE_APP_BUILD_NUMBER = 11
3- VITE_APP_RELEASE_DATE = 2025-10-15
1+ VITE_APP_VERSION = 0.9.1
2+ VITE_APP_BUILD_NUMBER = 12
3+ VITE_APP_RELEASE_DATE = 2025-10-19
Original file line number Diff line number Diff line change 77** 一个简约强大的 SQL 桌面客户端,支持多种文件格式查询**
88
99[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
10- [ ![ Version] ( https://img.shields.io/badge/version-0.9.0 -blue.svg )] ( https://github.com/shencangsheng/easydb_app )
10+ [ ![ Version] ( https://img.shields.io/badge/version-0.9.1 -blue.svg )] ( https://github.com/shencangsheng/easydb_app )
1111[ ![ Platform] ( https://img.shields.io/badge/platform-macOS%20%7C%20Windows-lightgrey.svg )] ( https://github.com/shencangsheng/easydb_app )
1212
1313[ English] ( README_EN.md ) | [ 中文] ( README.md )
Original file line number Diff line number Diff line change 77** A simple yet powerful SQL desktop client supporting multiple file formats**
88
99[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
10- [ ![ Version] ( https://img.shields.io/badge/version-0.9.0 -blue.svg )] ( https://github.com/shencangsheng/easydb_app )
10+ [ ![ Version] ( https://img.shields.io/badge/version-0.9.1 -blue.svg )] ( https://github.com/shencangsheng/easydb_app )
1111[ ![ Platform] ( https://img.shields.io/badge/platform-macOS%20%7C%20Windows-lightgrey.svg )] ( https://github.com/shencangsheng/easydb_app )
1212
1313[ English] ( README_EN.md ) | [ 中文] ( README.md )
Original file line number Diff line number Diff line change 11{
22 "name" : " easydb-frontend" ,
33 "private" : true ,
4- "version" : " 0.9.0 " ,
4+ "version" : " 0.9.1 " ,
55 "type" : " module" ,
66 "scripts" : {
77 "dev" : " vite" ,
Original file line number Diff line number Diff line change 11[package ]
22name = " easydb_app"
3- version = " 0.9.0 "
3+ version = " 0.9.1 "
44description = " EasyDB APP"
55authors = [" shencangsheng" ]
66license = " MIT"
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://schema.tauri.app/config/2" ,
33 "productName" : " EasyDB" ,
4- "version" : " 0.9.0 " ,
4+ "version" : " 0.9.1 " ,
55 "identifier" : " com.easydb.app" ,
66 "build" : {
77 "frontendDist" : " ../dist" ,
Original file line number Diff line number Diff line change @@ -443,6 +443,12 @@ class I18n {
443443 const savedLanguage = localStorage . getItem ( "app-language" ) as Language ;
444444 if ( savedLanguage && [ "zh-CN" , "en-US" ] . includes ( savedLanguage ) ) {
445445 this . currentLanguage = savedLanguage ;
446+ } else {
447+ // 如果没有保存的语言设置,根据浏览器默认语言自动选择
448+ const browserLanguage = this . detectBrowserLanguage ( ) ;
449+ this . currentLanguage = browserLanguage ;
450+ // 保存自动检测的语言设置
451+ localStorage . setItem ( "app-language" , browserLanguage ) ;
446452 }
447453 }
448454 this . initialized = true ;
@@ -453,6 +459,28 @@ class I18n {
453459 }
454460 }
455461
462+ private detectBrowserLanguage ( ) : Language {
463+ try {
464+ if ( typeof window !== "undefined" && window . navigator ) {
465+ const browserLang =
466+ window . navigator . language || window . navigator . languages ?. [ 0 ] ;
467+
468+ // 检查是否是中文(包括简体中文、繁体中文等)
469+ if ( browserLang && browserLang . toLowerCase ( ) . includes ( "zh" ) ) {
470+ return "zh-CN" ;
471+ }
472+
473+ // 其他情况默认使用英文
474+ return "en-US" ;
475+ }
476+ } catch ( error ) {
477+ console . warn ( "Failed to detect browser language:" , error ) ;
478+ }
479+
480+ // 如果检测失败,默认使用中文
481+ return "zh-CN" ;
482+ }
483+
456484 getLanguage ( ) : Language {
457485 return this . currentLanguage ;
458486 }
Original file line number Diff line number Diff line change 11{
2- "version" : " 0.9.0 " ,
3- "buildNumber" : " 11 " ,
4- "releaseDate" : " 2025-10-15 " ,
2+ "version" : " 0.9.1 " ,
3+ "buildNumber" : " 12 " ,
4+ "releaseDate" : " 2025-10-19 " ,
55 "description" : " EasyDB - 数据库管理工具" ,
66 "author" : " shencangsheng" ,
77 "repository" : " https://github.com/shencangsheng/easydb_app" ,
You can’t perform that action at this time.
0 commit comments