File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 282
282
"play_lower_quality_version" : " 播放更低音质" ,
283
283
"play_higher_quality_version" : " 播放更高音质" ,
284
284
"when_play_error" : " 播放失败时" ,
285
- "pause" : " 暂停 " ,
285
+ "pause" : " 暂停播放 " ,
286
286
"skip_to_next" : " 自动播放下一首" ,
287
287
"double_click_music_list" : " 双击音乐列表时" ,
288
288
"add_music_to_playlist" : " 将目标单曲添加到播放队列" ,
Original file line number Diff line number Diff line change @@ -58,9 +58,18 @@ export async function setupI18n(options?: ISetupI18nOptions) {
58
58
if ( defaultLang && ! allLangs . includes ( defaultLang ) ) {
59
59
defaultLang = undefined ;
60
60
}
61
+
61
62
if ( ! defaultLang ) {
62
- defaultLang =
63
- app . getLocale ( ) || allLangs . includes ( "en-US" ) ? "en-US" : allLangs [ 0 ] ;
63
+ const appLocale = app . getLocale ( ) ;
64
+ if ( allLangs . includes ( appLocale ) ) {
65
+ defaultLang = appLocale ;
66
+ } else if ( appLocale . includes ( "zh" ) && allLangs . includes ( "zh-CN" ) ) {
67
+ defaultLang = "zh-CN" ;
68
+ } else if ( allLangs . includes ( "en-US" ) ) {
69
+ defaultLang = "en-US" ;
70
+ } else {
71
+ defaultLang = allLangs [ 0 ] ;
72
+ }
64
73
}
65
74
66
75
const langContent = await readLangContent ( defaultLang ) ;
You can’t perform that action at this time.
0 commit comments