I'm working on open-sourcing an annotation-based solution for externalizing messages. I hope this is an opportunity to get some quick feedback. Please let me know if I'm out-of-line.
Example Workflow: Create an interface to hold messages. Annotate the methods with the text of the default translation. If the message has arguments, add the appropriate method arguments. Add any comments you wish to the methods. For example, you can help the translators by adding some context. During the generate-resources phase, a Maven plugin generates all the resource files. The message keys are the method signatures and the default translations come from the annotations. The javadoc comments from each method are added to the properties file above each entry. For those coding to the message interfaces, a factory serves up proxy impls. Those coding in IDEs get autocomplete and popup javadoc. ------------------------------------- The pattern isn't unprecedented, GWT has something similar [1]. Thoughts? Luke [1] http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/i18n/client/Messages.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
