jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1316008?usp=email )

Change subject: doc: add :ext: Sphinx role linking to MediaWiki extensions
......................................................................

doc: add :ext: Sphinx role linking to MediaWiki extensions

Bug: T433111
Change-Id: Ie9878a9c28926733fd33b5eb1b5fd4ddba0ea649
---
M docs/conf.py
M pywikibot/family.py
M pywikibot/login.py
M pywikibot/proofreadpage.py
M pywikibot/site/_extensions.py
M scripts/coordinate_import.py
M scripts/illustrate_wikidata.py
7 files changed, 14 insertions(+), 18 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/docs/conf.py b/docs/conf.py
index e113e7c..df97871 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -496,6 +496,8 @@
 extlinks = {
     # MediaWiki API
     'api': ('https://www.mediawiki.org/wiki/API:%s', 'API:%s'),
+    # MediaWiki Extension
+    'ext': ('https://www.mediawiki.org/wiki/Extension:%s', 'Extension:%s'),
     # Python bug tracker
     'issue': ('https://github.com/python/cpython/issues/%s',
               'Python issue %s'),
diff --git a/pywikibot/family.py b/pywikibot/family.py
index 516e61f..365b0d9 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -252,7 +252,7 @@
     ldapDomain = ()
     """LDAP domain if your wiki uses LDAP authentication.

-    .. seealso:: https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2
+    .. seealso:: :ext:`LDAPAuthentication2`
     """

     crossnamespace: CrossnamespaceType = collections.defaultdict(dict)
diff --git a/pywikibot/login.py b/pywikibot/login.py
index 9ae59f6..c79acaa 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -371,8 +371,8 @@
     .. version-changed:: 10.2
        Secondary authentication via email was enabled.
     .. seealso::
-       - https://www.mediawiki.org/wiki/Extension:OATHAuth
-       - https://www.mediawiki.org/wiki/Extension:EmailAuth
+       - :ext:`OATHAuth`
+       - :ext:`EmailAuth`
     """

     _waituntil: datetime.datetime
diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index a3ebef4..c5c7b85 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -1101,9 +1101,8 @@

         .. note:: This method is called by initializer and should not be used.

-        .. seealso::
-           `ProofreadPage Index Pagination API
-           
<https://www.mediawiki.org/wiki/Extension:ProofreadPage/Index_pagination_API>`_
+        .. seealso:: :ext:`ProofreadPage Index Pagination API
+           <ProofreadPage/Index_pagination_API>`

         :meta public:
         """
diff --git a/pywikibot/site/_extensions.py b/pywikibot/site/_extensions.py
index e0ca075..f048be7 100644
--- a/pywikibot/site/_extensions.py
+++ b/pywikibot/site/_extensions.py
@@ -343,7 +343,7 @@
     ) -> Iterable[pywikibot.Page]:
         """Return a generator to pages containing linter errors.

-        .. seealso:: https://www.mediawiki.org/wiki/Extension:Linter
+        .. seealso:: :ext:`Linter`

         :param lint_categories: Categories of lint errors. Must be an
             iterable of lint categories, or a pipe-separated string of
@@ -446,10 +446,8 @@
         :return: The extract of the page.

         .. seealso::
-
-           - https://www.mediawiki.org/wiki/Extension:TextExtracts
-
-           - :meth:`page.BasePage.extract`.
+           - :ext:`TextExtracts`
+           - :meth:`page.BasePage.extract`
         """
         if not page.exists():
             raise NoPageError(page)
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py
index ed97b48..e71c9ac 100755
--- a/scripts/coordinate_import.py
+++ b/scripts/coordinate_import.py
@@ -14,10 +14,9 @@
 This will work on all pages in the category "coordinates not on Wikidata"
 and will import the coordinates on these pages to Wikidata.

-The data from the "GeoData" extension
-(https://www.mediawiki.org/wiki/Extension:GeoData)
-is used so that extension has to be setup properly. You can look at the
-[[Special:Nearby]] page on your local Wiki to see if it's populated.
+The data from the :ext:`"GeoData" extension<GeoData>` is used so that
+extension has to be setup properly. You can look at the [[Special:Nearby]]
+page on your local Wiki to see if it's populated.

 You can use any typical pagegenerator to provide with a list of pages:

diff --git a/scripts/illustrate_wikidata.py b/scripts/illustrate_wikidata.py
index 8bfd71a..6a36693 100755
--- a/scripts/illustrate_wikidata.py
+++ b/scripts/illustrate_wikidata.py
@@ -7,9 +7,7 @@
 """Bot to add images to Wikidata items.

 The image is extracted from the page_props. For this to be available the
-PageImages extension
-(https://www.mediawiki.org/wiki/Extension:PageImages) needs to be
-installed.
+:ext:`PageImages extension<PageImages>` needs to be installed.

 The following options are provided:


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1316008?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ie9878a9c28926733fd33b5eb1b5fd4ddba0ea649
Gerrit-Change-Number: 1316008
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to