From: Simon L. <wzh...@sp...> - 2004-07-19 10:48:49
|
On Sat, 17 Jul 2004 16:02:50 +0200, "Bram Moolenaar" <Br...@mo...> said: > > Simon - > > > I have a question about the translated-help system. > > One of our developer discovered this: if the system locale is set to > > zh_CN.???, Vim will automatically detect it and set the 'helplang' > > option to 'zh'. However, as we discussed before, the "vimcdoc" > > project will use 'cn' as an extention value. So the result is that > > the automatic detection will not work. The solution (my guess) > > would be either: > > a. change "vimcdoc" to use 'zh' or make a link between 'tags-cn' > > and 'tags-zh'. > > or: > > b. change the automatic detection in Vim. > > > > I'd like to hear your opinion on this. > > Right, the default is not set according to our own ideas. > > This patch should make it work as intended: > > *** option.c~ Tue Jul 13 10:49:57 2004 > --- option.c Sat Jul 17 16:00:33 2004 > *************** > *** 3237,3243 **** > --- 3237,3251 ---- > if (p_hlg == NULL) > p_hlg = empty_option; > else > + { > + /* zh_CN becomes "cn", zh_TW becomes "tw". */ > + if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5) > + { > + p_hlg[0] = TOLOWER_ASC(p_hlg[3]); > + p_hlg[1] = TOLOWER_ASC(p_hlg[4]); > + } > p_hlg[2] = NUL; > + } > options[idx].flags |= P_ALLOCED; > } > } > > > - Bram > > -- > hundred-and-one symptoms of being an internet addict: > 26. You check your mail. It says "no new messages." So you check it > again. > > /// Bram Moolenaar -- Br...@Mo... -- 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 > /// -- Simon Liang wzh...@sp... |