Patch 8.1.0207
Problem: Need many menu translation files to cover regions.
Solution: When there is no region match, try without. (Christian Brabandt)
Files: runtime/menu.vim
*** ../vim-8.1.0206/runtime/menu.vim 2018-05-17 12:39:14.000000000 +0200
--- runtime/menu.vim 2018-07-23 05:07:00.697989266 +0200
***************
*** 56,61 ****
--- 56,68 ----
let s:lang = substitute(s:lang, '\.[^.]*', "", "")
exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim"
+ if !exists("did_menu_trans") && s:lang =~ '_'
+ " If the language includes a region try matching without that region.
+ " (e.g. find menu_de.vim if s:lang == de_DE).
+ let langonly = substitute(s:lang, '_.*', "", "")
+ exe "runtime! lang/menu_" . langonly . "[^a-z]*vim"
+ endif
+
if !exists("did_menu_trans") && strlen($LANG) > 1 && s:lang !~ '^en_us'
" On windows locale names are complicated, try using $LANG, it might
" have been set by set_init_1(). But don't do this for "en" or "en_us".
***************
*** 809,815 ****
let name = a:fname
if name == ''
if !exists("g:menutrans_no_file")
! let g:menutrans_no_file = "[No file]"
endif
let name = g:menutrans_no_file
else
--- 816,822 ----
let name = a:fname
if name == ''
if !exists("g:menutrans_no_file")
! let g:menutrans_no_file = "[No Name]"
endif
let name = g:menutrans_no_file
else
*** ../vim-8.1.0206/src/version.c 2018-07-23 04:49:17.225024903 +0200
--- src/version.c 2018-07-23 05:05:44.138454667 +0200
***************
*** 795,796 ****
--- 795,798 ----
{ /* Add new patch number below this line */
+ /**/
+ 207,
/**/
--
### Hiroshima 45, Chernobyl 86, Windows 95 ###
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.