https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112441

Revision: 112441
Author:   robin
Date:     2012-02-26 16:04:17 +0000 (Sun, 26 Feb 2012)
Log Message:
-----------
* 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
    trunk/extensions/ApiSandbox/SpecialApiSandbox.php
    trunk/extensions/ApiSandbox/ext.apiSandbox.js

Modified: trunk/extensions/ApiSandbox/ApiSandbox.i18n.php
===================================================================
--- trunk/extensions/ApiSandbox/ApiSandbox.i18n.php     2012-02-26 15:57:01 UTC 
(rev 112440)
+++ trunk/extensions/ApiSandbox/ApiSandbox.i18n.php     2012-02-26 16:04:17 UTC 
(rev 112441)
@@ -21,6 +21,9 @@
        'apisb-legend-generator-parameters'=> 'Generator',
        'apisb-result-request-url' => 'Request URL:',
        'apisb-result-request-post' => 'POST data:',
+       'apisb-label-format'      => 'Format',
+       'apisb-label-action'      => 'Action',
+       'apisb-label-doc'         => 'Documentation',
        'apisb-select-action'     => '(select action)',
        'apisb-select-query'      => '(select query)',
        'apisb-select-value'      => '(select value)',
@@ -59,6 +62,9 @@
        'apisb-legend-generator-parameters' => 'Refers to an 
[https://www.mediawiki.org/wiki/API:Query#Generators API concept]',
        '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.',
        'apisb-result-request-post' => 'Used as "label" for a ready-only form 
field containing the POST query parameters of the HTTP request made',
+       'apisb-label-format' => 'Label text for selecting the output format 
(json, xml, php, ...)',
+       'apisb-label-action' => 'Label text for selecting the action (query, 
edit, ...)',
+       'apisb-label-doc' => 'Label text of information about the selected 
action',
        'apisb-select-action' => 'This is the placeholder text in the "select" 
dropdown menu containing options with various action modules.',
        'apisb-select-query' => 'This is the placeholder text in the "select" 
dropdown menu containing options with various query types.',
        'apisb-select-value' => 'This is the generic placeholder text in 
"select" dropdown menus containing custom options (e.g. wiki namespaces, 
content direction, ..)',

Modified: trunk/extensions/ApiSandbox/SpecialApiSandbox.php
===================================================================
--- trunk/extensions/ApiSandbox/SpecialApiSandbox.php   2012-02-26 15:57:01 UTC 
(rev 112440)
+++ trunk/extensions/ApiSandbox/SpecialApiSandbox.php   2012-02-26 16:04:17 UTC 
(rev 112441)
@@ -88,9 +88,9 @@
 <table class="api-sandbox-options">
        <tbody>
                <tr>
-                       <th><label for="api-sandbox-format">Format</label></th>
-                       <th><label for="api-sandbox-action">Action</label></th>
-                       <th class="api-sandbox-docs-col">Documentation</th>
+                       <th><label for="api-sandbox-format">' . wfMessage( 
'apisb-label-format' )->escaped() . '</label></th>
+                       <th><label for="api-sandbox-action">' . wfMessage( 
'apisb-label-action' )->escaped() . '</label></th>
+                       <th class="api-sandbox-docs-col">' . wfMessage( 
'apisb-label-doc' )->escaped() . '</th>
                </tr>
                <tr>
                        <td>' . self::getSelect( 'format', $formatOptions, 
'json' ) . '</td>

Modified: trunk/extensions/ApiSandbox/ext.apiSandbox.js
===================================================================
--- trunk/extensions/ApiSandbox/ext.apiSandbox.js       2012-02-26 15:57:01 UTC 
(rev 112440)
+++ trunk/extensions/ApiSandbox/ext.apiSandbox.js       2012-02-26 16:04:17 UTC 
(rev 112441)
@@ -352,7 +352,7 @@
                                                )
                                        )
                                        .append( $( '<td 
class="api-sandbox-params-value"></td>' ).html( this.input( param, name ) ) )
-                                       .append( $( '<td>' ).html( smartEscape( 
param.description ) ) )
+                                       .append( $( '<td class="mw-content-ltr" 
dir="ltr">' ).html( smartEscape( param.description ) ) )
                                        .appendTo( $tbody );
                        }
                        this.$container.html( $table );


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

Reply via email to