Changeset 4068 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
2003-04-01T16:19:09+12:00 (21 years ago)
Author:
mdewsnip
Message:

Files specific to a translation process are now stored in a separate subdirectory of tmp/lang.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/langaction.cpp

    r3859 r4068  
    5050
    5151// gets the list of packages/files that contain the content of the web-forms
    52 text_tarray get_pagenos(text_t dir, ostream &logout)
     52text_tarray get_pagenos(text_t dir, text_t lang, ostream &logout)
    5353{
    5454  text_tarray pagenos;
    5555
    5656  // file 'logfile' contains all the page numbers, one number per line
    57   text_t logfile = filename_cat(dir, "package_forms", "pageno.log");
     57  text_t logfile = filename_cat(dir, "package_forms", lang, "pageno.log");
    5858 
    5959  //open the file as a read only file
     
    243243//      lang = args["language"];
    244244//    }
     245
     246  // else if (args["tlng"] != "") {
     247  //   lang = args["tlng"];
     248  // }
     249  else if (args["language"] != "") {
     250    lang = args["language"];
     251  }
    245252  else if (args["tlng"] != "") {
    246253    lang = args["tlng"];
     
    255262  //  baselanguage = args["baselanguage"];
    256263  //}
    257  
     264
     265  logout << "Lang: " << lang << " Baselanguage: " << baselanguage << endl;
     266
    258267  // argument for page is of the form 'macrofile_pageno' so
    259268  // we need to split the argument to get the proper page content
     
    311320
    312321  //if no more pages will set pageno to thankyou script
    313   pagenos = get_pagenos(dir,logout);
     322  pagenos = get_pagenos(dir, lang, logout);
    314323 
    315324  if (pagenos.empty() && pageno == "")
     
    346355  }
    347356
    348   pagenos = get_pagenos(dir,logout);
     357  pagenos = get_pagenos(dir, lang, logout);
    349358  define_webpage(disp, protos, logout, pageno, lang, dir, pagenos, text, baselanguage);
    350359}
     
    359368  // current package whose name is stored in 'package'
    360369
    361   text_t formfile = filename_cat(dir, "package_forms");
     370  text_t formfile;
     371  if (pageno == "picklanguage")
     372    formfile = filename_cat(dir, "package_forms");
     373  else
     374    formfile = filename_cat(dir, "package_forms", lang);
    362375  formfile += ("/" + pageno + ".lang");
    363376   
Note: See TracChangeset for help on using the changeset viewer.