Loading ...
Sorry, an error occurred while loading the content.

Re: menutrans is broken

Expand Messages
  • Bram Moolenaar
    ... To also catch the language being ja_jp this could be used: if s:lang) =~ ^ a a$ |^ a a_ a a$ let s:lang = s:lang . . . &enc endif ... I think we
    Message 1 of 2 , Apr 29, 2004
    • 0 Attachment
      Taro Muaroka wrote:

      > > Wouldn't it be better to keep using v:lang, but add 'encoding' and add
      > > menu files that match this? Something like:
      > >
      > > if strlen(s:lang) == 2
      > > let s:lang = slang . "." . &enc
      > > endif
      >
      > Yes indeed.

      To also catch the language being "ja_jp" this could be used:

      if s:lang) =~ '^\a\a$\|^\a\a_\a\a$'
      let s:lang = s:lang . '.' . &enc
      endif

      > > Assuming s:lang is "ja" and 'encoding' is "cp932" the file name would be
      > > "menu_ja.cp932.vim".
      > >
      > > Main advantage is that we get uniform names for all systems and
      > > languages. The country is missing (as in "ja_jp"), but I don't see an
      > > example where that matters.
      >
      > How about this.
      >
      > 1. Create "menu_ja_jp.cp932.vim" instead of "menu_japanese...",
      > 2. and source it from "menu_ja.cp932.vim".
      >
      > It seems more reasonable, doesn't it?
      >
      > Attached files are updated Japanese menu. Please include into 6.3 beta.
      > If you dislike above idea, please rename "menu_ja_jp.cp932.vim" to
      > "menu_ja.cp932.vim".

      I think we should keep the menu_japanese... file and load it from
      menu_ja.cp932.vim and menu_ja_jp.cp932.vim. Then the only change is to
      include the two files that source the actual menu translations. That
      avoids the risk that a situation exists where s:lang is
      "japanese_japan.932" like before.

      --
      hundred-and-one symptoms of being an internet addict:
      62. If your doorbell rings, you think that new mail has arrived. And then
      you're disappointed that it's only someone at the door.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.