Hoo man has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354258 )
Change subject: Mention the invalid id in "wikibase-error-invalid-entity-id"
......................................................................
Mention the invalid id in "wikibase-error-invalid-entity-id"
Bug: T163815
Change-Id: I2e0e374958e81c956fb18f92cee19b76cceb986b
---
M client/i18n/en.json
M client/i18n/qqq.json
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
4 files changed, 14 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/58/354258/1
diff --git a/client/i18n/en.json b/client/i18n/en.json
index a98e542..0920a09 100644
--- a/client/i18n/en.json
+++ b/client/i18n/en.json
@@ -88,7 +88,7 @@
"wikibase-watchlist-show-changes-pref": "Show {{WBREPONAME}} edits in
your watchlist",
"wikibase-error-deserialize-error": "Failed to deserialize data.",
"wikibase-error-serialize-error": "Failed to serialize data.",
- "wikibase-error-invalid-entity-id": "The ID entered is unknown to the
system. Please use a valid entity ID.",
+ "wikibase-error-invalid-entity-id": "The ID entered is unknown to the
system: \"$2\". Please use a valid entity ID.",
"wikibase-error-exceeded-entity-access-limit": "Too many {{WBREPONAME}}
entities accessed.",
"unconnectedpages": "Pages not connected to items",
"unconnectedpages-summary": "This page lists pages with no connected
data item (in namespaces that support connected items). The list is sorted by
descending page ID, so that newer pages are listed first.",
diff --git a/client/i18n/qqq.json b/client/i18n/qqq.json
index ad291ef..c5f1c07 100644
--- a/client/i18n/qqq.json
+++ b/client/i18n/qqq.json
@@ -99,7 +99,7 @@
"wikibase-watchlist-show-changes-pref": "Option in the watchlist
section of preferences to always show wikibase edits by default in the
watchlist. Appears as a checkbox in the same list with options such as:\n*
{{msg-mw|tog-watchdefault}}\n* {{msg-mw|tog-watchmoves}}\nAnd so on.",
"wikibase-error-deserialize-error": "Generic error when invalid
(undeserializable) data has been given.",
"wikibase-error-serialize-error": "Generic error for when entity data
failed to serialize or cannot be handled.",
- "wikibase-error-invalid-entity-id": "Generic error message when an
invalid entity ID was entered.",
+ "wikibase-error-invalid-entity-id": "Generic error message when an
invalid entity ID was entered. Parameters:\n* $1 unused\n* $2 - the entered but
invalid ID",
"wikibase-error-exceeded-entity-access-limit": "Error message shown in
rendered page output when too many entities are accessed on the page. The limit
on the number of full entities that can be loaded on any given page, via
Scribunto and/or the property parser function, is controlled by the
<tt>entityAccessLimit</tt> configuration setting.",
"unconnectedpages": "{{doc-special|UnconnectedPages}}",
"unconnectedpages-summary": "Introductory text used on
Special:UnconnectedPages.",
diff --git
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
index 92f2423..801621b 100644
---
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
+++
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
@@ -186,7 +186,10 @@
)
];
} catch ( InvalidArgumentException $e ) {
- throw new ScribuntoException(
'wikibase-error-invalid-entity-id' );
+ throw new ScribuntoException(
+ 'wikibase-error-invalid-entity-id',
+ [ 'args' => [ $entityId ] ]
+ );
} catch ( PropertyLabelNotResolvedException $e ) {
return [ null ];
}
@@ -219,7 +222,10 @@
)
];
} catch ( InvalidArgumentException $e ) {
- throw new ScribuntoException(
'wikibase-error-invalid-entity-id' );
+ throw new ScribuntoException(
+ 'wikibase-error-invalid-entity-id',
+ [ 'args' => [ $entityId ] ]
+ );
} catch ( PropertyLabelNotResolvedException $e ) {
return [ null ];
}
diff --git
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index 6ca2810..3e69e4a 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -332,7 +332,10 @@
$entityArr = $this->getEntityAccessor()->getEntity(
$prefixedEntityId );
return array( $entityArr );
} catch ( EntityIdParsingException $ex ) {
- throw new ScribuntoException(
'wikibase-error-invalid-entity-id' );
+ throw new ScribuntoException(
+ 'wikibase-error-invalid-entity-id',
+ [ 'args' => [ $prefixedEntityId ] ]
+ );
} catch ( EntityAccessLimitException $ex ) {
throw new ScribuntoException(
'wikibase-error-exceeded-entity-access-limit' );
} catch ( Exception $ex ) {
--
To view, visit https://gerrit.wikimedia.org/r/354258
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e0e374958e81c956fb18f92cee19b76cceb986b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits