Grails:如何收集所有消息 [英] Grails: how to collect all messages

查看:104
本文介绍了Grails:如何收集所有消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Grails的新手,并且继承了现有的应用程序。我有一个大文件 message.properties ,我想修剪它,以便移除不再使用的键。



在Django中有一个命令 makemessages ,它遍历所有的代码库并收集所有需要翻译的字符串,将它们添加到消息文件中并注释掉没有更长的存在。 Grails有类似的工具吗?如果有帮助,该项目基于版本1.3.9。 解决方案

没有这样的工具,但是您可以创建自己的脚本。看看获取Grails应用程序中使用的所有i18n属性列表并处理该列表。


I am new to Grails and I have inherited an existing application. I have a big file message.properties that I would like to prune, in order to remove keys that are no longer used.

In Django there is a command makemessages that goes through all codebase and collects all strings that need translation, adding them to the messages file and commenting out the entries that no longer exist. Is there a similar tool for Grails? If it helps, the project is based on verions 1.3.9.

解决方案

There is no such tool, but you can create your own gant script. Take a look at getting a list of all i18n properties used in a Grails application and process this list.

这篇关于Grails:如何收集所有消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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