I18N Resource Bundle Conventions
- Extract the archive, and copy the contents to the eclipse/plugins folder.
- Restart eclipse
- Go to Preferences > Resource Bundle Editor > Formatting and set:
- "Show Generated By... header comment" to false
- "Convert unicode values to \uXXXX" to false
- "Align equal signs" to false
- "Group keys" to false
- "Keep properties with empty values" to false
- In Preferences > General > Editors > File Associations, select the *.properties content type, and set the ResourceBundle Editor as default
- keys are separated by dots (.) that separate phrases (do not use dots in: this.should.not.have.dots)
- words in phrases inside key names should be camel cased or concatenated
All formats of keys have a part of the syntax where the purpose of the key is specified, this determines unanbiguously where that key is to be used. The purposes are at the moment:
- link - used in url text
- button - used button text
- title - used in headings or anything equivalent in purpose
- label - used in form fields or table column headers
- message.feedback - status message indicating the result of some operation
- message.warning - warning message produced by some operation
- message.error - error message produced by some operation
- message.exception -
- message.help - help text, information boxes, etc.
Domain Slot Keys
The class is striped out of the package up to the domain part, that is, net.sourceforge.fenixedu.domain.accounting.Receipt becomes accounting.Receipt
Portal Specific Keys
The functionality is the path of the key in the interface, with the portal string stripped out as the resource bundle will have that name (specified ahead).
Resource Bundle Files
- Each portal should have its own Resource Bundle, these are portal specific resource files and should only contain portal specific keys
- Generic keys are stored in a common Resource Bundle
- Domain model slot keys
This will likely be a big one, if later we think its wise we can split the domain keys into the packages, for example [..].domain.accounting.Receipt would have its keys in a DomainAccountingResources_<Language>.properties.
A given source file, like a jsp, a xml, or a java file, should have access, at most, to the common resources, to the domain resources and to the resource bundle of the corresponding portal, never will a source file have access to a resource bundle of another portal.