fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-09-06 10:17 am

[dw-free] Poll creator: use the word "response" instead of "option"

[commit: http://hg.dwscoalition.org/dw-free/rev/47b37cad7560]

http://bugs.dwscoalition.org/show_bug.cgi?id=3849

Rephrase instructions for min/max required, for clarity. Also use
"responses" instead of "options",

Patch by [personal profile] ninetydegrees.

Files modified:
  • htdocs/poll/create.bml
  • htdocs/poll/create.bml.text
--------------------------------------------------------------------------------
diff -r 2d238cc80bc3 -r 47b37cad7560 htdocs/poll/create.bml
--- a/htdocs/poll/create.bml	Tue Sep 06 18:11:33 2011 +0800
+++ b/htdocs/poll/create.bml	Tue Sep 06 18:16:58 2011 +0800
@@ -294,12 +294,12 @@
             if ($qrec->{'type'} == 'check') {
                 my $checkmin = $qrec->{'checkmin'};
                 if ($checkmin > $num_opts) {
-                    $err->{$q}->{'checkmin'} = $ML{'.error.checkmintoohigh'};
+                    $err->{$q}->{'checkmin'} = LJ::Lang::ml( ".error.checkmintoohigh2" );
                 }
                 
                 my $checkmax = $qrec->{'checkmax'};
                 if ($checkmax < $checkmin) {
-                    $err->{$q}->{'checkmax'} = $ML{'.error.checkmaxtoolow'};
+                    $err->{$q}->{'checkmax'} = LJ::Lang::ml( ".error.checkmaxtoolow2" );
                 }
             }
         }
@@ -548,7 +548,7 @@
 
             # question text and hidden fields
             $ret .= LJ::html_hidden("pq_${q}_type", $elem->{'type'}, "pq_${q}_opts", $elem->{'opts'});
-            $ret .= "<br />Question:<br />";
+            $ret .= "<br />" . LJ::Lang::ml( ".question" ) . "<br />";
             $ret .= LJ::html_text({ 'name' => "pq_${q}_question", 'size' => '50',
                                     'maxlength' => $RULES{'question'}->{'maxlength'},
                                     'value' => $elem->{"question"} }) . "\n";
@@ -559,7 +559,7 @@
 
             # spit out opts -- choices for drop-down, radio, etc questions
             if ($elem->{'type'} =~ /^(radio|check|drop)$/) {
-                $ret .= "Options:\n";
+                $ret .= LJ::Lang::ml( ".options2" ) . "\n";
                 foreach my $o (0..$elem->{'opts'}-1) {
                     $ret .= "<br />";
 
@@ -573,18 +573,19 @@
                     if $err->{$q}->{"items"};
                 $ret .= $elem->{'opts'} < $RULES{'items'}->{'max'}
                     ? "<br />" . LJ::html_submit("request:$q:do", undef, { 'raw' => " value='More &gt;&gt;'" }) . "\n"
-                    : "<br /><?de [$ML{'.options.limitreached'}] de?>\n";
+                    : "<br />" . LJ::Lang::ml ( ".options.limitreached2" ) . "\n";
                 
                 if ($elem->{'type'} eq 'check') {
                     $ret .= "<br/>";
+                    my $minnumber .= LJ::html_text({ 'name' => "pq_${q}_checkmin",
+                                                'value' => defined $elem->{'checkmin'} ? $elem->{'checkmin'} : $RULES{'checkbox'}->{'checkmin'},
+                                                'size' => '3', 'maxlength' => '9' }) . "\n";
+                    my $maxnumber .= LJ::html_text({ 'name' => "pq_${q}_checkmax",
+                                                'value' => defined $elem->{'checkmax'} ? $elem->{'checkmax'} : $RULES{'checkbox'}->{'checkmax'},
+                                                'size' => '3', 'maxlength' => '9' }) . "\n";
+                    $ret .= LJ::Lang::ml( ".checknumber", { min => $minnumber, max => $maxnumber } );
                     foreach my $atr ( qw(checkmin checkmax) ) {
-                        $ret .= $ML{"." . $atr};
-                        $ret .= LJ::html_text({ 'name' => "pq_${q}_$atr",
-                                                'value' => defined $elem->{$atr} ? $elem->{$atr} : $RULES{'checkbox'}->{$atr},
-                                                'size' => '3', 'maxlength' => '9' }) . "\n";
-                    }                           
-                    foreach my $atr ( qw(checkmin checkmax) ) {
-                       $ret .= "<br /><font size='1'><b>[$err->{$q}->{$atr}]</b></font>\n"
+                       $ret .= "<br /><font size='1'><b>$err->{$q}->{$atr}</b></font>\n"
                             if $err->{$q}->{$atr};
                     }
                 } 
diff -r 2d238cc80bc3 -r 47b37cad7560 htdocs/poll/create.bml.text
--- a/htdocs/poll/create.bml.text	Tue Sep 06 18:11:33 2011 +0800
+++ b/htdocs/poll/create.bml.text	Tue Sep 06 18:16:58 2011 +0800
@@ -11,9 +11,7 @@
 
 .button.startover=Start Over
 
-.checkmax=Maximum options accepted: 
-
-.checkmin=Minimum options required: 
+.checknumber=Require at least [[min]] but no more than [[max]] selections.
 
 .elements.limitreached=Question limit reached
 
@@ -21,9 +19,9 @@
 
 .error.allitemsblank=All items can't be blank.
 
-.error.checkmaxtoolow=Maximum value for checkbox options is too low
+.error.checkmaxtoolow2=[The maximum number of selections is too low.]
 
-.error.checkmintoohigh=Minimum value for checkbox options is too high
+.error.checkmintoohigh2=[The minimum number of selections is too high.]
 
 .error.notext=You must include a question
 
@@ -41,17 +39,15 @@
 
 .error.scaletoobig1=Your scale exceeds the limit of [[maxselections]] selections by [[selections]].
 
-.error.texttoolong=The text of your option is too long and has been truncated.
-
 .haserrors=You have one or more errors in your poll.  Please scroll down for more details.
 
 .insertquestion=Question type
 
 .isanon=Anonymize poll results. No one can see who voted, not even you.
 
-.options=Options:
+.options2=Responses:
 
-.options.limitreached=Option limit reached
+.options.limitreached2=[You've reached the maximum number of responses you can add.]
 
 .pollname=Poll Name: <em>(optional)</em>
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org