home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.153 < prev    next >
Encoding:
Internet Message Format  |  2003-11-11  |  2.5 KB

  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. +             /* On MS-Windows locale names are strings like
  49. +              * "German_Germany.1252", but gettext expects "de".  Try
  50. +              * to translate one into another here for a few supported
  51. +              * languages. */
  52. +             for (i = 0; mtable[i] != NULL; i += 2)
  53. +             if (STRNICMP(mtable[i], name, STRLEN(mtable[i])) == 0)
  54. +             {
  55. +                 mname = mtable[i + 1];
  56. +                 break;
  57. +             }
  58. +             vim_setenv((char_u *)"LC_MESSAGES", mname);
  59. + #else
  60.               vim_setenv((char_u *)"LC_MESSAGES", name);
  61. + #endif
  62. +         }
  63.   
  64.           /* Set $LC_CTYPE, because it overrules $LANG, and
  65.            * gtk_set_locale() calls setlocale() again.  gnome_init()
  66. *** ../vim-6.2.152/src/version.c    Wed Nov 12 20:47:29 2003
  67. --- src/version.c    Wed Nov 12 20:49:12 2003
  68. ***************
  69. *** 639,640 ****
  70. --- 639,642 ----
  71.   {   /* Add new patch number below this line */
  72. + /**/
  73. +     153,
  74.   /**/
  75.  
  76. -- 
  77. hundred-and-one symptoms of being an internet addict:
  78. 8. You spend half of the plane trip with your laptop on your lap...and your
  79.    child in the overhead compartment.
  80.  
  81.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  82. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  83. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  84.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  85.