]> granicus.if.org Git - vim/commitdiff
patch 8.1.0207: need many menu translation files to cover regions v8.1.0207
authorBram Moolenaar <Bram@vim.org>
Mon, 23 Jul 2018 03:10:14 +0000 (05:10 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 23 Jul 2018 03:10:14 +0000 (05:10 +0200)
Problem:    Need many menu translation files to cover regions.
Solution:   When there is no region match, try without. (Christian Brabandt)

runtime/menu.vim
src/version.c

index b9bd3d89cabe58cab9a0d05f08263d53ae70e599..b4c59dd92bc5ebbca5a8c8e6e1ce8f1f01111828 100644 (file)
@@ -56,6 +56,13 @@ if exists("v:lang") || &langmenu != ""
       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".
index 36e2fcbc4926a7505b4970e5ab7412defba5bea3..39ea6e2abd69af75c9c665eec820ed91f2616ffd 100644 (file)
@@ -793,6 +793,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    207,
 /**/
     206,
 /**/