mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
runtime(tutor): fix language selection for zh
fixes: #18123 related: #18124 Signed-off-by: GalaxySnail <me@glxys.nl> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e810ba5a1f
commit
a0eb405761
@@ -65,6 +65,16 @@ if s:ext =~? '\.en'
|
||||
let s:ext = ""
|
||||
endif
|
||||
|
||||
" Choose between Chinese (Simplified) and Chinese (Traditional)
|
||||
" based on the language, suggested by Alick Zhao.
|
||||
if s:ext =~? '\.zh'
|
||||
if s:ext =~? 'zh_tw' || (exists("s:lang") && s:lang =~? 'zh_tw')
|
||||
let s:ext = ".zh_tw"
|
||||
else
|
||||
let s:ext = ".zh_cn"
|
||||
endif
|
||||
endif
|
||||
|
||||
" 2. Build the name of the file and chapter
|
||||
let s:chapter = exists("$CHAPTER") ? $CHAPTER : 1
|
||||
|
||||
|
Reference in New Issue
Block a user