# HG changeset patch # User Christian Brabandt # Date 1532315704 -7200 # Node ID 696794fe4bce6f4e9f94f7db8b4a4871cf19c102 # Parent 6f01954c86e54e62328590d95ac405eb1441374e patch 8.1.0207: need many menu translation files to cover regions commit https://github.com/vim/vim/commit/68f1b1b37fa7aba985d9f8727fd9f0f3eb0c19a9 Author: Bram Moolenaar Date: Mon Jul 23 05:10:14 2018 +0200 patch 8.1.0207: need many menu translation files to cover regions Problem: Need many menu translation files to cover regions. Solution: When there is no region match, try without. (Christian Brabandt) diff --git a/runtime/menu.vim b/runtime/menu.vim --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -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". diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -794,6 +794,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 207, +/**/ 206, /**/ 205,