Open alferink opened 9 years ago
produced at my end..
when this bug will fix. please do it asap
Do you have the message keys and their translations in grails-app/i18n/message*.properties
? This asset pipeline plugin expects theses files where it takes the translations from.
My project structure is modularized, i have plugin in one module and messages* .properties in other module.
I'm sorry, but I have no knowledge how to obtain message files from other plugins. Thus, I cannot support this feature for now.
I found the solution.... Change messages*.properties location from I18nProcessor.groovy.
in process method- StringBuilder buf = new StringBuilder('[messages.properties location]')
works for me...
Would you please submit a piece of code?
This is the file(I18nProcessor.groovy)-
String process(String inputText, AssetFile assetFile) { AssetFile f = (AssetFile) assetFile Matcher m = f.name =~ /.(\w+).i18n$/ StringBuilder buf = new StringBuilder("modules/[module-name]/grails-app/i18n/messages") if (m) buf << '' << m.group(1) Properties props = loadMessages(buf.toString())
Hi,
how can i use java script message with arguments.
I have one plugin which contains a file grails-app/assets/javascripts/plugin-messages.i18n. The file plugin-messages.i18n contains severals messages keys. The translation is defined in a messages_de.properties.
Then I have a app with a file grails-app/assets/javascripts/messages_de.i18n with the content "@import plugin-messages.i18n"
A request to the url http://localhost:8080/app/assets/messages_de.js?compile=false return:
So the messages of the plugin is not translated. It only works if the messages are defined in the app.
The reason seems to be in I18nProcessor.groovy. In the process Method only the resource file from the current grails project is used. It would be probably necessary to iterate over all plugins.