LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: yafeng

请教:关于LXDE组件的中文问题

[复制链接]
发表于 2009-9-25 22:26:09 | 显示全部楼层
确认偶这里 LANGUAGE 对 vim 起作用,确认 gvim 使用了 gettext:
编译时没有使用 --disable-nls, 另 gvim --version
  1. $ LANG= LC_ALL= gvim --version
  2. Compiled by root@localhost
  3. Normal version with GTK2 GUI.  Features included (+) or not (-):
  4. -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent
  5. +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
  6. +cryptv -cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic
  7. -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path
  8. +folding -footer +fork() [color="Red"]+gettext[/color] -hangul_input +iconv +insert_expand +jumplist
  9. -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
  10. +mksession +modify_fname +mouse +mouseshape -mouse_dec +mouse_gpm
  11. -mouse_jsbterm -mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
  12. +netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile
  13. -python +quickfix +reltime -rightleft -ruby +scrollbind +signs +smartindent
  14. -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
  15. -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar
  16. +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
  17. +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact
  18. +xterm_clipboard -xterm_save
  19.    system vimrc file: "/etc/vimrc"
  20.      user vimrc file: "$HOME/.vimrc"
  21.       user exrc file: "$HOME/.exrc"
  22.   system gvimrc file: "$VIM/gvimrc"
  23.     user gvimrc file: "$HOME/.gvimrc"
  24.     system menu file: "$VIMRUNTIME/menu.vim"
  25.   fall-back for $VIM: "/usr/share/vim"
  26. Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12     -g -O2        
  27. Linking: gcc   -L/usr/local/lib -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lXt -lncurses -lgpm
复制代码


确认 gnome 系软件包国际化不使用 gettext,LANGUAGE 无影响。
确认纯正 gtk 软件国际化,需要 gettext,LANGUAGE 有效,如 transmission,gvim 是特例。

另,debian lenny 默认不设置 LANGUAGE,执行 locale 也无输出;
但设置 LANGUAGE 后,执行 locale 有输出;
ubuntu 应是使用 debian glibc 补丁并默认设置该变量。
http://patch-tracker.debian.org/ ... print-LANGUAGE.diff
  1. Comments tell that LANG has to be the first value, and LC_ALL the last
  2. one.  Thus LANGUAGE is printed between them.

  3. # DP: Dpatch author: Denis Barbier
  4. # DP: Patch author: Denis Barbier
  5. # DP: Upstream status: not submitted
  6. # DP: Date: 2006-01-08

  7. Index: locale/programs/locale.c
  8. ===================================================================
  9. --- locale/programs/locale.c.orig        2007-10-23 08:46:19.000000000 -0400
  10. +++ locale/programs/locale.c        2007-10-23 08:47:08.000000000 -0400
  11. @@ -752,6 +752,7 @@
  12. {
  13.    size_t cat_no;
  14.    const char *lcall = getenv ("LC_ALL");
  15. +  const char *language = getenv ("LANGUAGE");
  16.    const char *lang = getenv ("LANG") ? : "";

  17.    auto void get_source (const char *name);
  18. @@ -770,6 +771,9 @@
  19.    /* LANG has to be the first value.  */
  20.    printf ("LANG=%s\n", lang);

  21. +  if (language != NULL && getenv ("POSIXLY_CORRECT") == NULL)
  22. +    printf ("LANGUAGE=%s\n", language);
  23. +
  24.    /* Now all categories in an unspecified order.  */
  25.    for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
  26.      if (cat_no != LC_ALL)
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表