Ecere SDK/eC Forums http://www.ecere.com/forums/ Print view |
|
在windows下测试gettext没成功 http://www.ecere.com/forums/viewtopic.php?f=30&t=149 |
Page 1 of 1 |
Author: | liqi98136 [ Thu Aug 18, 2011 5:26 am ] |
Post subject: | 在windows下测试gettext没成功 |
在windows下测试gettext没成功,我把过程写下来,看看问题出哪了. 下载安装包 install package download poedit 7z921.exe mingw tools libiconv-1.13.1-1-mingw32-dev.tar.lzma gettext-0.17-1-mingw32-dev.tar.lzma 解压到wingw 写程序 Code: Select all
new tab1 ////////// ecere0.44 tm tm@ecere.com Chinese UTF-8 utf-8 nplurals=2; plural=(n!=1); //////////// tab2 ///////// F:\work\temp . ////////// tab3 ///////// N_ ///////// save and open hello.po 修改 "Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=UTF-8\n" msgsid "this is a string\n" msgstr "这是一个字符串\n" 关闭poedit 将hello.mo放到程序目录下 languages/zh_CN/LC_MESSAGES/hello.mo |
Author: | liqi98136 [ Thu Aug 18, 2011 5:29 am ] |
Post subject: | Re: 在windows下测试gettext没成功 |
Poedit\bin\xgettext --keyword=N_ -o hello.po hello.ec 修改 "Content-Type: text/plain; charset=CHARSET\n" 为 "Content-Type: text/plain; charset=UTF-8\n" msgsid "this is a string\n" 增加 msgstr "这是一个字符串\n" Poedit\bin\msgfmt -o languages/zh_CN/LC_MESSAGES/hello.mo hello.po 失败 |
Author: | liqi98136 [ Thu Aug 18, 2011 5:33 am ] |
Post subject: | Re: 在windows下测试gettext没成功 |
不使用EcIDE Code: Select all
修改jian_gettext.po文符集改为UFT-8 翻译 msgstr "你好,GetText!\n" mkdir languages\zh_CN\LC_MESSAGES\ copy jian_gettext.mo languages\zh_CN\LC_MESSAGES\ gcc -Wall -o jian_gettext jian_gettext.c jian_gettext Hello,GetText! 失败 |
Author: | liqi98136 [ Thu Aug 18, 2011 5:38 am ] |
Post subject: | Re: 在windows下测试gettext没成功 |
收获 解压ecere_sdk 进入运行 dir *.ec /s /b >filelist.txt f:\poedit\bin\xgettext -a -f filelist.txt -o ecere.po -from-code=utf-8 将列表中Menu.ec去除,要不会出错 得到字符串列表 MYecere.po.7z |
All times are UTC-05:00 | Page 1 of 1 |
Powered by phpBB® Forum Software © phpBB Limited |