r99049 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99048‎ | r99049 | r99050 >
Date:20:38, 5 October 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
[RL2] Fix message keys (follows-up r97052 and friends about validation)
Modified paths:
  • /branches/RL2/extensions/Gadgets/Gadgets.i18n.php (modified) (history)
  • /branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.js (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/Gadgets.i18n.php
@@ -97,9 +97,9 @@
9898 'gadgetmanager-comment-create' => 'Created definition of Gadget [[Special:Gadgets/$1|$1]]',
9999
100100 # Validation error messages
101 - 'gadget-validate-invalidjson' => 'The gadget definition page contents are not a valid JSON object.',
102 - 'gadget-validate-notset' => 'The property $1 is not set.',
103 - 'gadget-validate-wrongtype' => 'The property $1 must be of type $2 instead of $3.',
 101+ 'gadgets-validate-invalidjson' => 'The gadget definition page contents are not a valid JSON object.',
 102+ 'gadgets-validate-notset' => 'The property $1 is not set.',
 103+ 'gadgets-validate-wrongtype' => 'The property $1 must be of type $2 instead of $3.',
104104
105105 # Permissions
106106 'gadgets-cant-create' => 'You do not have the right to create new Gadgets.',
@@ -177,8 +177,8 @@
178178 'gadgetmanager-comment-create' => 'Edit summary used when creating gadget definition pages through AJAX on [[Special:Gadgets]].',
179179
180180 # Validation error messages
181 - 'gadget-validate-notset' => '$1 is the name of the property, e.g. settings.rights .',
182 - 'gadget-validate-wrongtype' => '* $1 is the name of the property, e.g. settings.rights or module.messages[3].
 181+ 'gadgets-validate-notset' => '$1 is the name of the property, e.g. settings.rights .',
 182+ 'gadgets-validate-wrongtype' => '* $1 is the name of the property, e.g. settings.rights or module.messages[3].
183183 * $2 is the type that this property is expected to have
184184 * $3 is the type it actually had',
185185
Index: branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.js
@@ -545,6 +545,7 @@
546546 meta: 'allmessages',
547547 amprefix: data.term,
548548 amnocontent: true,
 549+ amincludelocal: true,
549550 amlang: mw.config.get( 'wgContentLanguage' )
550551 }, function( json ) {
551552 if ( json && json.query && json.query.allmessages ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97052RL2: Followup to r96954 and r97005: add i18n messages for the validation stuf...catrope13:10, 14 September 2011

Comments

#Comment by Krinkle (talk | contribs)   20:39, 5 October 2011

Also adds amincludelocal parameter to message-api call. This is needed to make sure local messages (that are not overriding a php message but are entire new) are also included in the response

Status & tagging log