Unicornisaurous has uploaded a new change for review.
https://gerrit.wikimedia.org/r/180590
Change subject: Convert API module to use i18n help/documentation.
......................................................................
Convert API module to use i18n help/documentation.
Note that there was previously no parameter documentation, so some was made
from scratch as well.
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.
Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.
Bug: T76890
Change-Id: Id6ddbb0491dd1c095c5f0d8c6d6be21684508d0b
---
M ApiSaveDrafts.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 28 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Drafts
refs/changes/90/180590/1
diff --git a/ApiSaveDrafts.php b/ApiSaveDrafts.php
index 6a9fc03..f567b55 100644
--- a/ApiSaveDrafts.php
+++ b/ApiSaveDrafts.php
@@ -36,6 +36,9 @@
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getDescription() {
return 'Save a draft';
}
diff --git a/i18n/en.json b/i18n/en.json
index f61ee8a..c22d827 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -24,5 +24,16 @@
"drafts-enable": "Enable feature to save a draft in edit form",
"prefs-extension-drafts": "Drafts",
"tooltip-drafts-save": "Save as a draft",
- "accesskey-drafts-save": "g"
-}
\ No newline at end of file
+ "accesskey-drafts-save": "g",
+ "apihelp-savedrafts-description": "Save a draft.",
+ "apihelp-savedrafts-param-id": "The id of the draft.",
+ "apihelp-savedrafts-param-drafttoken": "Draft token.",
+ "apihelp-savedrafts-param-title": "Draft title.",
+ "apihelp-savedrafts-param-section": "Index of the section of the page
being edited.",
+ "apihelp-savedrafts-param-starttime": "The start time of the draft.",
+ "apihelp-savedrafts-param-edittime": "The edit time of the draft.",
+ "apihelp-savedrafts-param-scrolltop": "The scrollTop of the text box.",
+ "apihelp-savedrafts-param-text": "Draft text.",
+ "apihelp-savedrafts-param-summary": "Draft summary.",
+ "apihelp-savedrafts-param-minoredit": "Boolean representing weather the
draft is a minor edit."
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 1fc70ef..4fd1294 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -29,5 +29,16 @@
"drafts-enable": "Preferences, if user wants to enable this tool or
not, checked means that yes",
"prefs-extension-drafts": "{{Identical|Draft}}",
"tooltip-drafts-save": "Used as tooltip for the button
{{msg-mw|Drafts-save-save}}.",
- "accesskey-drafts-save": "{{doc-accesskey}}"
+ "accesskey-drafts-save": "{{doc-accesskey}}",
+ "apihelp-savedrafts-description":
"{{doc-apihelp-description|savedrafts}}",
+ "apihelp-savedrafts-param-id": "{{doc-apihelp-param|savedrafts|id}}",
+ "apihelp-savedrafts-param-drafttoken":
"{{doc-apihelp-param|savedrafts|drafttoken}}",
+ "apihelp-savedrafts-param-title":
"{{doc-apihelp-param|savedrafts|title}}",
+ "apihelp-savedrafts-param-section":
"{{doc-apihelp-param|savedrafts|section}}",
+ "apihelp-savedrafts-param-starttime":
"{{doc-apihelp-param|savedrafts|starttime}}",
+ "apihelp-savedrafts-param-edittime":
"{{doc-apihelp-param|savedrafts|edittime}}",
+ "apihelp-savedrafts-param-scrolltop":
"{{doc-apihelp-param|savedrafts|scrolltop}}",
+ "apihelp-savedrafts-param-text":
"{{doc-apihelp-param|savedrafts|text}}",
+ "apihelp-savedrafts-param-summary":
"{{doc-apihelp-param|savedrafts|summary}}",
+ "apihelp-savedrafts-param-minoredit":
"{{doc-apihelp-param|savedrafts|minoredit}}"
}
--
To view, visit https://gerrit.wikimedia.org/r/180590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6ddbb0491dd1c095c5f0d8c6d6be21684508d0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Drafts
Gerrit-Branch: master
Gerrit-Owner: Unicornisaurous <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits