查看: 11410|回复: 10

wireshark界面汉化问题 求助大虾

[复制链接]
发表于 2010-2-1 00:20:04 | 显示全部楼层 |阅读模式
我是直接用vs2008打开源代码将英文改为中文  然后保存为utf8格式  大部分都让我弄过去了  可是现在碰到一个问题  在汉化菜单栏时  将英文转成中文时  中文字有限制  其中的规律也找不出来  具体代码如下:
/* main menu */
static GtkItemFactoryEntry menu_items[] =
{
    {"/_F文件", NULL, NULL, 0, " <Branch>", NULL,},
    {"/F文件/打开...", " <control>O", GTK_MENU_FUNC(file_open_cmd_cb),
                            0, " <StockItem>", GTK_STOCK_OPEN,},
    {"/F文件/打开近期访问过的文件", NULL, NULL, 0, " <Branch>", NULL,},
    {"/F文件/合并...", NULL,GTK_MENU_FUNC(file_merge_cmd_cb), 0, NULL, NULL,},
    {"/F文件/关闭", " <control>W", GTK_MENU_FUNC(file_close_cmd_cb),
                            0, " <StockItem>", GTK_STOCK_CLOSE,},
    {"/F文件/ <separator>", NULL, NULL, 0, " <Separator>", NULL,},
    {"/F文件/保存", " <control>S", GTK_MENU_FUNC(file_save_cmd_cb),
                            0, " <StockItem>", GTK_STOCK_SAVE,},
    {"/F文件/另存...", " <shift> <control>S", GTK_MENU_FUNC(file_save_as_cmd_cb),
                            0, " <StockItem>", GTK_STOCK_SAVE_AS,},
   
这是一部分的代码  就像上面显示的最后一行  本来是想写"/F文件/另存为...",    可是这样编译就会有错误  改成上面那样就编译通过了  生成正确的.exe文件了

GtkItemFactoryEntry的函数如下:
struct _GtkItemFactoryEntry
{
  gchar *path;
  gchar *accelerator;

  GtkItemFactoryCallback callback;
  guint                        callback_action;

  /* possible values:
  * NULL                -> " <Item>"
  * ""                        -> " <Item>"
  * " <Title>"                -> create a title item
  * " <Item>"                -> create a simple item
  * " <ImageItem>"        -> create an item holding an image
  * " <StockItem>"        -> create an item holding a stock image
  * " <CheckItem>"        -> create a check item
  * " <ToggleItem>"        -> create a toggle item
  * " <RadioItem>"        -> create a radio item
  * <path>                -> path of a radio item to link against
  * " <Separator>"        -> create a separator
  * " <Tearoff>"        -> create a tearoff separator
  * " <Branch>"                -> create an item to hold sub items
  * " <LastBranch>"        -> create a right justified item to hold sub items
  */
  gchar                *item_type;

  /* Extra data for some item types:
  *  ImageItem  -> pointer to inlined pixbuf stream
  *  StockItem  -> name of stock item
  */
  gconstpointer extra_data;
};

小弟我都弄了好几天了  哎~~头都打死了  希望各位大虾帮帮小弟了  谢谢~~
后来又调试了下  确定不是字节数的问题  因为我在save as后面加n个字母它都编译的过去 而且一切正常   伤心了现在   啥都试过了   那些专门的汉化的办法  软件我大部分都试过了  e~~没一个能成功的  希望各位大大帮帮小弟了啊
回复

使用道具 举报

发表于 2010-2-1 07:28:19 | 显示全部楼层
找个程序员 看看
回复

使用道具 举报

发表于 2010-3-10 16:14:28 | 显示全部楼层
楼主加油,非常期待汉化版的出现,哈哈
回复

使用道具 举报

发表于 2011-6-9 22:12:50 | 显示全部楼层
这个工具最新版本是什么?
回复

使用道具 举报

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

本版积分规则

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