[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Include a number in messages showing a number with a unit

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

Change subject: Include a number in messages showing a number with a unit
..


Include a number in messages showing a number with a unit

Extension should not enforce English order with number being followed
by unit "bytes" in messages related to byte size.
This also splits a message into two messages: one for page size value,
and other for change size. The latter size is signed and value to be
shown is colour-coded HTML element so it is a bit more complicated
case than the page size.

Bug: T141507
Change-Id: I96992eafd4cd8a5aed3fcd5944129bcd83139a16
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/ext.RevisionSlider.RevisionListView.js
4 files changed, 8 insertions(+), 10 deletions(-)

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



diff --git a/extension.json b/extension.json
index d24230b..139df76 100644
--- a/extension.json
+++ b/extension.json
@@ -121,8 +121,8 @@
],
"messages": [
"colon-separator",
-   "word-separator",
-   "revisionslider-bytes",
+   "revisionslider-page-size",
+   "revisionslider-change-size",
"revisionslider-label-date",
"revisionslider-label-page-size",
"revisionslider-label-change-size",
diff --git a/i18n/en.json b/i18n/en.json
index 1df9639..f43cf67 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,7 +8,8 @@
 "revisionslider-desc": "Shows a slider allowing selecting and comparing of 
revisions on a diff page",
 "revisionslider-beta-feature-message": "RevisionSlider",
 "revisionslider-beta-feature-description": "Show a revision slider when 
comparing two revisions of a page.",
-"revisionslider-bytes": "{{PLURAL:$1|byte|bytes}}",
+"revisionslider-page-size": "$1 {{PLURAL:$2|byte|bytes}}",
+"revisionslider-change-size": "$1 {{PLURAL:$3|byte|bytes}}",
 "revisionslider-label-date": "Date",
 "revisionslider-label-page-size": "Page size",
 "revisionslider-label-change-size": "Change size",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bfd577a..c96d1c7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -10,7 +10,8 @@
"revisionslider-desc": 
"{{desc|name=RevisionSlider|url=https://www.mediawiki.org/wiki/Extension:RevisionSlider}};,
"revisionslider-beta-feature-message": "Label for the RevisionSlider 
Beta Feature.",
"revisionslider-beta-feature-description": "Description for the 
RevisionSlider Beta Feature, describing the feature that will be enabled.",
-   "revisionslider-bytes": "Unit (bytes) used along with revision/change 
size.\n\nParameters:\n$1 - number of bytes\n{{Identical|Byte}}",
+   "revisionslider-page-size": "Page size after the 
revision.\n\nParameters:\n$1 - number of bytes formatted for output (with 
mw.language.converNumber)\n$2 - number of bytes, could be used with PLURAL",
+   "revisionslider-change-size": "Change size, ie. number of bytes added 
or removed in the revision.\n\nParameters:\n$1 - change size formatted for 
output (colour-coded HTML element, including plus or minus sign)\n$2 - change 
size (in bytes), can be negative\n$3 - change size (in bytes) without a sign",
"revisionslider-label-date": "Label for the creation date of the 
revision.\n{{Identical|Date}}",
"revisionslider-label-page-size": "Label for the size of the 
revision.\n{{Identical|Page size}}",
"revisionslider-label-change-size": "Label for the size of the change 
compared to the revision before.",
diff --git a/modules/ext.RevisionSlider.RevisionListView.js 
b/modules/ext.RevisionSlider.RevisionListView.js
index f44b44f..299680c 100644
--- a/modules/ext.RevisionSlider.RevisionListView.js
+++ b/modules/ext.RevisionSlider.RevisionListView.js
@@ -260,9 +260,7 @@
makePageSizeLine: function ( size ) {
return $( '' ).append(
$( '' ).text( mw.msg( 
'revisionslider-label-page-size' ) + mw.msg( 'colon-separator' ) ),
-   mw.language.convertNumber( size ),
-   mw.msg( 'word-separator' ),
-   mw.msg( 'revisionslider-bytes', size )
+   mw.msg( 'revisionslider-page-size', 
mw.language.convertNumber( size ), size )
);
},
 
@@ -293,9 +291,7 @@
 
return $( '' ).append(
$( '' ).text( mw.msg( 
'revisionslider-label-change-size' ) + mw.msg( 'colon-separator' ) ),
-   $changeNumber,
-   mw.msg( 'word-separator' ),
-   

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Include a number in messages showing a number with a unit

2016-07-28 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review.

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

Change subject: Include a number in messages showing a number with a unit
..

Include a number in messages showing a number with a unit

Extension should not enforce English order with number being followed
by unit "bytes" in messages related to byte size.
This also splits a message into two messages: one for page size value,
and other for change size. The latter size is signed and value to be
shown is colour-coded HTML element so it is a bit more complicated
case than the page size.

Bug: T141507
Change-Id: I96992eafd4cd8a5aed3fcd5944129bcd83139a16
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/ext.RevisionSlider.RevisionListView.js
4 files changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/92/301592/1

diff --git a/extension.json b/extension.json
index d24230b..139df76 100644
--- a/extension.json
+++ b/extension.json
@@ -121,8 +121,8 @@
],
"messages": [
"colon-separator",
-   "word-separator",
-   "revisionslider-bytes",
+   "revisionslider-page-size",
+   "revisionslider-change-size",
"revisionslider-label-date",
"revisionslider-label-page-size",
"revisionslider-label-change-size",
diff --git a/i18n/en.json b/i18n/en.json
index 1df9639..f43cf67 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,7 +8,8 @@
 "revisionslider-desc": "Shows a slider allowing selecting and comparing of 
revisions on a diff page",
 "revisionslider-beta-feature-message": "RevisionSlider",
 "revisionslider-beta-feature-description": "Show a revision slider when 
comparing two revisions of a page.",
-"revisionslider-bytes": "{{PLURAL:$1|byte|bytes}}",
+"revisionslider-page-size": "$1 {{PLURAL:$2|byte|bytes}}",
+"revisionslider-change-size": "$1 {{PLURAL:$3|byte|bytes}}",
 "revisionslider-label-date": "Date",
 "revisionslider-label-page-size": "Page size",
 "revisionslider-label-change-size": "Change size",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bfd577a..c96d1c7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -10,7 +10,8 @@
"revisionslider-desc": 
"{{desc|name=RevisionSlider|url=https://www.mediawiki.org/wiki/Extension:RevisionSlider}};,
"revisionslider-beta-feature-message": "Label for the RevisionSlider 
Beta Feature.",
"revisionslider-beta-feature-description": "Description for the 
RevisionSlider Beta Feature, describing the feature that will be enabled.",
-   "revisionslider-bytes": "Unit (bytes) used along with revision/change 
size.\n\nParameters:\n$1 - number of bytes\n{{Identical|Byte}}",
+   "revisionslider-page-size": "Page size after the 
revision.\n\nParameters:\n$1 - number of bytes formatted for output (with 
mw.language.converNumber)\n$2 - number of bytes, could be used with PLURAL",
+   "revisionslider-change-size": "Change size, ie. number of bytes added 
or removed in the revision.\n\nParameters:\n$1 - change size formatted for 
output (colour-coded HTML element, including plus or minus sign)\n$2 - change 
size (in bytes), can be negative\n$3 - change size (in bytes) without a sign",
"revisionslider-label-date": "Label for the creation date of the 
revision.\n{{Identical|Date}}",
"revisionslider-label-page-size": "Label for the size of the 
revision.\n{{Identical|Page size}}",
"revisionslider-label-change-size": "Label for the size of the change 
compared to the revision before.",
diff --git a/modules/ext.RevisionSlider.RevisionListView.js 
b/modules/ext.RevisionSlider.RevisionListView.js
index f44b44f..299680c 100644
--- a/modules/ext.RevisionSlider.RevisionListView.js
+++ b/modules/ext.RevisionSlider.RevisionListView.js
@@ -260,9 +260,7 @@
makePageSizeLine: function ( size ) {
return $( '' ).append(
$( '' ).text( mw.msg( 
'revisionslider-label-page-size' ) + mw.msg( 'colon-separator' ) ),
-   mw.language.convertNumber( size ),
-   mw.msg( 'word-separator' ),
-   mw.msg( 'revisionslider-bytes', size )
+   mw.msg( 'revisionslider-page-size', 
mw.language.convertNumber( size ), size )
);
},
 
@@ -293,9 +291,7 @@
 
return $( '' ).append(
$( '' ).text( mw.msg( 
'revisionslider-label-change-size' ) + mw.msg( 'colon-separator' ) ),
-   $changeNumber,
-