Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Translations for the SonarQube TM Platform: making the SonarQube TM Platform available in a new language requires to develop and publish a new Language Pack plugin.
    • By default SonarQubeTM embeds default SonarQubeembeds the English Pack.
    • All other Language Pack plugins (like the French Pack plugin) are hosted in the Plugins Forge, are maintained by the community and are available through Update Center (category "Localization").
  • Translations for the SonarQube TM Community Plugins: open-source plugins of the SonarQube TM Community (hosted in the Plugins Forge) must embed only the bundles for the default locale. Translations will be done in the Language Pack plugins.

  • Translations for other Plugins: closed-source/commercial/independant plugins must embed the bundles for the default locale and the translations for every language they want to support.
Tip
titleTo sum up
  • SonarQube TM Platform and SonarQube TM Community Plugins rely on Language Pack plugins to get translations
  • Other independant SonarQube TM plugins embed by themselves all the translations they need

...

  • They are used for rule descriptions, which might be long and need HTML tags
  • These files must be stored in the org.sonar.l10n.<plugin key>_<language> package.
    • Starting with SonarQubeTM 3SonarQube3.0, the files should be stored in the org.sonar.l10n.<key of the plugin to translate>_<language>.rules.<repository key> package (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
  • Example: the French description of the Squid Architectural Constraint rule is src/main/resources/org/sonar/l10n/squidjava_fr/ArchitecturalConstraint.html
    • Or, starting with SonarQubeTM 3SonarQube3.0: src/main/resources/org/sonar/l10n/squidjava_fr/rules/squid/ArchitecturalConstraint.html (as squidjava is the plugin key and squid the repository key)

...

A Language Pack defines bundles for the SonarQubeTM Platform SonarQubePlatform and for the SonarQube TM Community plugins.

Creating a new Language Pack

...

This part applies if you are developing a commercial / closed-source plugin, or an open-source plugin that is not part of the SonarSonarQube TM Community Plugins.

Such plugins must embed their own bundles. Bundles must be added to src/main/resources with the following convention names :

  • Standard messages : org/sonar/l10n/<plugin key>_<language>.properties
  • Rule descriptions :
    • Up to SonarSonarQubeTM 3SonarSonarQube3.0: org/sonar/l10n/<plugin key>_<language>/*.html
    • Since SonarSonarQube TM 3.0: org/sonar/l10n/<plugin key>_<language>/rules/<repository key>/*.html

...