Skip to content

Commit 68f1b1b

Browse files
committed
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)
1 parent cd96eef commit 68f1b1b

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

runtime/menu.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ if exists("v:lang") || &langmenu != ""
5656
let s:lang = substitute(s:lang, '\.[^.]*', "", "")
5757
exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim"
5858

59+
if !exists("did_menu_trans") && s:lang =~ '_'
60+
" If the language includes a region try matching without that region.
61+
" (e.g. find menu_de.vim if s:lang == de_DE).
62+
let langonly = substitute(s:lang, '_.*', "", "")
63+
exe "runtime! lang/menu_" . langonly . "[^a-z]*vim"
64+
endif
65+
5966
if !exists("did_menu_trans") && strlen($LANG) > 1 && s:lang !~ '^en_us'
6067
" On windows locale names are complicated, try using $LANG, it might
6168
" have been set by set_init_1(). But don't do this for "en" or "en_us".

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,8 @@ static char *(features[]) =
793793

794794
static int included_patches[] =
795795
{ /* Add new patch number below this line */
796+
/**/
797+
207,
796798
/**/
797799
206,
798800
/**/

0 commit comments

Comments
 (0)