Page History
...
- They are used for rule descriptions, which might be long and need HTML tags
- These files must be stored in the package "org.sonar.l10n.<plugin key>_<language>, for example "
- Starting with Sonar 2.15, the files should be stored in the package "org.sonar.l10n.
- <plugin key>_<language>.rules.<repository key>" (backward compatibility is ensured for l10n plugins which use the former location)
- The name of these files must be the key of the rule they translate
- E.g.Example: the French description of the Squid Architectural Constraint rule is "src/main/resources/org/sonar/i18n/squidjava_fr/ArchitecturalConstraint.html"
- Or, starting with Sonar 2.15: "src/main/resources/org/sonar/i18n/squidjava_fr/rules/squid/ArchitecturalConstraint.html" (as "squidjava" is the plugin key and "squid" the repository key)
Warning | ||
---|---|---|
| ||
In the Java API, properties files are supposed to be encoded in ISO-8859 charset. Without good tooling, this can be quite annoying to write translation for languages that do not fit in this charset. |
...
- Standard messages : org/sonar/l10n/<plugin key>_<language>.properties
- Rule descriptions :
- Up to Sonar 2.15: org/sonar/l10n/<plugin key>_<language>/*.html
- Since Sonar 2.15: org/sonar/l10n/<plugin key>_<language>/rules/<repository key>/*.html
The english bundle is mandatory. For example the plugin with key "technicaldebt" must define the following files in order to enable the french bundle :
...