Thiemo Mättig (WMDE) has uploaded a new change for review.

Change subject: Add parameters to "wikibase-error-ui-no-external-page" error 

Add parameters to "wikibase-error-ui-no-external-page" error message

Note that this message is used twice. The effect on Special:SetSiteLink
is quite easy to test. The other instance is more complicated:

In the sitelinks UI, try to add a new sitelink (or edit an existing one)
with a valid site ID but a page name that does not exist on that site.
Click "save". You will see two error messages: the first one is meant to
be generic, but localized. The second is not localized, but gives details.
This patch does make the first, localized message more specific and

This requires a release of the WikibaseJavaScriptApi component! Otherwise
the user will see unparsed parameters ("$2"). See I044a28c.

Change-Id: I99d8d799dbce54503fa7f13d175464d856e6ed2f
M lib/i18n/en.json
M lib/i18n/qqq.json
M repo/includes/Specials/SpecialSetSiteLink.php
3 files changed, 4 insertions(+), 4 deletions(-)

  git pull ssh:// 

diff --git a/lib/i18n/en.json b/lib/i18n/en.json
index 7d37828..41d65da 100644
--- a/lib/i18n/en.json
+++ b/lib/i18n/en.json
@@ -19,8 +19,8 @@
        "wikibase-error-remove-timeout": "We are experiencing technical 
difficulties. Your \"remove\" could not be completed.",
        "wikibase-error-autocomplete-connection": "Could not query site API. 
Please try again later.",
        "wikibase-error-autocomplete-response": "Server responded: $1",
-       "wikibase-error-ui-no-external-page": "The specified article could not 
be found on the corresponding site.",
-       "wikibase-error-ui-edit-conflict": "There is an edit conflict. Please 
save your changes locally, reload this page and save them again.",
+       "wikibase-error-ui-no-external-page": "A page \"$2\" could not be found 
on \"$1\".",
+       "wikibase-error-ui-edit-conflict": "The same value was edited in the 
meantime, causing an edit conflict. Please reload the page.",
        "wikibase-language-fallback-transliteration-hint": "$1 
        "wikibase-quantitydetails-amount": "Amount",
        "wikibase-quantitydetails-upperbound": "Upper bound",
diff --git a/lib/i18n/qqq.json b/lib/i18n/qqq.json
index 1530a0b..2afd6c9 100644
--- a/lib/i18n/qqq.json
+++ b/lib/i18n/qqq.json
@@ -29,7 +29,7 @@
        "wikibase-error-remove-timeout": "Error message for an error happening 
during a remove operation. The error was caused by a request time out.",
        "wikibase-error-autocomplete-connection": "Error message for page 
auto-complete input box; displayed when API could not be reached.",
        "wikibase-error-autocomplete-response": "When querying the API for 
auto-completion fails, this message contains more detailed information about 
the error. $1 is the actual server error response or jQuery error code (e.g. 
when the server did not respond).",
-       "wikibase-error-ui-no-external-page": "This is a human readable version 
of the API error \"wikibase-api-no-external-page\" which is shown in the UI.",
+       "wikibase-error-ui-no-external-page": "This is a human readable version 
of the API error \"wikibase-api-no-external-page\" which is shown in the 
UI.\n\nParameters:\n* $1 - global site ID, known to be valid\n* $2 - requested 
page name that could not be found on the 
        "wikibase-error-ui-edit-conflict": "This is a human readable version of 
the API error \"edit-conflict\" which is shown in the UI.\nNote that the 
default message says the user shall \"reload and save\", but after a reload the 
content that should be saved will be lost.",
        "wikibase-language-fallback-transliteration-hint": "Message shown 
instead of a language name to indicate that a language fallback involved 
transliteration.\n* $1 - the name of the source language\n* $2 - the name of 
the resulting language",
        "wikibase-quantitydetails-amount": "Label used for the \"amount\" field 
of a quantity value when showing a detailed representation of the quantity, 
e.g. in a diff.\n{{Identical|Amount}}",
diff --git a/repo/includes/Specials/SpecialSetSiteLink.php 
index 82df22d..761a3d9 100644
--- a/repo/includes/Specials/SpecialSetSiteLink.php
+++ b/repo/includes/Specials/SpecialSetSiteLink.php
@@ -458,7 +458,7 @@
                        $pageName = $site->normalizePageName( $pageName );
                        if ( $pageName === false ) {
-                               $status->fatal( 
'wikibase-error-ui-no-external-page' );
+                               $status->fatal( 
'wikibase-error-ui-no-external-page', $siteId, $this->page );
                                return $status;

To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99d8d799dbce54503fa7f13d175464d856e6ed2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <>

MediaWiki-commits mailing list

Reply via email to