Roo安装i18n

发布于 2024-11-07 02:03:30 字数 749 浏览 8 评论 0原文

当尝试创建 i18n 插件时:

roo > addon create i18n --topLevelPackage com.gilles.photos.addon --locale ic --messageBundle i18n/messages_ic.properties

我收到消息:

Command 'addon create i18n --topLevelPackage com.gilles.photos.addon --locale ic --messageBundle i18n/messages_ic.properties' was found but is not currently available (type 'help' then ENTER to learn about this command)

我尝试遵循这篇文章的建议: http://forum.springsource.org/showthread .php?101843-addon-create-i18n-does-not-work

这家伙的建议对我来说是不透明的。他说的是什么意思:

插件创建命令需要是 在空目录中运行

网络上没有明确的答案。

when trying to create a i18n addon :

roo > addon create i18n --topLevelPackage com.gilles.photos.addon --locale ic --messageBundle i18n/messages_ic.properties

I get the message :

Command 'addon create i18n --topLevelPackage com.gilles.photos.addon --locale ic --messageBundle i18n/messages_ic.properties' was found but is not currently available (type 'help' then ENTER to learn about this command)

I try to follow the recommandations of this post :
http://forum.springsource.org/showthread.php?101843-addon-create-i18n-does-not-work

The advices of the guy are opaque to me. What does he mean by :

The addon create commands need to be
run in an empty directory

There are no clear answer available on the web.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罪#恶を代价 2024-11-14 02:03:30

你到底想做什么?安装对给定语言的支持; use

web mvc install language --code it

其中 it 是语言的代码。 “Roo 目前支持六种语言,您可以为您选择的其他语言编写附加语言” - 截至 2011 年 2 月。您尝试的命令应该为尚未创建的语言创建附加语言支持。 (我不认为这是你的意图)

问题澄清后编辑:

参见 roo 文档,A.5.2 节。
你所要做的就是

  • 获取一个现有的 messages_xx.properties (查看 roo 源代码并在这里找到它们:..\addon-web-mvc-jsp\src\main\resources\org\springframework\roo\addon\web\mvc\ jsp\i18n\languages)
  • 从这些文件之一创建 _ic.properties。
  • 在空目录中创建一个名为 i18n 的子目录,将 messages_ic.properties 放置在那里,
  • 发出您尝试过的命令:addon create i18n --topLevelPackage foo.bar --locale ic --messageBundle i18n/messages_ic.properties

What are you exactly trying to do? To install support for a given language; use

web mvc install language --code it

Where it is the code of the language. "Roo currently support six languages, and you can write an add-on language for others of your choice" - as of February, 2011. The command you were trying is the one that's supposed to create an addon for a language which is not yet supported. (I don't think that's your intention)

EDIT after question clarification:

See roo documentation, section A.5.2.
What you have to do is

  • acquire an existing messages_xx.properties (checkout roo source and find them here: ..\addon-web-mvc-jsp\src\main\resources\org\springframework\roo\addon\web\mvc\jsp\i18n\languages)
  • from one of these files, create the _ic.properties.
  • crate a subdirectory called i18n in an empty directory, place messages_ic.properties there
  • issue the command you tried: addon create i18n --topLevelPackage foo.bar --locale ic --messageBundle i18n/messages_ic.properties
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文