summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/src/TranslatorInterface/Aid/MessageDefinitionAid.php')
-rw-r--r--MLEB/Translate/src/TranslatorInterface/Aid/MessageDefinitionAid.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/MLEB/Translate/src/TranslatorInterface/Aid/MessageDefinitionAid.php b/MLEB/Translate/src/TranslatorInterface/Aid/MessageDefinitionAid.php
new file mode 100644
index 00000000..070ed297
--- /dev/null
+++ b/MLEB/Translate/src/TranslatorInterface/Aid/MessageDefinitionAid.php
@@ -0,0 +1,23 @@
+<?php
+declare( strict_types = 1 );
+
+namespace MediaWiki\Extension\Translate\TranslatorInterface\Aid;
+
+/**
+ * Translation aid that provides the message definition.
+ * This usually matches the content of the page ns:key/source_language.
+ * @ingroup TranslationAids
+ * @author Niklas Laxström
+ * @license GPL-2.0-or-later
+ * @since 2013-01-01
+ */
+class MessageDefinitionAid extends TranslationAid {
+ public function getData(): array {
+ $language = $this->group->getSourceLanguage();
+
+ return [
+ 'value' => $this->dataProvider->getDefinition(),
+ 'language' => $language,
+ ];
+ }
+}