On Tuesday, April 8, 2014 10:57:37 AM UTC+2, [email protected] wrote: > > Hi there, > > I have created an incremental GWT generator that is creating an interface > derived from com.google.gwt.i18n.client.Constants. > The problem is that the source of the generation is some class that is a > representative for a resource bundle and I can not generate the Constants > interface with the same name but want it to honor the localized properties > with that base name. To make it clear, I have something like: > > some/package/MyBundle.java > some/package/MyBundle_de.properties > > From MyBundle.java my generator creates > some/package/MyBundleGwtINls.java > > like this: > > @Generate(format = "com.google.gwt.i18n.rebind.format.PropertiesFormat", > fileName = "MyBundle") > public interface MyBundleGwtNls extends Constants { > @DefaultStringValue("Reflective access for \"{accessible}\" failed!") > String errorAccessFailed(); > } > > Now due to fileName property of @Generate I would expect GWT to honor > MyBundle_de.properties located in the same package if it contains a > property errorAccessFailed with a German translation. > > Is my understanding of the JavaDoc of fileName() wrong? >
Yes. @Generate is about generating files from the interface (i.e. generating a properties file from the @DefaultStringValue and other annotations) > Is there any way to archive my goal with GWT I18N? > None that I know about. > Any other ideas? > Your generator could copy the properties files with the new name (MyBundle_de.properties → MyBundleGwtNls_de.properties) so that the Constants GWT generator could find them where it expects them. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
