[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Mention the invalid id in "wikibase-error-invalid-entity-id"

2017-05-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  Lucie Kaffee: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/client/i18n/en.json b/client/i18n/en.json
index a98e542..55996d7 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 \"$2\" is unknown to the 
system. 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 
entityAccessLimit 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
--- 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Mention the invalid id in "wikibase-error-invalid-entity-id"

2017-05-18 Thread Hoo man (Code Review)
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 
entityAccessLimit 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
+++