views:

109

answers:

1

I've developed a GWT app using i18n internationalization. In Host/Dev mode it works fine, but launching GWT compile gives this error: No resource found for key xxx, like below.

Compiling module ...rte.RTE
   Scanning for additional dependencies: file:/home/.../client/i18n/RTEValidationMessages.java
      Computing all possible rebind results for '...client.i18n.RTEMessages'
         Rebinding ...client.i18n.RTEMessages
            Invoking com.google.gwt.dev.javac.StandardGeneratorContext@e7dfd0
               Processing interface ...client.i18n.RTEMessages
                  Generating method body for txtIndirizzo3()
                     [ERROR] No resource found for key 'txtIndirizzo3'

Messages are loaded with late binding.

public class RTEValidationMessages {
    private RTEMessages additionalMessages; 

    public RTEValidationMessages() {
        additionalMessages = GWT.create(RTEMessages.class);
    }
}

Deleting the method which gives the error, results in another random method with error, say not the method before or after in the interface ...client.i18n.RTEMessages.

Help is greatly appreciated.

+2  A: 

I had a similar error once when using internationalization. I had properties files for English and Polish languages: labels_en.properties and labels_pl.properties. The solution was to create also a file labels.properties (in my case it was just a copy of labels_en.properties). It is weird but somehow it helped.

You should also keep your properties files in the same package as your RTEMessages class.

Piotr