diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-07-23 05:10:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-07-23 05:10:14 +0200 |
commit | 68f1b1b37fa7aba985d9f8727fd9f0f3eb0c19a9 (patch) | |
tree | b74555f46b67245166de25483f3754d2e933d32f /runtime/menu.vim | |
parent | cd96eef3a869557bd3d2d4497861d87cb525db06 (diff) | |
download | vim-git-68f1b1b37fa7aba985d9f8727fd9f0f3eb0c19a9.tar.gz |
patch 8.1.0207: need many menu translation files to cover regionsv8.1.0207
Problem: Need many menu translation files to cover regions.
Solution: When there is no region match, try without. (Christian Brabandt)
Diffstat (limited to 'runtime/menu.vim')
-rw-r--r-- | runtime/menu.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/menu.vim b/runtime/menu.vim index b9bd3d89c..b4c59dd92 100644 --- 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". |