]>
Commit | Line | Data |
---|---|---|
eb0ac1ae AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.153 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 6.2.153 | |
11 | Problem: Win32: ":lang german" doesn't use German messages. | |
12 | Solution: Add a table to translate the Win32 language names to two-letter | |
13 | language codes. | |
14 | Files: src/ex_cmds2.c | |
15 | ||
16 | ||
17 | *** ../vim-6.2.152/src/ex_cmds2.c Sun Nov 9 20:35:08 2003 | |
18 | --- src/ex_cmds2.c Mon Nov 10 10:25:20 2003 | |
19 | *************** | |
20 | *** 5477,5483 **** | |
21 | --- 5477,5521 ---- | |
22 | if (what == LC_ALL) | |
23 | vim_setenv((char_u *)"LANG", name); | |
24 | if (what != LC_CTYPE) | |
25 | + { | |
26 | + #ifdef WIN32 | |
27 | + char_u *mname = name; | |
28 | + int i; | |
29 | + static char *(mtable[]) = { | |
30 | + "afrikaans", "af", | |
31 | + "czech", "cs", | |
32 | + "german", "de", | |
33 | + "english_united kingdom", "en_gb", | |
34 | + "spanish", "es", | |
35 | + "french", "fr", | |
36 | + "italian", "it", | |
37 | + "japanese", "ja", | |
38 | + "korean", "ko", | |
39 | + "norwegian", "no", | |
40 | + "polish", "pl", | |
41 | + "russian", "ru", | |
42 | + "slovak", "sk", | |
43 | + "swedish", "sv", | |
44 | + "ukrainian", "uk", | |
45 | + "chinese_china", "zh_cn", | |
46 | + "chinese_taiwan", "zh_tw", | |
47 | + NULL}; | |
48 | + | |
49 | + /* On MS-Windows locale names are strings like | |
50 | + * "German_Germany.1252", but gettext expects "de". Try | |
51 | + * to translate one into another here for a few supported | |
52 | + * languages. */ | |
53 | + for (i = 0; mtable[i] != NULL; i += 2) | |
54 | + if (STRNICMP(mtable[i], name, STRLEN(mtable[i])) == 0) | |
55 | + { | |
56 | + mname = mtable[i + 1]; | |
57 | + break; | |
58 | + } | |
59 | + vim_setenv((char_u *)"LC_MESSAGES", mname); | |
60 | + #else | |
61 | vim_setenv((char_u *)"LC_MESSAGES", name); | |
62 | + #endif | |
63 | + } | |
64 | ||
65 | /* Set $LC_CTYPE, because it overrules $LANG, and | |
66 | * gtk_set_locale() calls setlocale() again. gnome_init() | |
67 | *** ../vim-6.2.152/src/version.c Wed Nov 12 20:47:29 2003 | |
68 | --- src/version.c Wed Nov 12 20:49:12 2003 | |
69 | *************** | |
70 | *** 639,640 **** | |
71 | --- 639,642 ---- | |
72 | { /* Add new patch number below this line */ | |
73 | + /**/ | |
74 | + 153, | |
75 | /**/ | |
76 | ||
77 | -- | |
78 | hundred-and-one symptoms of being an internet addict: | |
79 | 8. You spend half of the plane trip with your laptop on your lap...and your | |
80 | child in the overhead compartment. | |
81 | ||
82 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
83 | /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ | |
84 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
85 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |