runtime(tutor): fix language selection for zh Commit: https://github.com/vim/vim/commit/a0eb405761ecda8fae96a4904d37bb6eb1aa6b5e Author: GalaxySnail <m...@glxys.nl> Date: Tue Aug 26 21:37:38 2025 +0200
runtime(tutor): fix language selection for zh fixes: https://github.com/vim/vim/issues/18123 related: https://github.com/vim/vim/issues/18124 Signed-off-by: GalaxySnail <m...@glxys.nl> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/tutor/tutor.vim b/runtime/tutor/tutor.vim index 3aa4c1e3e..4771f2875 100644 --- a/runtime/tutor/tutor.vim +++ b/runtime/tutor/tutor.vim @@ -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 -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1uqzbO-003r3q-24%40256bit.org.