jenkins-bot has submitted this change and it was merged.

Change subject: API I18N
......................................................................


API I18N

Added required description i18n messages for our API modules.

Patch Set 2:
* Added shared messages for shared parameters
* As we target LTS Release 1.23 we use integer 10 instead of class
  constant ApiBase::PARAM_HELP_MSG. We will need to change this once the
  next LTS is available

Change-Id: I8c4ba27659456028883779d7377eb23bf447bc3a
---
M BlueSpiceFoundation.php
A i18n/api/de.json
A i18n/api/en.json
A i18n/api/qqq.json
M includes/api/BSApiExtJSStoreBase.php
M includes/api/BSApiTasksBase.php
6 files changed, 97 insertions(+), 17 deletions(-)

Approvals:
  Mglaser: Looks good to me, approved
  Siebrand: Looks good to me, but someone else must approve
  Raimond Spekking: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/BlueSpiceFoundation.php b/BlueSpiceFoundation.php
index 2b463a4..c36203d 100644
--- a/BlueSpiceFoundation.php
+++ b/BlueSpiceFoundation.php
@@ -78,6 +78,7 @@
 $wgMessagesDirs['BlueSpice.Deferred'] = __DIR__ . '/i18n/deferred';
 $wgMessagesDirs['Validator'] = __DIR__ . '/i18n/validator';
 $wgMessagesDirs['Notifications'] = __DIR__ . '/i18n/notifications';
+$wgMessagesDirs['BlueSpice.API'] = __DIR__ . '/i18n/api';
 
 //I18N Backwards compatibility
 $wgExtensionMessagesFiles += array(
diff --git a/i18n/api/de.json b/i18n/api/de.json
new file mode 100644
index 0000000..d75e799
--- /dev/null
+++ b/i18n/api/de.json
@@ -0,0 +1,22 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Robert Vogel <[email protected]>"
+               ]
+       },
+       "apihelp-bs-filebackend-store-description": "Listet alle Dateien im 
FileBackend. Erlaubt Sortierung, Filterung und seitenweise Anzeige. 
Implementiert ExtJS Store Parameter.",
+       "apihelp-bs-user-store-description": "Listet alle Benutzer aus der 
Datenbank. Erlaubt Sortierung, Filterung und seitenweise Anzeige. Implementiert 
ExtJS Store Parameter.",
+       "apihelp-bs-store-param-sort": "JSON Zeichenkette mit Informationen zur 
Sortierung; Wird in ein <code>array of objects</code> deserialisiert welches 
den Feldnamen und die Richtung für jede Sortieranweisung enthält",
+       "apihelp-bs-store-param-group": "JSON Zeichenkette mit Informationen 
zur Gruppierung; Wird in ein <code>array of objects</code> deserialisiert 
welches den Feldnamen und die Richtung für jede Gruppierungsanweisung enthält",
+       "apihelp-bs-store-param-filter": "JSON Zeichenkette mit Informationen 
zur Filterung; Wird in ein <code>array of objects</code> deserialisiert welches 
den Feldnamen, Filtertyp und Filterwert für jede Filterungsanweisung enthält",
+       "apihelp-bs-store-param-page": "Ermöglicht die serverseitige Berechnung 
von start/limit",
+       "apihelp-bs-store-param-limit": "Länge der Ergebnisliste",
+       "apihelp-bs-store-param-start": "Offset für die Ergebnisliste",
+       "apihelp-bs-store-param-callback": "Ein Methodenname aus dem 
Clientcode, der in der Serverantwort aufgerufen werden soll (JSONP)",
+       "apihelp-bs-store-param-query": "Ähnlich zu <var>filter</var>, 
allerdings dient der angegebene Wert nur zur Filterung des <var>value</var> 
Feldes einer ExtJS Komponente",
+       "apihelp-bs-store-param-dc": "<code>Disable cache<code> Parameter",
+       "apihelp-bs-store-param-format": "Das Ausgabeformat (nur JSON oder 
formatiertes JSON)",
+       "apihelp-bs-task-param-task": "Die Aufgabe die ausgeführt werden soll",
+       "apihelp-bs-task-param-taskdata": "JSON Zeichenkette, die zusätzliche 
Daten für die Aufgabe enthält",
+       "apihelp-bs-task-param-format": "Das Ausgabeformat"
+}
\ No newline at end of file
diff --git a/i18n/api/en.json b/i18n/api/en.json
new file mode 100644
index 0000000..19aca64
--- /dev/null
+++ b/i18n/api/en.json
@@ -0,0 +1,22 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Robert Vogel <[email protected]>"
+               ]
+       },
+       "apihelp-bs-filebackend-store-description": "Lists all files from the 
file backend. Allows sorting, filtering and pagination. Implements ExtJS Store 
parameters.",
+       "apihelp-bs-user-store-description": "Lists all users from the 
database. Allows sorting, filtering and pagination. Implements ExtJS Store 
parameters.",
+       "apihelp-bs-store-param-sort": "JSON string with sorting info; 
deserializes to <code>array of objects</code> that hold field name and 
direction for each sorting option",
+       "apihelp-bs-store-param-group": "JSON string with grouping info; 
deserializes to <code>array of objects</code> that hold field name and 
direction for each grouping option",
+       "apihelp-bs-store-param-filter": "JSON string with filter info; 
deserializes to <code>array of objects</code> that hold field name, filter 
type, and filter value for each filtering option",
+       "apihelp-bs-store-param-page": "Allows server side calculation of 
start/limit",
+       "apihelp-bs-store-param-limit": "Number of results to return",
+       "apihelp-bs-store-param-start": "The offset to start the result list 
from",
+       "apihelp-bs-store-param-callback": "A method name in the client code 
that should be called in the response (JSONP)",
+       "apihelp-bs-store-param-query": "Similar to <var>filter</var>, but the 
provided value serves as a filter only for the <var>value</var> field of an 
ExtJS component",
+       "apihelp-bs-store-param-dc": "<code>Disable cache</code> flag",
+       "apihelp-bs-store-param-format": "The format of the output (only JSON 
or formatted JSON)",
+       "apihelp-bs-task-param-task": "The task that should be executed",
+       "apihelp-bs-task-param-taskdata": "JSON string encoded object with 
arbitrary data for the task",
+       "apihelp-bs-task-param-format": "The format of the result"
+}
\ No newline at end of file
diff --git a/i18n/api/qqq.json b/i18n/api/qqq.json
new file mode 100644
index 0000000..a4b0f40
--- /dev/null
+++ b/i18n/api/qqq.json
@@ -0,0 +1,22 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Robert Vogel <[email protected]>"
+               ]
+       },
+       "apihelp-bs-filebackend-store-description": "Describes the API endpoint 
that lists uploaded files",
+       "apihelp-bs-user-store-description": "Describes the API endpoint that 
lists users",
+       "apihelp-bs-store-param-sort": "Describes the <var>sort</var> parameter 
of the API module",
+       "apihelp-bs-store-param-group": "Describes the <var>group</var> 
parameter of the API module",
+       "apihelp-bs-store-param-filter": "Describes the <var>filter</var> 
parameter of the API module",
+       "apihelp-bs-store-param-page": "Describes the <var>page</var> parameter 
of the API module",
+       "apihelp-bs-store-param-limit": "Describes the <var>limit</var> 
parameter of the API module",
+       "apihelp-bs-store-param-start": "Describes the <var>start</var> 
parameter of the API module",
+       "apihelp-bs-store-param-callback": "Describes the <var>callback</var> 
parameter of the API module",
+       "apihelp-bs-store-param-query": "Describes the <var>query</var> 
parameter of the API module",
+       "apihelp-bs-store-param-dc": "Describes the <var>_dc</var> parameter of 
the API module",
+       "apihelp-bs-store-param-format": "Describes the <var>format</var> 
parameter of the API module",
+       "apihelp-bs-task-param-task": "Describes the <var>task</var> parameter 
of the API module",
+       "apihelp-bs-task-param-taskdata": "Describes the <var>taskData</var> 
parameter of the API module",
+       "apihelp-bs-task-param-format": "Describes the <var>format</var> 
parameter of the API module\n\n{{msg-mw|Bs-store-param-format}}"
+}
\ No newline at end of file
diff --git a/includes/api/BSApiExtJSStoreBase.php 
b/includes/api/BSApiExtJSStoreBase.php
index deb6460..81784c0 100644
--- a/includes/api/BSApiExtJSStoreBase.php
+++ b/includes/api/BSApiExtJSStoreBase.php
@@ -125,64 +125,74 @@
                        'sort' => array(
                                ApiBase::PARAM_TYPE => 'string',
                                ApiBase::PARAM_REQUIRED => false,
-                               ApiBase::PARAM_DFLT => '[]'
+                               ApiBase::PARAM_DFLT => '[]',
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-sort',
                        ),
                        'group' => array(
                                ApiBase::PARAM_TYPE => 'string',
                                ApiBase::PARAM_REQUIRED => false,
-                               ApiBase::PARAM_DFLT => '[]'
+                               ApiBase::PARAM_DFLT => '[]',
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-group',
                        ),
                        'filter' => array(
                                ApiBase::PARAM_TYPE => 'string',
                                ApiBase::PARAM_REQUIRED => false,
-                               ApiBase::PARAM_DFLT => '[]'
+                               ApiBase::PARAM_DFLT => '[]',
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-filter',
                        ),
                        'page' => array(
                                ApiBase::PARAM_TYPE => 'integer',
                                ApiBase::PARAM_REQUIRED => false,
-                               ApiBase::PARAM_DFLT => 0
+                               ApiBase::PARAM_DFLT => 0,
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-page',
                        ),
                        'limit' => array(
                                ApiBase::PARAM_TYPE => 'integer',
                                ApiBase::PARAM_REQUIRED => false,
-                               ApiBase::PARAM_DFLT => 25
+                               ApiBase::PARAM_DFLT => 25,
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-limit',
                        ),
                        'start' => array(
                                ApiBase::PARAM_TYPE => 'integer',
                                ApiBase::PARAM_REQUIRED => false,
-                               ApiBase::PARAM_DFLT => 0
+                               ApiBase::PARAM_DFLT => 0,
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-start',
                        ),
 
                        'callback' => array(
                                ApiBase::PARAM_TYPE => 'string',
-                               ApiBase::PARAM_REQUIRED => false
+                               ApiBase::PARAM_REQUIRED => false,
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-callback',
                        ),
 
                        'query' => array(
                                ApiBase::PARAM_TYPE => 'string',
-                               ApiBase::PARAM_REQUIRED => false
+                               ApiBase::PARAM_REQUIRED => false,
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-query',
                        ),
                        '_dc' => array(
                                ApiBase::PARAM_TYPE => 'integer',
-                               ApiBase::PARAM_REQUIRED => false
+                               ApiBase::PARAM_REQUIRED => false,
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-dc',
                        ),
                        'format' => array(
                                ApiBase::PARAM_DFLT => 'json',
-                               ApiBase::PARAM_TYPE => array( 'json', 'jsonfm' )
+                               ApiBase::PARAM_TYPE => array( 'json', 'jsonfm' 
),
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-store-param-format',
                        )
                );
        }
 
        public function getParamDescription() {
                return array(
-                       'sort' => 'JSON string with sorting info; deserializes 
to array of objects that hold filed name and direction for each sorting option',
-                       'group' => 'JSON string with grouping info; 
deserializes to array of objects that hold filed name and direction for each 
grouping option',
-                       'filter' => 'JSON string with filter info; deserializes 
to array of objects that hold filed name, filter type, and filter value for 
each sorting option',
+                       'sort' => 'JSON string with sorting info; deserializes 
to "array of objects" that hold field name and direction for each sorting 
option',
+                       'group' => 'JSON string with grouping info; 
deserializes to "array of objects" that hold field name and direction for each 
grouping option',
+                       'filter' => 'JSON string with filter info; deserializes 
to "array of objects" that hold field name, filter type, and filter value for 
each filtering option',
                        'page' => 'Allows server side calculation of 
start/limit',
                        'limit' => 'Number of results to return',
                        'start' => 'The offset to start the result list from',
-                       'query' => 'This is similar to "filter", but the 
provided value serves as a filter only for the "value" field of an ExtJS 
component',
-                       'callback' => 'The offset to start the result list 
from',
+                       'query' => 'Similar to "filter", but the provided value 
serves as a filter only for the "value" field of an ExtJS component',
+                       'callback' => 'A method name in the client code that 
should be called in the response (JSONP)',
                        '_dc' => '"Disable cache" flag',
                        'format' => 'The format of the output (only JSON or 
formatted JSON)'
                );
diff --git a/includes/api/BSApiTasksBase.php b/includes/api/BSApiTasksBase.php
index 986a7d3..04995ba 100644
--- a/includes/api/BSApiTasksBase.php
+++ b/includes/api/BSApiTasksBase.php
@@ -88,15 +88,18 @@
                        'task' => array(
                                ApiBase::PARAM_REQUIRED => true,
                                ApiBase::PARAM_TYPE => $this->aTasks,
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-task-param-task',
                        ),
                        'taskData' => array(
                                ApiBase::PARAM_TYPE => 'string',
                                ApiBase::PARAM_REQUIRED => false,
-                               ApiBase::PARAM_DFLT => '{}'
+                               ApiBase::PARAM_DFLT => '{}',
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-task-param-taskdata',
                        ),
                        'format' => array(
                                ApiBase::PARAM_DFLT => 'json',
                                ApiBase::PARAM_TYPE => array( 'json', 'jsonfm' 
),
+                               10 /*ApiBase::PARAM_HELP_MSG*/ => 
'apihelp-bs-task-param-format',
                        )
                );
        }
@@ -119,7 +122,7 @@
         */
        public function getParamDescription() {
                return array(
-                       'task' => 'The task you would like to execute',
+                       'task' => 'The task that should be executed',
                        'taskData' => 'JSON string encoded object with 
arbitrary data for the task',
                        'format' => 'The format of the result',
                );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c4ba27659456028883779d7377eb23bf447bc3a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: Dvogel hallowelt <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to