[MediaWiki-commits] [Gerrit] Include error code in API failure message - change (mediawiki...Thanks)

2016-03-04 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Include error code in API failure message
..


Include error code in API failure message

Otherwise the error reports we get are completely useless.

Bug: T78697
Change-Id: Ic0244e2e947256c411c889a8850c8f18ee3658a4
---
M i18n/en.json
M i18n/qqq.json
M modules/ext.thanks.revthank.js
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index ee6946e..b5d4cb3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,7 +9,7 @@
"thanks-thanked": "{{GENDER:$1|{{GENDER:$2|thanked",
"thanks-button-thank": "{{GENDER:$1|{{GENDER:$2|Thank",
"thanks-button-thanked": "{{GENDER:$1|{{GENDER:$2|Thanked",
-   "thanks-error-undefined": "Thank action failed. Please try again.",
+   "thanks-error-undefined": "Thank action failed (error code: $1). Please 
try again.",
"thanks-error-invalidrevision": "Revision ID is not valid.",
"thanks-error-ratelimited": "{{GENDER:$1|You}}'ve exceeded your rate 
limit. Please wait some time and try again.",
"thanks-thank-tooltip": "{{GENDER:$1|Send}} a thank you notification to 
this {{GENDER:$2|user}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 131297c..709071c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -18,7 +18,7 @@
"thanks-thanked": "This message immediately replaces the message 
{{msg-mw|Thanks-thank}} after it's pressed. It means that the thanking 
operation has been completed.\n\nIt can be translated as \"''thanked''\" in 
\"You thanked the user\" or \"The user has just been ''thanked''\" - whatever 
is appropriate to your language.\nFor languages that need it, the gender of 
each of the thanked and thanking users is available.\n\nParameters:\n* $1 - The 
user that is thanking\n* $2 - The user that is thanked\n{{Identical|Thanked}}",
"thanks-button-thank": "Text of a button to thank another user. Same as 
{{msg-mw|Thanks-thank}}, but the context is in a button.\n\nParameters:\n* $1 - 
The user that is thanking, for gender\n* $2 - The user that is being thanked, 
for gender\n{{Identical|Thank}}",
"thanks-button-thanked": "This message immediately replaces the message 
{{msg-mw|Thanks-button-thank}} after it's pressed. It means that the thanking 
operation has been completed.\n\nSame as {{msg-mw|Thanks-thanked}}, but the 
context is in a button.\n\nParameters:\n* $1 - The user that is thanking, for 
gender\n* $2 - The user that is being thanked, for 
gender\n{{Identical|Thanked}}",
-   "thanks-error-undefined": "Error message that is displayed when the 
thank action fails.\n{{Identical|Please try again}}",
+   "thanks-error-undefined": "Error message that is displayed when the 
thank action fails. $1 is the error code returned by the API (an English 
string)",
"thanks-error-invalidrevision": "Error message that is displayed when 
the revision ID is not valid",
"thanks-error-ratelimited": "Error message that is displayed when user 
exceeds rate limit. Parameters:\n* $1 - gender",
"thanks-thank-tooltip": "Tooltip that appears when a user hovers over 
the \"thank\" link. Parameters:\n* $1 - The user sending the thanks.  Can be 
used for GENDER support.\n* $2 - The user receiving the thanks.  Can be used 
for GENDER support",
diff --git a/modules/ext.thanks.revthank.js b/modules/ext.thanks.revthank.js
index 593558d..63f413a 100644
--- a/modules/ext.thanks.revthank.js
+++ b/modules/ext.thanks.revthank.js
@@ -46,7 +46,7 @@
alert( mw.msg( 
'thanks-error-ratelimited', mw.user ) );
break;
default:
-   alert( mw.msg( 
'thanks-error-undefined' ) );
+   alert( mw.msg( 
'thanks-error-undefined', errorCode ) );
}
}
)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0244e2e947256c411c889a8850c8f18ee3658a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Include error code in API failure message - change (mediawiki...Thanks)

2016-03-04 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275032

Change subject: Include error code in API failure message
..

Include error code in API failure message

Otherwise the error reports we get are completely useless.

Bug: T78697
Change-Id: Ic0244e2e947256c411c889a8850c8f18ee3658a4
---
M i18n/en.json
M i18n/qqq.json
M modules/ext.thanks.revthank.js
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Thanks 
refs/changes/32/275032/1

diff --git a/i18n/en.json b/i18n/en.json
index ee6946e..b5d4cb3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,7 +9,7 @@
"thanks-thanked": "{{GENDER:$1|{{GENDER:$2|thanked",
"thanks-button-thank": "{{GENDER:$1|{{GENDER:$2|Thank",
"thanks-button-thanked": "{{GENDER:$1|{{GENDER:$2|Thanked",
-   "thanks-error-undefined": "Thank action failed. Please try again.",
+   "thanks-error-undefined": "Thank action failed (error code: $1). Please 
try again.",
"thanks-error-invalidrevision": "Revision ID is not valid.",
"thanks-error-ratelimited": "{{GENDER:$1|You}}'ve exceeded your rate 
limit. Please wait some time and try again.",
"thanks-thank-tooltip": "{{GENDER:$1|Send}} a thank you notification to 
this {{GENDER:$2|user}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 131297c..709071c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -18,7 +18,7 @@
"thanks-thanked": "This message immediately replaces the message 
{{msg-mw|Thanks-thank}} after it's pressed. It means that the thanking 
operation has been completed.\n\nIt can be translated as \"''thanked''\" in 
\"You thanked the user\" or \"The user has just been ''thanked''\" - whatever 
is appropriate to your language.\nFor languages that need it, the gender of 
each of the thanked and thanking users is available.\n\nParameters:\n* $1 - The 
user that is thanking\n* $2 - The user that is thanked\n{{Identical|Thanked}}",
"thanks-button-thank": "Text of a button to thank another user. Same as 
{{msg-mw|Thanks-thank}}, but the context is in a button.\n\nParameters:\n* $1 - 
The user that is thanking, for gender\n* $2 - The user that is being thanked, 
for gender\n{{Identical|Thank}}",
"thanks-button-thanked": "This message immediately replaces the message 
{{msg-mw|Thanks-button-thank}} after it's pressed. It means that the thanking 
operation has been completed.\n\nSame as {{msg-mw|Thanks-thanked}}, but the 
context is in a button.\n\nParameters:\n* $1 - The user that is thanking, for 
gender\n* $2 - The user that is being thanked, for 
gender\n{{Identical|Thanked}}",
-   "thanks-error-undefined": "Error message that is displayed when the 
thank action fails.\n{{Identical|Please try again}}",
+   "thanks-error-undefined": "Error message that is displayed when the 
thank action fails. $1 is the error code returned by the API (an English 
string)",
"thanks-error-invalidrevision": "Error message that is displayed when 
the revision ID is not valid",
"thanks-error-ratelimited": "Error message that is displayed when user 
exceeds rate limit. Parameters:\n* $1 - gender",
"thanks-thank-tooltip": "Tooltip that appears when a user hovers over 
the \"thank\" link. Parameters:\n* $1 - The user sending the thanks.  Can be 
used for GENDER support.\n* $2 - The user receiving the thanks.  Can be used 
for GENDER support",
diff --git a/modules/ext.thanks.revthank.js b/modules/ext.thanks.revthank.js
index 593558d..63f413a 100644
--- a/modules/ext.thanks.revthank.js
+++ b/modules/ext.thanks.revthank.js
@@ -46,7 +46,7 @@
alert( mw.msg( 
'thanks-error-ratelimited', mw.user ) );
break;
default:
-   alert( mw.msg( 
'thanks-error-undefined' ) );
+   alert( mw.msg( 
'thanks-error-undefined', errorCode ) );
}
}
)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0244e2e947256c411c889a8850c8f18ee3658a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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