Help:Extension:Translate/Group configuration

There are many ways of adding message groups to Translate extension. The intention is to migrate everything to new format based on Yaml formatted files. About half of the premade groups are already using yaml configuration.



Standard group configuration format
It's very easy to add message groups using the new standard format. All you have to is to add a file into, see Help:Extension:Translate/Configuration.

The files itself use the Yaml syntax. The syntax itself is not described here, but it's easy to learn and you can use all the premade groups as examples. Remember to use spaces instead of tabs for indentation. Each file can define multiple message groups. Each group definition is separated by line with three dashes, which is the standard document separator in Yaml.

Definitions are broken into few top-level items: BASIC, FILES, MANGLER, CHECKER, TAGS, AUTOLOAD. Some custom groups may add more top-level items. Not all groups need to define all of them.

BASIC
This section contains basic information about the group, like unique id and name. List of possible keys (mandatory keys are marked with *):

FILES
This section describes the filesystem layout and format of message files for groups of type FileBasedMessageGroup. List of possible keys (mandatory keys are marked with *):

The path variables are:

MANGLER
Mangler is a way to mungle message keys to avoid conflicting message keys in multiple groups:

CHECKER
Checkers run checks on the translated messages. If they find problems, those translations are highlighted for translators.

Example: CHECKER: class: ShapadoMessageChecker checks: - ShapadoVariablesCheck

TAGS
You can assign tags to messages. Each tag takes list of message keys (after mangling). You can use * as wildcard. The following tags are supported:

Example: TAGS: optional: - lang_locale - lang_dir ignored: - charset

AUTOLOAD
This item takes list of class names with filenames as values. This way you can bundle custom classes easily with your own message groups. The path should be relative to the location of the group configuration file itself. Example: AUTOLOAD: ShapadoMessageChecker: Checker.php