Ecere SDK/eC Forums http://ecere.org/community/ Print view |
|
project documentor using tools of gettext translate en to cn http://ecere.org/community/viewtopic.php?f=30&t=172 |
Page 1 of 1 |
Author: | liqi98136 [ Sun Aug 28, 2011 7:57 am ] |
Post subject: | project documentor using tools of gettext translate en to cn |
project documentor using tools of gettext translate en to cn 利用gettext工具翻译项目documentor 主文件加 Documentor.ec Code: Select all
Code: Select all
SettingsDialog.ec Code: Select all
然后利用poedit翻译生成po和mo文件,放到指定位置 |
Author: | liqi98136 [ Sun Aug 28, 2011 8:03 am ] |
Post subject: | Re: project documentor using tools of gettext translate en t |
问题question 1.为什么主界面不能翻译成中文呢? mainform cannot be translated into chinese. 2.还有就是static char * 不让替换replace show error:initializer element is not constant 提示错误: eC Shared Library files (*.dll, *.so, *.dylib) 不让改为not modify _(eC Shared Library files (*.dll, *.so, *.dylib)) |
Author: | liqi98136 [ Sun Aug 28, 2011 9:07 am ] |
Post subject: | Re: project documentor using tools of gettext translate en t |
first question is done.第一个问题已经解决 与Ecgettext eclanguage { }; 定义和执行的位置有关,要放在最前面定义和执行就可以了.成功! |
Author: | jerome [ Sun Aug 28, 2011 4:22 pm ] |
Post subject: | Re: project documentor using tools of gettext translate en t |
Dear liqi, I've just implemented some i18n support in the eC compiler! Checkout this commit: https://github.com/ecere/sdk/commit/e78 ... 5d94ab3362 Please pull and rebuild the latest sources of the SDK. The syntax for localizable strings is: $"string". No other modification to the source code is required, all the initialization is automated by the symbol loader generator (ecs). A .pot file is automatically generated inside the object directory (e.g. documentor/obj/debug.win32/documentor.pot). I've cleaned up the localizable strings in your localized documentor source, ideally non-localizable strings should not have $ in front. I have then updated your .po file through Poedit, using the 'Update from pot file' feature. Only localizable strings remain. The resulting documentor.po has been committed to the documentor source. As for changing environment variables for testing purposes, I have recently fixed the environment variables support in the IDE, so you can use that to set the language to Chinese, in Project / Settings / Workspace (e.g. LANGUAGE / zh_CN) I'm hoping this will make it easy to integrate all your localization work of the Ecere SDK to our main source base on git Thank you for your contributions! All the best, Jerome |
Author: | liqi98136 [ Sun Aug 28, 2011 5:59 pm ] |
Post subject: | Re: project documentor using tools of gettext translate en t |
Great:-). That is just my want. |
Author: | jerome [ Sun Aug 28, 2011 10:22 pm ] |
Post subject: | Re: project documentor using tools of gettext translate en t |
liqi, The remaining problem is that 'locale' is a relative path, and so installed executables cannot find the localization data... I think the way forward will be to build our own gettext function within the Ecere library, that understands the .mo format. This way it can read files embedded within the executable/libraries files (project resources) and the localization data can be embedded. Also it removes the need for an extra requirement of the libintl library. I hope to implement this this coming week =) Cheers, Jerome |
All times are UTC-05:00 | Page 1 of 1 |
Powered by phpBB® Forum Software © phpBB Limited |