Skip to content

Commit b44b7ad

Browse files
committed
patch 8.1.1089: tutor does not check $LC_MESSAGES
Problem: Tutor does not check $LC_MESSAGES. Solution: Let $LC_MESSAGES overrule $LANG. (Miklos Vajna, closes #4112)
1 parent 9e1e358 commit b44b7ad

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

runtime/tutor/tutor.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim tutor support file
22
" Author: Eduardo F. Amatria <[email protected]>
33
" Maintainer: Bram Moolenaar
4-
" Last Change: 2018 Apr 11
4+
" Last Change: 2019 Mar 30
55

66
" This Vim script is used for detecting if a translation of the
77
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
@@ -22,6 +22,12 @@ else
2222
let s:lang = v:lang
2323
elseif $LC_ALL =~ '\a\a'
2424
let s:lang = $LC_ALL
25+
elseif $LC_MESSAGES =~ '\a\a' || $LC_MESSAGES ==# "C"
26+
" LC_MESSAGES=C can be used to explicitly ask for English messages while
27+
" keeping LANG non-English; don't set s:lang then.
28+
if $LC_MESSAGES =~ '\a\a'
29+
let s:lang = $LC_MESSAGES
30+
endif
2531
elseif $LANG =~ '\a\a'
2632
let s:lang = $LANG
2733
endif

src/version.c

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

776776
static int included_patches[] =
777777
{ /* Add new patch number below this line */
778+
/**/
779+
1089,
778780
/**/
779781
1088,
780782
/**/

0 commit comments

Comments
 (0)