[LON-CAPA-cvs] cvs: loncom /publisher testbankimport.pm

raeburn raeburn at source.lon-capa.org
Sun Dec 16 14:04:35 EST 2012


raeburn		Sun Dec 16 19:04:35 2012 EDT

  Modified files:              
    /loncom/publisher	testbankimport.pm 
  Log:
  - Localization - HTML mark-up in &mt().  
  
  
-------------- next part --------------
Index: loncom/publisher/testbankimport.pm
diff -u loncom/publisher/testbankimport.pm:1.35 loncom/publisher/testbankimport.pm:1.36
--- loncom/publisher/testbankimport.pm:1.35	Mon Oct 29 17:38:55 2012
+++ loncom/publisher/testbankimport.pm	Sun Dec 16 19:04:35 2012
@@ -1,5 +1,5 @@
 # Handler for parsing text upload problem descriptions into .problems
-# $Id: testbankimport.pm,v 1.35 2012/10/29 17:38:55 raeburn Exp $
+# $Id: testbankimport.pm,v 1.36 2012/12/16 19:04:35 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -489,7 +489,7 @@
     if ($fn eq '') {
         $r->print('<b>'.&mt('Incomplete file upload').'</b> '.&mt('Return to the [_1]construction space menu[_2] to upload a file','<a href="'.$webpath.'">','</a>'));
     }
-    $r->print(&mt('The <b>Testbank Upload</b> utility can be used by LON-CAPA authors to generate LON-CAPA problem files from a testbank file of questions/answers.').'<br />'.
+    $r->print(&mt('The [_1]Testbank Upload[_2] utility can be used by LON-CAPA authors to generate LON-CAPA problem files from a testbank file of questions/answers.','<b>','</b>').'<br />'.
               &mt('The following question types can be converted:').'
               <ul>
                 <li>'.&mt('multiple choice').'</li>
@@ -536,9 +536,9 @@
               &Apache::lonhtmlcommon::topic_bar(2,$topics{2}).'<p>'.
               &mt('A number in the specified format should appear at the start of each question.').'<br />'.
               &mt('For multiple choice questions, the question number must begin the line that contains the question text; foils (starting (a), (i) etc.) should occur on subsequent lines.').'<br />'."\n".
-              &mt('Correct answers should be numbered in the same way as the questions and should appear after <b>all</b> the questions (including question text and possible foils for all questions).').'<br />'."\n".
+              &mt('Correct answers should be numbered in the same way as the questions and should appear after [_1]all[_2] the questions (including question text and possible foils for all questions).','<b>','</b>').'<br />'."\n".
               &mt('Each numbered question must have a corresponding numbered answer, although the answer itself may be blank for essay questions.').'<br /><br />'."\n".
-              &mt('For example, you would select <b>1.</b> if your testbank file contained the following questions:').'<br /><blockquote>'.
+              &mt('For example, you would select [_1]1.[_2] if your testbank file contained the following questions:','<b>','</b>').'<br /><blockquote>'.
 '<pre>
  1. '.&mt('The capital of the USA is ...').'
  (a) Washington D.C.
@@ -557,7 +557,7 @@
 </pre>'.
              '</blockquote></p>'.
              &Apache::lonhtmlcommon::topic_bar(3,$topics{3}).'<p>'.
-             &mt('For example, you would enter <b>6</b> if your testbank file contained the following sequence of questions:').'</p><blockquote>'.
+             &mt('For example, you would enter [_1]6[_2] if your testbank file contained the following sequence of questions:','<b>','</b>').'</p><blockquote>'.
              &mt('10 multiple choice questions').'<br />'.
              &mt('5 essay questions').'<br />'.
              &mt('5 fill-in-the-blank questions').'<br />'.
@@ -601,15 +601,15 @@
     my $steptitle = &mt('Information about question types and formats in each block.');
     $r->print('<h3>'.&mt('Classification of blocks').'</h3>'.
               '<form method="post" name="display" action="/adm/testbank"><p>'.
-              &mt('You indicated that <b>all</b> questions (and the corresponding answer(s) for each question) begin with a number in the following format: [_1].','<b>'.$qnumtypes{$qnumformat}.'</b>').'</p><p>'.
-              &mt('A total of <b>[quant,_1,question]</b> and <b>[quant,_2,answer]</b> were found in the file you uploaded.',$qcount,$qcount).' '.
-              &mt('If this total does not match the number you expect, examine your original testbank file to verify that each question <i>and</i> each answer begins with a number in the specified format.').' '.
+              &mt('You indicated that [_1]all[_2] questions (and the corresponding answer(s) for each question) begin with a number in the following format: [_3].','<b>','</b>','<b>'.$qnumtypes{$qnumformat}.'</b>').'</p><p>'.
+              &mt('A total of [_1][quant,_3,question][_2] and [_1][quant,_4,answer][_2] were found in the file you uploaded.','<b>','</b>',$qcount,$qcount).' '.
+              &mt('If this total does not match the number you expect, examine your original testbank file to verify that each question [_1]and[_2] each answer begins with a number in the specified format.','<i>','</i>').' '.
               &mt('If necessary use an editor to edit your testbank file of questions, and click "Previous Page" on this page and the "Exit Now" on the preceding page, so you can upload your file again.').'</p><p>'.
-              &mt('You also indicated that the <b>[quant,_1,question]</b> can be divided into <b>[quant,_2,block]</b> of questions of a particular question type.',$qcount,$blocks).'</p><p>'.
+              &mt('You also indicated that the [_1][quant,_3,question][_2] can be divided into [_1][quant,_4,block][_2] of questions of a particular question type.','<b>','</b>',$qcount,$blocks).'</p><p>'.
               &mt('Provide additional information below, about the types of questions you have uploaded, and, if applicable, the format of answers and "foils" for specific types of questions.').'</p>'.
               &show_uploaded_data($textref,$header).
               &Apache::lonhtmlcommon::topic_bar(4,$steptitle).'<p>'.
-              &mt('For <i>each</i> of the [_1] question blocks, specify the question numbers of the first and last questions in the block (e.g., 1 and 10), and the question type of the questions in the block.','<b>'.$blocks.'</b>').' '.
+              &mt('For [_1]each[_2] of the [_3] question blocks, specify the question numbers of the first and last questions in the block (e.g., 1 and 10), and the question type of the questions in the block.','<i>','</i>','<b>'.$blocks.'</b>').' '.
               &mt('If required, provide additional information about foil formats and answer formats for the question types you select.').'</p><p>'.
               &Apache::loncommon::start_data_table().
               &Apache::loncommon::start_data_table_header_row().
@@ -647,14 +647,14 @@
                      &Apache::loncommon::end_data_table_row()); 
     }
     $r->print(&Apache::loncommon::end_data_table().'</p><ul><li>'.
-              &mt('For <i>multiple choice</i>, <i>multiple correct answer</i> and <i>ranking</i> type questions, you must use the <b>Foil format</b> column to choose the format of the identifier used for each of the possible answers (e.g., (a), a, a., i, (i) etc.) provided for a given question stem.').'</li><li>'.
-             &mt('For <i>multiple correct answer</i> and <i>fill-in-the-blank</i> questions with more than one correct answer you must use the <b>Answer format</b> column to choose the separator used between the answers, e.g., if the correct answers for question 28. were listed as:[_1] you would choose "comma", or if they were listed as:[_2] you would choose "new line".','<blockquote><pre>28. (a),(d),(e)</pre></blockquote>','<blockquote><pre>
+              &mt('For [_1]multiple choice[_2], [_1]multiple correct answer[_2] and [_1]ranking[_2] type questions, you must use the [_3]Foil format[_4] column to choose the format of the identifier used for each of the possible answers (e.g., (a), a, a., i, (i) etc.) provided for a given question stem.','<i>','</i>','<b>','</b>').'</li><li>'.
+             &mt('For [_1]multiple correct answer[_2] and [_1]fill-in-the-blank[_2] questions with more than one correct answer you must use the [_3]Answer format[_4] column to choose the separator used between the answers, e.g., if the correct answers for question 28. were listed as:[_5] you would choose "comma", or if they were listed as:[_6] you would choose "new line".','<i>','</i>','<b>','</b>','<blockquote><pre>28. (a),(d),(e)</pre></blockquote>','<blockquote><pre>
 28. (a)
     (d)
     (e)
 </pre></blockquote>').'</li><li>'.
-             &mt('For <i>true/false</i> questions you must use the <b>Answer format</b> column to choose how the correct answer - True or False, is displayed in the text file (e.g., T or F, true or false etc.).').'</li><li>'.
-            &mt('For <i>ranking</i> questions you must use the <b>Answer format</b> column to choose the separator used between the (ranked) answers.').'</li></ul>
+             &mt('For [_1]true/false[_2] questions you must use the [_3]Answer format[_4] column to choose how the correct answer - True or False, is displayed in the text file (e.g., T or F, true or false etc.).','<i>','</i>','<b>','</b>').'</li><li>'.
+            &mt('For [_1]ranking[_2] questions you must use the [_3]Answer format[_4] column to choose the separator used between the (ranked) answers.','<i>','</i>','<b>','</b>').'</li></ul>
 <input type="hidden" name="blocks" value="'.$blocks.'" />
 <input type="hidden" name="qnumformat" value="'.$qnumformat.'" />'.
            &page_footer($env{'form.newdir'},$fn,$page).'


More information about the LON-CAPA-cvs mailing list