Help:Extension:Translate/Group configuration/ha

There are many ways of adding message groups to Translate extension. Message groups are collection of messages. Usually they compare to one module in a software and one file (and usually one per language for translations). It is also possible to make groups that include messages from other message groups. For example there can be group that includes all messages in a given software. Groups can also include just subsets of messages, like the most important messages of MediaWiki that should be translated first. These higher level groups do not map directly to files in any particular format, but like all groups they can be exported in Gettext format for use in other translation tools.

Message groups are the high level blocks that translators interact with: to choose a message to work on they first need to select a group, unless they are using translation search. For each group we can gather statistics and each group has a unique identifier. Naturally, messages are the smallest blocks of text that translators translate one at a time. Each message also has an identifier, which is usually called a key. The key doesn't need to be unique across message groups.

Standard group configuration format
It is easy to add message groups using the YAML format. Duk abin da kuke buƙatar yi shine don ayyana filin suna kuma ƙara fayil ɗin sanyi zuwa ; duba shafin daidaitawa don ƙarin bayani. Misali:

Fayil ɗin kanta yana amfani da tsarin tsarin YAML. Ba a bayyana ma'anar kalmar a nan ba, amma yana da sauƙin koya, kuma duk rukunin da aka riga aka yi ana iya amfani da su azaman misalai. Ka tuna amfani da sarari maimakon shafuka don shigarwa. Kowane fayil na iya ayyana ƙungiyoyin saƙo da yawa. Kowane ma'anar rukuni yana rabu da layi mai dashes uku, wanda shine daidaitaccen mai raba takarda a cikin YAML.

An karya ma'anar zuwa ƴan manyan abubuwa: BASICFILESMANGLERVALIDATORSINSERTABLESTAGSAUTOLOADLANGUAGES da TEMPLATE na musamman. Wasu ƙungiyoyin al'ada na iya ƙara ƙarin abubuwan matakin sama. Ba duk ƙungiyoyi ne ke buƙatar ayyana su duka ba.

GASKIYA
Wannan sashe ya ƙunshi mahimman bayanai game da ƙungiyar, kamar id da suna na musamman. Jerin maɓallai masu yuwuwa (maɓallai na wajibi ana yiwa alama da *):

Misali:

FILES
Wannan sashe yana bayyana tsarin tsarin fayil da tsarin fayilolin saƙo don ƙungiyoyin nau'in FileBasedMessageGroup. Jerin maɓallai masu yuwuwa (maɓallai na wajibi ana yiwa alama da *):

The path variables are:

Example:

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

Example:

VALIDATORS
This section allows to define pre-defined or custom validators.

INSERTABLES
This section allows to define a class which suggests insertables or use pre-defined insertables. The classes can be autoloaded as described in the AUTOLOAD section.

TAGS
It is possible to assign tags to messages. Each tag takes list of message keys (after mangling). "*" can be used as wildcard. The following tags are supported:

Example:

AUTOLOAD
This item takes list of class names with filenames as values. This way custom classes can be bundled easily with your custom message groups. The path should be relative to the location of the group configuration file itself.

Example:

TEMPLATE
There is a handy shortcut if you are defining multiple similar message groups. To avoid repetition, have the first definition start with this key. You can use any other top-level keys as subkeys for this item. All other groups will use these definitions as default values. Each group can of course override the default value from the template.

Example:

GROUPS (for AggregateMessageGroup class)
This key only takes list of group ids this message group consists of.

Example:

Wildcards are supported. In this case the aggregate group will not recursively include itself even if it matches a pattern. Example:

Wildcards can be problematic if you have nested aggregate groups, because some groups can be included multiple times: both directly and via the included aggregate groups.

LANGUAGES
This key makes it possible to allow and disallow translation into specific languages for the group. Translation into disallowed languages will be blocked.

Allowed ("include") entries override any values in the disallowed ("exclude") list. If an allowed entry is  that means all languages are allowed. The allowed list is also optional.

Message groups for interface messages specific to your wiki
Example of message group for custom user interface of the wiki, for example for localized sidebar. Add the following code into your  and replace wikiname with something meaningful.

Shortcut for MediaWiki extensions
See units group for MediaWiki.