资 源 简 介
We had a problem, that we had to search for all i18n texts for translation during development of applications in grails. Developer must either each text immediately write down into the properties file, or he must search all texts for translation later. Both possibilities are uncomfortable.
In order to solve this problem, we developed an utility that can parse groovy source files (currently .gsp, .groovy) and list all used i18n texts.
Use the class cz.bsa.soft.i18nparser.I18nPropertiesParser to retrieve set of used i18n properties in your source file:
```
Set properties = I18nPropertiesParser.getI18nProperties("somefile.gsp");
for(I18nProperty property: properties){
System.out.println(property.code + " (" + property.defaultValue + ")");
}
```