r49636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49635‎ | r49636 | r49637 >
Date:21:47, 18 April 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Allow plural in 'sf_property_allowedvals'
Modified paths:
  • /trunk/extensions/SemanticForms/languages/SF_Messages.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_CreateProperty.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_CreateProperty.php
@@ -45,12 +45,14 @@
4646 $text .= ' ' . wfMsgForContent('sf_property_linkstoform', $default_form_tag);
4747 }
4848 if ($allowed_values_str != '') {
49 - $text .= "\n\n" . wfMsgForContent('sf_property_allowedvals');
5049 // replace the comma substitution character that has no chance of
5150 // being included in the values list - namely, the ASCII beep
5251 global $sfgListSeparator;
5352 $allowed_values_str = str_replace("\\$sfgListSeparator", "\a", $allowed_values_str);
5453 $allowed_values_array = explode($sfgListSeparator, $allowed_values_str);
 54+
 55+ $text .= "\n\n" . wfMsgExtForContent('sf_property_allowedvals', 'parsemag', count( $allowed_values_array ) );
 56+
5557 foreach ($allowed_values_array as $i => $value) {
5658 // replace beep back with comma, trim
5759 $value = str_replace("\a", $sfgListSeparator, trim($value));
Index: trunk/extensions/SemanticForms/languages/SF_Messages.php
@@ -106,7 +106,7 @@
107107 // content messages
108108 'sf_property_isproperty' => 'This is a property of type $1.',
109109 'sf_property_linkstoform' => 'It links to pages that use the form $1.',
110 - 'sf_property_allowedvals' => 'The allowed values for this property are:',
 110+ 'sf_property_allowedvals' => 'The allowed {{PLURAL:$1|value for this property is|values for this property are}}:',
111111 'sf_template_docu' => 'This is the \'$1\' template.
112112 It should be called in the following format:',
113113 'sf_template_docufooter' => 'Edit the page to see the template text.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r50101Follow-up for r49636. *blush*...siebrand08:16, 1 May 2009

Status & tagging log