如何从xcode调用xgettext [英] How do I invoke xgettext from xcode

查看:82
本文介绍了如何从xcode调用xgettext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GNU xgettext,Xcode在c ++中实现i18n到我的项目。



情况如下

I am implementing i18n to my project in c++ using GNU xgettext, Xcode.

The situation is as follows

FileOne.cpp

 void somefunction()
 { 
     string file = "fileName";
     loggerClass.addlog(gettext_args("some %s missing ", file));
 }
FileTwo.cpp

 void someOtherfunction()
 { 
     string doc = "docName";
     loggerClass.addlog(gettext_args("some %s missing ", doc));
 }
FileThree.cpp

std::string gettext_args()
{
    gettextWithArgs(const std::string& format, Args ...args);
    return string_format(gettext(format.c_str(), args…));
}





由于每个文件都没有显式的gettext()函数调用,我无法为单个文件调用xgettext(喜欢:xgettext -d FileOne -o FileOne.pot FileOne.cpp)这种情况。



我应该如何调用整个项目的xgettext(可能来自Xcode)?



谢谢



Since each file do not have explicit gettext() function call, I could not invoke xgettext for individual files (like: xgettext -d FileOne -o FileOne.pot FileOne.cpp) for this situation.

How should I invoke xgettext for a whole project (probably from Xcode)?

Thanks

推荐答案

您应该阅读 gettext的



使用msggrep获取目录。
You should read the documentation for gettext.

Use msggrep for fetching a directory.


这篇关于如何从xcode调用xgettext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆