Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MessageGroup.php
Go to the documentation of this file.
1<?php
12use MediaWiki\Context\IContextSource;
16use MediaWiki\Linker\LinkTarget;
17
28interface MessageGroup {
33 public function getId();
34
42 public function getLabel( ?IContextSource $context = null );
43
51 public function getDescription( ?IContextSource $context = null );
52
59 public function getIcon();
60
65 public function getNamespace();
66
72 public function isMeta();
73
80 public function exists();
81
86 public function getValidator();
87
93 public function getMangler();
94
101 public function initCollection( $code );
102
111 public function load( $code );
112
117 public function getDefinitions();
118
124 public function getKeys();
125
132 public function getTags( $type = null );
133
141 public function getMessage( $key, $code );
142
147 public function getSourceLanguage();
148
153 public function getMessageGroupStates();
154
160 public function getTranslatableLanguages();
161
167 public function getSupportConfig(): ?array;
168
170 public function getRelatedPage(): ?LinkTarget;
171}
This file contains the class for core message collections implementation.
Message validator is used to run validators to find common mistakes so that translators can fix them ...
Interface for message groups.
getDescription(?IContextSource $context=null)
Returns a longer description about the group.
getMangler()
Return a message mangler or null.
getTranslatableLanguages()
Get all the translatable languages for a group, considering the inclusion and exclusion list.
initCollection( $code)
Initialises a message collection with the given language code, message definitions and message tags.
getIcon()
Returns an icon for this message group if any.
exists()
If this function returns false, the message group is ignored and treated like it would not be configu...
getTags( $type=null)
Returns message tags.
getRelatedPage()
Returns the page where the messages in the group are defined.
getNamespace()
Returns the namespace where messages are placed.
getSourceLanguage()
Returns language code depicting the language of source text.
getId()
Returns the unique identifier for this group.
getKeys()
Shortcut for array_keys( getDefinitions() ) that can be optimized by the implementing classes.
load( $code)
Returns a list of messages in a given language code.
getMessage( $key, $code)
Returns the definition or translation for given message key in given language code.
getValidator()
Returns a message validator object or null.
getSupportConfig()
Gets support URL defined for the group if any.
getDefinitions()
Shortcut for load( getSourceLanguage() ).
getLabel(?IContextSource $context=null)
Returns the human readable label (as plain text).
getMessageGroupStates()
Get the message group workflow state configuration.