summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0207
blob: e6736dbcd6063a8bbfdff2732539b51a113a1d07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0207
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

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 -- Bram@Moolenaar.net -- 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    ///