jenkins-bot has submitted this change and it was merged.

Change subject: WikibaseRepository: updating long technical strings
......................................................................


WikibaseRepository: updating long technical strings

Bug: T41259
Change-Id: Ia7178a3f73510b27f3fd59ac25f1ae21b7ae55b4
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/specials/SpecialItemByTitle.php
M repo/includes/specials/SpecialItemDisambiguation.php
4 files changed, 12 insertions(+), 10 deletions(-)

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



diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 3112163..127d086 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -132,7 +132,7 @@
        "wikibase-itembytitle-lookup-site": "Site:",
        "wikibase-itembytitle-lookup-page": "Page:",
        "wikibase-itembytitle-submit": "Search",
-       "wikibase-itembytitle-create": "You can also 
[{{fullurl:Special:NewItem|site=$1&page=$2}} create an item].",
+       "wikibase-itembytitle-create": "You can also [$1 create an item].",
        "wikibase-itembytitle-summary": "Special:ItemByTitle is used to find 
the corresponding item for a given page on a connected site. <br /> The left 
field, \"Site:\", is where you enter the language and site code. <br /> For the 
right field, \"Page:\", you must put in the exact title of the page as it 
appears on the connected site.",
        "special-gotolinkedpage": "Go to linked page",
        "wikibase-gotolinkedpage-lookup-fieldset": "Go to linked page by site 
and item",
@@ -146,8 +146,8 @@
        "wikibase-itemdisambiguation-lookup-label": "Label:",
        "wikibase-itemdisambiguation-submit": "Search",
        "wikibase-itemdisambiguation-nothing-found": "Sorry, no item with that 
label was found.",
-       "wikibase-itemdisambiguation-search": "You can 
[{{fullurl:Special:Search|search=$1}} search for the item].",
-       "wikibase-itemdisambiguation-create": "You can 
[{{fullurl:Special:NewItem|label=$1}} create the item].",
+       "wikibase-itemdisambiguation-search": "You can [$1 search for the 
item].",
+       "wikibase-itemdisambiguation-create": "You can [$1 create the item].",
        "wikibase-itemdisambiguation-invalid-langcode": "Sorry, the language 
code you have provided is unknown to the system. Please use a valid language 
code like \"en\".",
        "wikibase-itemdisambiguation-description": "Values used for searching 
must be the complete text entry. Language is an identifier, such as \"en\".",
        "wikibase-itemdisambiguation-summary": "Search for all items with the 
exact same label.",
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index d80a145..015e01b 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -158,7 +158,7 @@
        "wikibase-itembytitle-lookup-site": "Label for the textfield holding 
the site id. See also Wikidata's glossary for 
[[d:Wikidata:Glossary#sitelinks|site links]].\n{{Identical|Site}}",
        "wikibase-itembytitle-lookup-page": "Label for the textfield holding 
the external page title. See also Wikidata's glossary for 
[[d:Wikidata:Glossary#sitelinks|site links]].\n{{Identical|Page}}",
        "wikibase-itembytitle-submit": "Text for the submit button in the 
search form.\n{{Identical|Search}}",
-       "wikibase-itembytitle-create": "Information about how to proceede to 
create a new item. This message is presented when a user searched (or requested 
by URL) for an item by site and page title (e.g. item, linked to a particular 
Wikipedia page in a particular language), but no item was found that linked to 
that page.  This gives the user the option to create a new item with the page 
title as the item label.  The user will be sent to the Create item page and the 
label would be pre-populated.\n\nParameters:\n* $1 - the site identifier used 
in the URL\n* $2 - the page name on escaped form for use in the URL",
+       "wikibase-itembytitle-create": "Information about how to proceede to 
create a new item. This message is presented when a user searched (or requested 
by URL) for an item by site and page title (e.g. item, linked to a particular 
Wikipedia page in a particular language), but no item was found that linked to 
that page.  This gives the user the option to create a new item with the page 
title as the item label.  The user will be sent to the Create item page and the 
label would be pre-populated.\n\nParameters:\n* $1 - the URL string with the 
site identifier and page name",
        "wikibase-itembytitle-summary": "Summary what the Item By Title page is 
about. Should explain what can be entered in the fields.\n\nFor right-to-left 
languages, swap \"right\" and \"left\".\n\n* \"Site\" is 
{{msg-mw|wikibase-itembytitle-lookup-site}}\n* \"Page\" is 
{{msg-mw|wikibase-itembytitle-lookup-page}}",
        "special-gotolinkedpage": "{{doc-special|GoToLinkedPage}}\nTitle of the 
special page. The linked page (sitelink) is identified through use of the site 
and item ID. The lookup may have failed because there was no sitelink for that 
item and site. See also Wikidata's glossary for 
[[d:Wikidata:Glossary#Sitelinks|sitelink]] and 
[[d:Wikidata:Glossary#Items|items]].",
        "wikibase-gotolinkedpage-lookup-fieldset": "This is the title for the 
fieldset on the special page for specifiying the search arguments. This is the 
search for a linked page (sitelink) by site and item ID.",
@@ -172,8 +172,8 @@
        "wikibase-itemdisambiguation-lookup-label": "Label for the textfield 
holding the language specific label. See also Wikidatas glossary for 
[[d:Wikidata:Glossary#label|label]].\n{{Identical|Label}}",
        "wikibase-itemdisambiguation-submit": "Text for the submit button in 
the search form.\n{{Identical|Search}}",
        "wikibase-itemdisambiguation-nothing-found": "Response if the search 
failed because no such items have been found.",
-       "wikibase-itemdisambiguation-search": "Invitation to click a link and 
search for an item with the given label using Special:Search.\n\nParameters:\n* 
$1 - the specified label",
-       "wikibase-itemdisambiguation-create": "Invitation to click a link and 
create an item with the given label.\n\nParameters:\n* $1 - the specified 
label",
+       "wikibase-itemdisambiguation-search": "Invitation to click a link and 
search for an item with the given label using Special:Search.\n\nParameters:\n* 
$1 - the URL string with the specified label",
+       "wikibase-itemdisambiguation-create": "Invitation to click a link and 
create an item with the given label.\n\nParameters:\n* $1 - the URL string with 
the specified label",
        "wikibase-itemdisambiguation-invalid-langcode": "Response informing 
that the language code is not valid. Could give an example of a valid language 
code.\n\n\"language identifier\" is the same as \"language code\".",
        "wikibase-itemdisambiguation-description": "Further information about 
the search fields and whats valid values.",
        "wikibase-itemdisambiguation-summary": "Summary of usage of the item 
disambiguation page",
diff --git a/repo/includes/specials/SpecialItemByTitle.php 
b/repo/includes/specials/SpecialItemByTitle.php
index d1aa0b9..d42a132 100644
--- a/repo/includes/specials/SpecialItemByTitle.php
+++ b/repo/includes/specials/SpecialItemByTitle.php
@@ -242,12 +242,12 @@
                );
 
                if ( $siteExists && isset( $page ) ) {
+                       $createLink = $this->getTitleFor( 'NewItem' );
                        $this->getOutput()->addHTML(
                                Html::openElement( 'div' )
                                . $this->msg( 'wikibase-itembytitle-create' )
                                        ->params(
-                                               wfUrlencode( $siteId ?: '' ),
-                                               wfUrlencode( $page ?: '' )
+                                               $createLink->getFullURL( array( 
'site' => ( $siteId ?: '' ), 'page' => ( $page ?: '' ) ) )
                                        )
                                        ->parse()
                                . Html::closeElement( 'div' )
diff --git a/repo/includes/specials/SpecialItemDisambiguation.php 
b/repo/includes/specials/SpecialItemDisambiguation.php
index 2f79603..0cf25a2 100644
--- a/repo/includes/specials/SpecialItemDisambiguation.php
+++ b/repo/includes/specials/SpecialItemDisambiguation.php
@@ -145,13 +145,15 @@
                        $this->getOutput()->addWikiMsg( 
'wikibase-itemdisambiguation-nothing-found' );
 
                        if ( $languageCode === $this->getLanguage()->getCode() 
) {
+                               $searchLink = $this->getTitleFor( 'Search' );
                                $this->getOutput()->addWikiMsg(
                                        'wikibase-itemdisambiguation-search',
-                                       urlencode( $label )
+                                       $searchLink->getFullURL( array( 
'search' => $label ) )
                                );
+                               $createLink = $this->getTitleFor( 'NewItem' );
                                $this->getOutput()->addWikiMsg(
                                        'wikibase-itemdisambiguation-create',
-                                       urlencode( $label )
+                                       $createLink->getFullURL( array( 'label' 
=> $label ) )
                                );
                        }
                } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/193808
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7178a3f73510b27f3fd59ac25f1ae21b7ae55b4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: AYUSH GARG <ayush.c...@iitp.ac.in>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: JanZerebecki <jan.wikime...@zerebecki.de>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to