r112441 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112440‎ | r112441 | r112442 >
Date:16:04, 26 February 2012
Author:robin
Status:ok
Tags:
Comment:
* Make the titles Format, Action & Documentation translatable
* Mark the parameter description as LTR because it's always in English (mw-content-ltr class because there are ul lists sometimes)
Modified paths:
  • /trunk/extensions/ApiSandbox/ApiSandbox.i18n.php (modified) (history)
  • /trunk/extensions/ApiSandbox/SpecialApiSandbox.php (modified) (history)
  • /trunk/extensions/ApiSandbox/ext.apiSandbox.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ApiSandbox/SpecialApiSandbox.php
@@ -88,9 +88,9 @@
8989 <table class="api-sandbox-options">
9090 <tbody>
9191 <tr>
92 - <th><label for="api-sandbox-format">Format</label></th>
93 - <th><label for="api-sandbox-action">Action</label></th>
94 - <th class="api-sandbox-docs-col">Documentation</th>
 92+ <th><label for="api-sandbox-format">' . wfMessage( 'apisb-label-format' )->escaped() . '</label></th>
 93+ <th><label for="api-sandbox-action">' . wfMessage( 'apisb-label-action' )->escaped() . '</label></th>
 94+ <th class="api-sandbox-docs-col">' . wfMessage( 'apisb-label-doc' )->escaped() . '</th>
9595 </tr>
9696 <tr>
9797 <td>' . self::getSelect( 'format', $formatOptions, 'json' ) . '</td>
Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js
@@ -352,7 +352,7 @@
353353 )
354354 )
355355 .append( $( '<td class="api-sandbox-params-value"></td>' ).html( this.input( param, name ) ) )
356 - .append( $( '<td>' ).html( smartEscape( param.description ) ) )
 356+ .append( $( '<td class="mw-content-ltr" dir="ltr">' ).html( smartEscape( param.description ) ) )
357357 .appendTo( $tbody );
358358 }
359359 this.$container.html( $table );
Index: trunk/extensions/ApiSandbox/ApiSandbox.i18n.php
@@ -21,6 +21,9 @@
2222 'apisb-legend-generator-parameters'=> 'Generator',
2323 'apisb-result-request-url' => 'Request URL:',
2424 'apisb-result-request-post' => 'POST data:',
 25+ 'apisb-label-format' => 'Format',
 26+ 'apisb-label-action' => 'Action',
 27+ 'apisb-label-doc' => 'Documentation',
2528 'apisb-select-action' => '(select action)',
2629 'apisb-select-query' => '(select query)',
2730 'apisb-select-value' => '(select value)',
@@ -59,6 +62,9 @@
6063 'apisb-legend-generator-parameters' => 'Refers to an [https://www.mediawiki.org/wiki/API:Query#Generators API concept]',
6164 'apisb-result-request-url' => 'Used as "label" for a read-only form field containing the exact URL that was (or is going to be) loaded.',
6265 'apisb-result-request-post' => 'Used as "label" for a ready-only form field containing the POST query parameters of the HTTP request made',
 66+ 'apisb-label-format' => 'Label text for selecting the output format (json, xml, php, ...)',
 67+ 'apisb-label-action' => 'Label text for selecting the action (query, edit, ...)',
 68+ 'apisb-label-doc' => 'Label text of information about the selected action',
6369 'apisb-select-action' => 'This is the placeholder text in the "select" dropdown menu containing options with various action modules.',
6470 'apisb-select-query' => 'This is the placeholder text in the "select" dropdown menu containing options with various query types.',
6571 'apisb-select-value' => 'This is the generic placeholder text in "select" dropdown menus containing custom options (e.g. wiki namespaces, content direction, ..)',

Status & tagging log