Changeset 18460 for gsdl/trunk/runtime-src/src/recpt/gtiaction.cpp
- Timestamp:
- 2009-02-04T15:02:01+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/recpt/gtiaction.cpp
r17545 r18460 192 192 193 193 // Define the page content for the GTI view status page 194 195 196 197 194 if (args["p"] == "status") { 195 define_gti_status_page(disp, args, logout); 196 return; 197 } 198 198 199 199 // Process user translations 200 200 if (args["p"] == "submit") { 201 201 process_gti_submissions(disp, args, logout, true); 202 } 203 204 if (args["p"] == "glihelp") { 205 produce_glihelp_zipfile(disp, args, logout); 202 206 } 203 207 … … 335 339 336 340 337 341 //lang_status_temp += "<td valign=\"top\" nowrap>_gtitranslationfilestatus2_(" + num_chunks_translated + "," + num_chunks_requiring_translation + "," + num_chunks_requiring_updating + ")</td>"; 338 342 339 340 343 // List the file names as the first row of the status table 344 // Add up number of strings need to be translate in each file, as the second line of the status table 341 345 if (first_lang) { 342 346 files_temp += "<th class=\"status\">_textgti" + translation_file_key + "_</th>\n"; … … 484 488 languageinfo_tmap loaded_languages = recpt->get_configinfo().languages; 485 489 disp.setmacro("gtitargetlanguagename", "gti", loaded_languages[target_language_code].longname); 486 disp.setmacro("gtitargetfilepath", "gti", gti_response.translation_files_key_to_target_file_path_mapping[translation_file_key]); 490 if (translation_file_key == "glihelp") { 491 disp.setmacro("gtitargetfilepath", "gti", "_gtidownloadglihelp_"); 492 } else { 493 disp.setmacro("gtitargetfilepath", "gti", gti_response.translation_files_key_to_target_file_path_mapping[translation_file_key]); 494 } 487 495 disp.setmacro("gtitranslationfiledesc", "gti", "_gti:textgti" + translation_file_key + "_"); 488 496 disp.setmacro("gtiviewtranslationfileinaction", "gti", "_gti:gtiview" + translation_file_key + "inaction_"); … … 618 626 text_t target_language_code = args["tlc"]; 619 627 text_t translation_file_key = args["tfk"]; 628 text_t target_chunk_type = args["tct"]; 620 629 621 630 // Send a request to gti.pl to get the Excel spreadsheet data 622 text_t gti_arguments = "get-first-n-chunks-requiring-work " + target_language_code + " " + translation_file_key + " " + "10000" + " | java -cp /home/nzdl/gti ApplyXSLT /home/nzdl/gti/gti-generate-excel-xml.xsl -"; 623 text_t gti_response_xml_text = do_gti_request(gti_arguments, logout); 631 text_t gti_arguments = ""; 632 if (target_chunk_type == "work") { 633 gti_arguments = "get-first-n-chunks-requiring-work " + target_language_code + " " + translation_file_key + " " + "10000" + " | /opt/jdk1.6.0/bin/java -cp /home/nzdl/gti:/home/nzdl/gti/xalan.jar ApplyXSLT /home/nzdl/gti/gti-generate-excel-xml.xsl -"; 634 } else { 635 gti_arguments = "get-all-chunks " + target_language_code + " " + translation_file_key + " | /opt/jdk1.6.0/bin/java -cp /home/nzdl/gti:/home/nzdl/gti/xalan.jar ApplyXSLT /home/nzdl/gti/gti-generate-excel-xml.xsl -"; 636 } 637 638 text_t gti_response_xml_text = do_gti_request(gti_arguments, logout); 624 639 if (gti_response_xml_text == "") { 625 640 // An error has occurred … … 635 650 } 636 651 652 bool gtiaction::produce_glihelp_zipfile(displayclass& disp, cgiargsclass& args, ostream& logout) 653 { 654 text_t target_language_code = args["tlc"]; 655 text_t gti_arguments = "create-glihelp-zip-file " + target_language_code; 656 657 do_gti_request(gti_arguments, logout); 658 659 disp.setmacro("gtiglihelpzipfilepath", "gti", target_language_code + "_GLIHelp.zip"); 660 661 return true; 662 } 637 663 638 664
Note:
See TracChangeset
for help on using the changeset viewer.