简体   繁体   English

在Mac OS X Lion下使用getaven进行gettext蚀

[英]gettext under Mac OS X Lion for eclipse with maven

I have a Java project in Eclipse which builds with apache maven. 我在Eclipse中有一个Java项目,该项目使用apache maven构建。

The problem is that the project doesn´t compile correcly because of the gettext function missing. 问题在于,由于缺少gettext函数,该项目无法正确编译。

So I did some search and installed gettext as follows: 因此,我进行了一些搜索并安装了gettext,如下所示:

Download Gettext from : http://www.gnu.org/software/gettext/ 从以下位置下载Gettext: http ://www.gnu.org/software/gettext/

Run these commands 运行这些命令

tar -zxf gettext-0.18.1.1.tar.gz
cd  gettext-0.18.1.1

Then in the gettext-0.18.1.1 run these commands 然后在gettext-0.18.1.1中运行以下命令

./configure
 make
 sudo make install

Unfortunately this doesn´t solves my problem. 不幸的是,这不能解决我的问题。

I also found something about patching gettext on lion here: https://gist.github.com/1014218 But I don´t really understand what to do here and am not even sure if this would fix my problem. 我还在这里找到了有关在狮子上修补gettext的一些信息: https : //gist.github.com/1014218但是我不太了解在这里做什么,甚至不确定这是否能解决我的问题。

If I try to compile my project in the terminal with the command: 如果尝试使用以下命令在终端中编译项目:

§ maven compile

I get this warning: 我收到此警告:

[INFO] [gettext:dist {execution: convert-po-class}]
[INFO] Processing de/de.po
[WARNING] msgfmt --java2 -d /.../workspace/target/classes -r **.**.**.**.Translation -l de /.../workspace/po/de/de.po

(... and ** are for privacy reasons) (...和**是出于隐私原因)

(In Eclipse also changed the builder from java builder to maven. And if I try to run the project in eclipse and not in the terminal I get this Error: (在Eclipse中,也将生成器从Java生成器更改为maven。而且,如果我尝试在Eclipse中而不是在终端中运行项目,则会出现此错误:

 NoClassDefFoundError: org/xnap/commons/i18n/I18nFactory

)

Edit: I also found this link: http://code.google.com/p/rudix/source/detail?r=0e7c428f9609 编辑:我也找到了此链接: http : //code.google.com/p/rudix/source/detail?r=0e7c428f9609

But I can´t even find the documents there who I am told to change. 但是我什至找不到在那里被告知要更改的文档。

Please help 请帮忙

I18nFactory is a class from the gettext commons library, so you need to add it to your project's classpath/dependencies. I18nFactorygettext commons库中的一个类,因此您需要将其添加到项目的classpath / dependencies中。 You can find it here along some code snippets and a maven configuration example. 您可以在此处找到一些代码段和一个Maven配置示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM