[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add parameters to "wikibase-newitem-no-external-page" error ...
jenkins-bot has submitted this change and it was merged. Change subject: Add parameters to "wikibase-newitem-no-external-page" error message .. Add parameters to "wikibase-newitem-no-external-page" error message This is quite trivial, since this message is used only once and this change is trivial to test by manually calling …/wiki/Special:NewItem?site=dewiki&page=doesnotexist Change-Id: Ic6b28055afd77487c28518b37742dcc993988f29 --- M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/Specials/SpecialNewItem.php 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 177580b..804eadb 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -172,7 +172,7 @@ "wikibase-newitem-fieldset": "Create a new item", "wikibase-newitem-site": "Site of the first linked page", "wikibase-newitem-page": "Name of the first linked page", - "wikibase-newitem-no-external-page": "The specified page could not be found on the corresponding site.", + "wikibase-newitem-no-external-page": "A page \"$2\" could not be found on \"$1\".", "wikibase-newitem-not-recognized-siteid": "The provided site identifier was not recognized.", "wikibase-newitem-not-recognized-language": "The supplied language code was not recognized.", "wikibase-newentity-language": "Language:", diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index 2e4151b..426d7d1 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -203,7 +203,7 @@ "wikibase-newitem-fieldset": "Title for the fieldset on the CreateItem special page.\n{{Identical|Create new item}}", "wikibase-newitem-site": "Label for the site-textfield holding the site id of the first linked page to add to the new item.", "wikibase-newitem-page": "Label for the page-textfield holding the page name of the first linked page to add to the new item", - "wikibase-newitem-no-external-page": "Error message shown when a user tries to add a page that does not exist on the website choosen.", + "wikibase-newitem-no-external-page": "Error message shown when a user tries to add a page that does not exist on the site chosen.\n\nParameters:\n* $1 - global site ID, known to be valid\n* $2 - requested page name that could not be found on the site\n{{Identical|wikibase-error-ui-no-external-page}}", "wikibase-newitem-not-recognized-siteid": "Error message shown when a user tries to add a link to a site with an unknown identifier.\n\nSee also:\n* {{msg-mw|Wikibase-api-not-recognized-siteid}}", "wikibase-newitem-not-recognized-language": "Error message shown when a user tries to create an item with an unknown language code.\n\nSee also:\n* {{msg-mw|Wikibase-api-not-recognized-language}}", "wikibase-newentity-language": "Label for the \"lang\" dropdown menu holding the language in which the label, description and aliases of the new item should be typed.\n{{Identical|Language}}", diff --git a/repo/includes/Specials/SpecialNewItem.php b/repo/includes/Specials/SpecialNewItem.php index 23f86f9..91ce2e8 100644 --- a/repo/includes/Specials/SpecialNewItem.php +++ b/repo/includes/Specials/SpecialNewItem.php @@ -81,11 +81,11 @@ $page = $site->normalizePageName( $this->page ); if ( $page === false ) { - $status->error( 'wikibase-newitem-no-external-page' ); + $status->error( 'wikibase-newitem-no-external-page', $this->site, $this->page ); return $status; } - $item->getSiteLinkList()->addNewSiteLink( $site->getGlobalId(), $page ); + $item->getSiteLinkList()->addNewSiteLink( $this->site, $page ); } return $status; -- To view, visit https://gerrit.wikimedia.org/r/316537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic6b28055afd77487c28518b37742dcc993988f29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Jonas Kress (WMDE) Gerrit-Reviewer: Siebrand Gerrit-Reviewer: WMDE-jand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add parameters to "wikibase-newitem-no-external-page" error ...
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/316537 Change subject: Add parameters to "wikibase-newitem-no-external-page" error message .. Add parameters to "wikibase-newitem-no-external-page" error message This is quite trivial, since this message is used only once and this change is trivial to test by manually calling …/wiki/Special:NewItem?site=dewiki&page=doesnotexist Change-Id: Ic6b28055afd77487c28518b37742dcc993988f29 --- M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/Specials/SpecialNewItem.php 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/37/316537/1 diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 177580b..804eadb 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -172,7 +172,7 @@ "wikibase-newitem-fieldset": "Create a new item", "wikibase-newitem-site": "Site of the first linked page", "wikibase-newitem-page": "Name of the first linked page", - "wikibase-newitem-no-external-page": "The specified page could not be found on the corresponding site.", + "wikibase-newitem-no-external-page": "A page \"$2\" could not be found on \"$1\".", "wikibase-newitem-not-recognized-siteid": "The provided site identifier was not recognized.", "wikibase-newitem-not-recognized-language": "The supplied language code was not recognized.", "wikibase-newentity-language": "Language:", diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index 2e4151b..426d7d1 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -203,7 +203,7 @@ "wikibase-newitem-fieldset": "Title for the fieldset on the CreateItem special page.\n{{Identical|Create new item}}", "wikibase-newitem-site": "Label for the site-textfield holding the site id of the first linked page to add to the new item.", "wikibase-newitem-page": "Label for the page-textfield holding the page name of the first linked page to add to the new item", - "wikibase-newitem-no-external-page": "Error message shown when a user tries to add a page that does not exist on the website choosen.", + "wikibase-newitem-no-external-page": "Error message shown when a user tries to add a page that does not exist on the site chosen.\n\nParameters:\n* $1 - global site ID, known to be valid\n* $2 - requested page name that could not be found on the site\n{{Identical|wikibase-error-ui-no-external-page}}", "wikibase-newitem-not-recognized-siteid": "Error message shown when a user tries to add a link to a site with an unknown identifier.\n\nSee also:\n* {{msg-mw|Wikibase-api-not-recognized-siteid}}", "wikibase-newitem-not-recognized-language": "Error message shown when a user tries to create an item with an unknown language code.\n\nSee also:\n* {{msg-mw|Wikibase-api-not-recognized-language}}", "wikibase-newentity-language": "Label for the \"lang\" dropdown menu holding the language in which the label, description and aliases of the new item should be typed.\n{{Identical|Language}}", diff --git a/repo/includes/Specials/SpecialNewItem.php b/repo/includes/Specials/SpecialNewItem.php index 23f86f9..91ce2e8 100644 --- a/repo/includes/Specials/SpecialNewItem.php +++ b/repo/includes/Specials/SpecialNewItem.php @@ -81,11 +81,11 @@ $page = $site->normalizePageName( $this->page ); if ( $page === false ) { - $status->error( 'wikibase-newitem-no-external-page' ); + $status->error( 'wikibase-newitem-no-external-page', $this->site, $this->page ); return $status; } - $item->getSiteLinkList()->addNewSiteLink( $site->getGlobalId(), $page ); + $item->getSiteLinkList()->addNewSiteLink( $this->site, $page ); } return $status; -- To view, visit https://gerrit.wikimedia.org/r/316537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6b28055afd77487c28518b37742dcc993988f29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits