From: Alecs K. <al...@pe...> - 2004-07-17 21:56:09
|
On Sat, Jul 17, 2004 at 01:26:37PM +0100, Simon Liang wrote: > > > > I just thought this question the other day before. :h translated shows, > > "The 'helplang' option can be set to the preferred language(s). The > > default is set according to the environment." > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > So maybe we shouldnt set it explicitly in our script. But seems under > > zh_CN.XXX locale, helplang is set to 'zh' instead of 'cn'. > > > > What's it on your systems, pals? Is this a Vim bug? > > 'zh'. I suppose if we make a link from 'tags-cn' to 'tags-zh', things > would work. But it is not ideal. The reason why 'cn' is used is to > allow a future translation work from 'tw'. Yes, from your forwarded mail, Bram said he'd use 'cn' for tags naming. I just took a look at the Vim source code, did some grep and found what possibly caused this bug: vim63/src/options.c: around the line 3161: ------------------------------------------------------------------ #if defined(FEAT_MULTI_LANG) || defined(PROTO) /* * When 'helplang' is still at its default value, set it to "lang". * Only the first ___TWO___ characters of "lang" are used. */ ^^^^^^^^^ void set_helplang_default(lang) char_u *lang; { int idx; if (lang == NULL || STRLEN(lang) < 2) /* safety check */ return; idx = findoption((char_u *)"hlg"); if (!(options[idx].flags & P_WAS_SET)) { if (options[idx].flags & P_ALLOCED) free_string_option(p_hlg); p_hlg = vim_strsave(lang); if (p_hlg == NULL) p_hlg = empty_option; else p_hlg[2] = NUL; options[idx].flags |= P_ALLOCED; } } #endif ------------------------------------------------------------------ Easy to apply a dirty patch. But lets wait and see what Bram would say about this. Thanks & Regards, -- Alecs King |