Branch: Tag:

2000-07-14

2000-07-14 20:03:02 by Andreas Lange <andreas@lange.cx>

Locale fixes

Rev: server/base_server/configuration.pike:1.321
Rev: server/base_server/global_variables.pike:1.35
Rev: server/base_server/roxen.pike:1.507

3:   //   // German translation by Kai Voigt    - constant cvs_version = "$Id: configuration.pike,v 1.320 2000/07/11 01:49:54 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.321 2000/07/14 20:02:55 lange Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>
22:   #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // Locale support... - //<locale-token project="base_server">LOCALE</locale-token> - #define LOCALE(X,Y) _STR_LOCALE(base_server,X,Y) - LOCALE_PROJECT(base_server); + //<locale-token project="config_interface">LOCALE</locale-token> + #define LOCALE(X,Y) _STR_LOCALE(config_interface,X,Y) + LOCALE_PROJECT(config_interface);   #define DLOCALE(X,Y) _DEF_LOCALE(X,Y)      #ifdef THROTTLING_DEBUG
523:    {    remove_call_out( do_open );    call_out( do_open, 120 ); -  report_error("Failed to open logfile "+fname+" " +  report_error(LOCALE("j", "Failed to open logfile ")+fname+" "   #if constant(strerror)    "(" + strerror(errno()) + ")"   #endif
711:    float dt = (float)(time(1) - roxen->start_time + 1);       res = "<p><table>"; -  res += sprintf(LOCALE("", "<tr align=\"right\"><td><b>Sent data:</b></td><td>%.2fMB" -  "</td><td>%.2f Kbit/sec</td>" -  "<td><b>Sent headers:</b></td><td>%.2fMB</td></tr>\n" -  "<tr align=\"right\"><td><b>Number of requests:</b></td>" -  "<td>%8d</td><td>%.2f/min</td>" -  "<td><b>Received data:</b></td><td>%.2fMB</td></tr>\n"), -  ((float)sent/(1024.0*1024.0)), -  (((float)sent)/(1024.0*1024.0)/dt) * 8192.0, -  ((float)hsent)/(1024.0*1024.0), -  requests, -  (((float)requests * 60.0)/dt), -  ((float)received)/(1024.0*1024.0)); +  res += sprintf("<tr align=\"right\"><td><b>%s:</b></td><td>%.2fMB" +  "</td><td>%.2f Kbit/%s</td>" +  "<td><b>%s:</b></td><td>%.2fMB</td></tr>\n" +  "<tr align=\"right\"><td><b>%s:</b></td>" +  "<td>%8d</td><td>%.2f/%s</td>" +  "<td><b>%s:</b></td><td>%.2fMB</td></tr>\n", +  LOCALE("k","Sent data"),((float)sent/(1024.0*1024.0)), +  (((float)sent)/(1024.0*1024.0)/dt) * 8192.0, LOCALE("m","sec"), +  LOCALE("n","Sent headers"),((float)hsent)/(1024.0*1024.0), +  LOCALE("o","Number of requests"), requests, +  (((float)requests * 60.0)/dt), LOCALE("p","min"), +  LOCALE("q","Received data"),((float)received)/(1024.0*1024.0));       if (!zero_type(misc->ftp_users)) { -  res += sprintf(LOCALE("", "<tr align=\"right\"><td><b>FTP users (total):</b></td>" -  "<td>%8d</td><td>%.2f/min</td>" -  "<td><b>FTP users (now):</b></td><td>%d</td></tr>\n"), -  misc->ftp_users, -  (((float)misc->ftp_users*(float)60.0)/dt), -  misc->ftp_users_now); +  res += sprintf("<tr align=\"right\"><td><b>%s:</b></td><td>%8d</td>" +  "<td>%.2f/%s</td>" +  "<td><b>%s:</b></td><td>%d</td></tr>\n", +  LOCALE("r","FTP users (total)"), misc->ftp_users, +  (((float)misc->ftp_users*(float)60.0)/dt), LOCALE("p","min"), +  LOCALE("s","FTP users (now)"), misc->ftp_users_now);    }    res += "</table></p>\n\n";       if ((extra_statistics->ftp) && (extra_statistics->ftp->commands)) {    // FTP statistics. -  res += LOCALE("", "<b>FTP statistics:</b>") + "<br />\n" +  res += "<b>"+LOCALE("t", "FTP statistics") + ":</b><br />\n"    "<ul><table>\n";    foreach(sort(indices(extra_statistics->ftp->commands)), string cmd) { -  res += roxen.locale->get()->base_server("ftp_stat_line", +  res += roxen.locale->get()-> +  config_interface("ftp_stat_line",    upper_case(cmd),    extra_statistics->ftp->commands[cmd]);    }
754:    if(auth_module) return auth_module->userinfo(u);    else report_warning(sprintf("userinfo(): %s\n"    "%s\n", -  LOCALE("", "No authorization module"), +  LOCALE("u", "No authorization module"),    describe_backtrace(backtrace())));   }   
763:    if(auth_module) return auth_module->userlist();    else report_warning(sprintf("userlist(): %s\n"    "%s\n", -  LOCALE("", "No authorization module"), +  LOCALE("u", "No authorization module"),    describe_backtrace(backtrace())));   }   
773:    return auth_module->user_from_uid(u);    else report_warning(sprintf("user_from_uid(): %s\n"    "%s\n", -  LOCALE("", "No authorization module"), +  LOCALE("u", "No authorization module"),    describe_backtrace(backtrace())));   }   
874: Inside #if defined(MODULE_LEVEL_SECURITY)
   case MOD_DENY: // deny ip=...       if(level[1](id->remoteaddr)) -  return Roxen.http_low_answer(403, "<h2>"+LOCALE("","Access forbidden")+"</h2>"); +  return Roxen.http_low_answer(403, "<h2>"+LOCALE("v","Access forbidden")+"</h2>");    break;       case MOD_USER: // allow user=...
926: Inside #if defined(MODULE_LEVEL_SECURITY)
   };       if (err) { -  report_error(LOCALE("", "Error during module security check:\n%s\n"), +  report_error("check_security(): %s:\n%s\n", +  LOCALE("w", "Error during module security check"),    describe_backtrace(err));    return 1;    }
971:    foreach(indices(otomod), RoxenModule m)    if (m && m->clear_memory_caches)    if (mixed err = catch( m->clear_memory_caches() )) -  report_error(LOCALE("", "clear_memory_caches() failed for module %O:\n%s\n"), +  report_error("clear_memory_caches() "+ +  LOCALE("x", "failed for module %O:\n%s\n"),    otomod[m], describe_backtrace(err));   }   
1091:    case 302: // redirect    if (m->extra_heads &&    (m->extra_heads->location)) -  res = sprintf(LOCALE("", "Returned redirect to %s\n"), m->extra_heads->location); +  res = sprintf("Returned redirect to %s\n", m->extra_heads->location);    else -  res = LOCALE("", "Returned redirect, but no location header\n"); +  res = "Returned redirect, but no location header\n";    break;       case 401:    if (m->extra_heads["www-authenticate"]) -  res = sprintf(LOCALE("", "Returned authentication failed: %s\n"), +  res = sprintf("Returned authentication failed: %s\n",    m->extra_heads["www-authenticate"]);    else -  res = LOCALE("", "Returned authentication failed.\n"); +  res = "Returned authentication failed.\n";    break;       case 200: -  res = LOCALE("", "Returned ok\n"); +  res = "Returned ok\n";    break;       default: -  res = sprintf(LOCALE("", "Returned %d.\n"), m->error); +  res = sprintf("Returned %d.\n", m->error);    }       if (!zero_type(m->len))    if (m->len<0) -  res += LOCALE("", "No data "); +  res += "No data ";    else -  res += sprintf(LOCALE("", "%d bytes "), m->len); +  res += sprintf("%d bytes ", m->len);    else if (stringp(m->data)) -  res += sprintf(LOCALE("", "%d bytes "), strlen(m->data)); +  res += sprintf("%d bytes ", strlen(m->data));    else if (objectp(m->file))    if (catch {    array a=m->file->stat(); -  res += sprintf(LOCALE("", "%d bytes "), a[1]-m->file->tell()); +  res += sprintf("%d bytes ", a[1]-m->file->tell());    }) -  res += LOCALE("", "? bytes"); +  res += "? bytes";    -  if (m->data) res += LOCALE("", " (static)"); -  else if (m->file) res += LOCALE("", "(open file)"); +  if (m->data) res += " (static)"; +  else if (m->file) res += "(open file)";       if (stringp(m->extra_heads["http-content-type"]) ||    stringp(m->type)) { -  res += sprintf(LOCALE("", " of %s\n"), m->type); +  res += sprintf(" of %s\n", m->type);    }       res+="<br />";
1151: Inside #if defined(THREADS)
  #ifdef THREADS    object key;   #endif -  TRACE_ENTER(sprintf(LOCALE("", "Request for %s"), id->not_query), 0); +  TRACE_ENTER(sprintf("Request for %s", id->not_query), 0);       string file=id->not_query;    string loc;
1176:    {    switch(type) {    case "roxen": -  TRACE_LEAVE(LOCALE("", "Magic internal gopher image")); +  TRACE_LEAVE("Magic internal gopher image");    return internal_roxen_image(loc);       case "gopher": -  TRACE_LEAVE(LOCALE("", "Magic internal roxen image")); +  TRACE_LEAVE("Magic internal roxen image");    return internal_gopher_image(loc);    }    }
1189:    // Locate internal location resources.    if(!search(file, QUERY(InternalLoc)))    { -  TRACE_ENTER(LOCALE("", "Magic internal module location"), 0); +  TRACE_ENTER("Magic internal module location", 0);    RoxenModule module;    string name, rest;    function find_internal;
1201: Inside #if defined(MODULE_LEVEL_SECURITY)
   if(tmp2 = check_security(find_internal, id, slevel))    if(intp(tmp2))    { -  TRACE_LEAVE(LOCALE("", "Permission to access module denied.")); +  TRACE_LEAVE("Permission to access module denied.");    find_internal = 0;    } else {    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Request denied.")); +  TRACE_LEAVE("Request denied.");    return tmp2;    }   #endif    if(find_internal)    { -  TRACE_ENTER(LOCALE("", "Calling find_internal()..."), find_internal); +  TRACE_ENTER("Calling find_internal()...", find_internal);    LOCK(find_internal);    fid=find_internal( rest, id );    UNLOCK(); -  TRACE_LEAVE(sprintf(LOCALE("", "find_internal has returned %O"), fid)); +  TRACE_LEAVE(sprintf("find_internal has returned %O", fid));    if(fid)    {    if(mappingp(fid))
1234:    id->misc->seclevel = slevel;   #endif    if(objectp(fid)) -  TRACE_LEAVE(LOCALE("", "Returned open filedescriptor. ") +  TRACE_LEAVE("Returned open filedescriptor. "   #ifdef MODULE_LEVEL_SECURITY    +(slevel != oslevel? -  sprintf(LOCALE("", " The security level is now %d."), slevel):"") +  sprintf(" The security level is now %d.", slevel):"")   #endif    );    else -  TRACE_LEAVE(LOCALE("", "Returned directory indicator.") +  TRACE_LEAVE("Returned directory indicator."   #ifdef MODULE_LEVEL_SECURITY    +(oslevel != slevel? -  sprintf(LOCALE("", " The security level is now %d."), slevel):"") +  sprintf(" The security level is now %d.", slevel):"")   #endif    );    }
1266: Inside #if defined(URL_MODULES)
   foreach(url_modules(id), funp)    {    LOCK(funp); -  TRACE_ENTER(LOCALE("", "URL module"), funp); +  TRACE_ENTER("URL module", funp);    tmp=funp( id, file );    UNLOCK();       if(mappingp(tmp))    {    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Returning data")); +  TRACE_LEAVE("Returning data");    return tmp;    }    if(objectp( tmp ))
1286: Inside #if defined(URL_MODULES)
   tmp = (id->conf || this_object())->low_get_file( tmp, no_magic );    else    { -  TRACE_LEAVE(LOCALE("", "Too deep recursion")); +  TRACE_LEAVE("Too deep recursion");    error("Too deep recursion in roxen::get_file() while mapping "    +file+".\n");    }
1294: Inside #if defined(URL_MODULES)
   nest = 0;    if(err) throw(err);    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Returning data")); +  TRACE_LEAVE("Returning data");    return tmp;    }    TRACE_LEAVE("");
1306:    loc = tmp[0];    if(!search(file, loc))    { -  TRACE_ENTER(sprintf(LOCALE("", "Location module [%s] "), loc), tmp[1]); +  TRACE_ENTER(sprintf("Location module [%s] ", loc), tmp[1]);   #ifdef MODULE_LEVEL_SECURITY    if(tmp2 = check_security(tmp[1], id, slevel))    if(intp(tmp2))    { -  TRACE_LEAVE(LOCALE("", "Permission to access module denied.")); +  TRACE_LEAVE("Permission to access module denied.");    continue;    } else {    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Request denied.")); +  TRACE_LEAVE("Request denied.");    return tmp2;    }   #endif -  TRACE_ENTER(LOCALE("", "Calling find_file()..."), 0); +  TRACE_ENTER("Calling find_file()...", 0);    LOCK(tmp[1]);    fid=tmp[1]( file[ strlen(loc) .. ] + id->extra_extension, id);    UNLOCK();
1344:    id->misc->seclevel = slevel;   #endif    if(objectp(fid)) -  TRACE_LEAVE(LOCALE("", "Returned open filedescriptor.") +  TRACE_LEAVE("Returned open filedescriptor."   #ifdef MODULE_LEVEL_SECURITY    +(slevel != oslevel? -  sprintf(LOCALE("", " The security level is now %d."), slevel):"") +  sprintf(" The security level is now %d.", slevel):"")   #endif       );    else -  TRACE_LEAVE(LOCALE("", "Returned directory indicator.") +  TRACE_LEAVE("Returned directory indicator."   #ifdef MODULE_LEVEL_SECURITY    +(oslevel != slevel? -  sprintf(LOCALE("", " The security level is now %d."), slevel):"") +  sprintf(" The security level is now %d.", slevel):"")   #endif    );    break;
1366:    // This one is here to allow accesses to /local, even if    // the mountpoint is /local/. It will slow things down, but...    -  TRACE_ENTER(LOCALE("", "Automatic redirect to location_module."), tmp[1]); -  TRACE_LEAVE(LOCALE("", "Returning data")); +  TRACE_ENTER("Automatic redirect to location_module.", tmp[1]); +  TRACE_LEAVE("Returning data");       // Keep query (if any).    // FIXME: Should probably keep config <foo>
1384:    {    if(no_magic)    { -  TRACE_LEAVE(LOCALE("", "No magic requested. Returning -1.")); +  TRACE_LEAVE("No magic requested. Returning -1.");    return -1;    }    if(dir_module)    {    LOCK(dir_module); -  TRACE_ENTER(LOCALE("", "Directory module"), dir_module); +  TRACE_ENTER("Directory module", dir_module);    fid = dir_module->parse_directory(id);    UNLOCK();    }    else    { -  TRACE_LEAVE(LOCALE("", "No directory module. Returning 'no such file'")); +  TRACE_LEAVE("No directory module. Returning 'no such file'");    return 0;    }    if(mappingp(fid))    { -  TRACE_LEAVE(LOCALE("", "Returning data")); +  TRACE_LEAVE("Returning data");    return (mapping)fid;    }    }
1411:    (tmp = file_extension_modules(loc = Roxen.extension(id->not_query, id), id))) {    foreach(tmp, funp)    { -  TRACE_ENTER(sprintf(LOCALE("", "Extension module [%s] "), loc), funp); +  TRACE_ENTER(sprintf("Extension module [%s] ", loc), funp);   #ifdef MODULE_LEVEL_SECURITY    if(tmp=check_security(funp, id, slevel))    if(intp(tmp))    { -  TRACE_LEAVE(LOCALE("", "Permission to access module denied.")); +  TRACE_LEAVE("Permission to access module denied.");    continue;    }    else    {    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Permission denied")); +  TRACE_LEAVE("Permission denied");    return tmp;    }   #endif
1434:    if(!objectp(tmp))    {    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Returning data")); +  TRACE_LEAVE("Returning data");    return tmp;    }    if(fid)    destruct(fid); -  TRACE_LEAVE(LOCALE("", "Returned new open file")); +  TRACE_LEAVE("Returned new open file");    fid = tmp;    break;    } else
1453:    id->not_query += id->extension;    loc = Roxen.extension(id->not_query, id);    } -  TRACE_ENTER(LOCALE("", "Content-type mapping module"), types_module); +  TRACE_ENTER("Content-type mapping module", types_module);    tmp=type_from_filename(id->not_query, 1, loc); -  TRACE_LEAVE(tmp?sprintf(LOCALE("", "Returned type %s %s."), tmp[0], tmp[1]): -  LOCALE("", "Missing type.")); +  TRACE_LEAVE(tmp?sprintf("Returned type %s %s.", tmp[0], tmp[1]) +  : "Missing type.");    if(tmp)    {    TRACE_LEAVE("");
1467:    }    if(!fid)    { -  TRACE_LEAVE(LOCALE("", "Returned 'no such file'.")); +  TRACE_LEAVE("Returned 'no such file'.");    }    else -  TRACE_LEAVE(LOCALE("", "Returning data")); +  TRACE_LEAVE("Returning data");    return fid;   }   
1519:    // for _all_ files.    foreach(filter_modules(id), tmp)    { -  TRACE_ENTER(LOCALE("", "Filter module"), tmp); +  TRACE_ENTER("Filter module", tmp);    if(res2=tmp(res,id))    {    if(res && res->file && (res2->file != res->file))    destruct(res->file); -  TRACE_LEAVE(LOCALE("", "Rewrote result.")); +  TRACE_LEAVE("Rewrote result.");    res=res2;    } else    TRACE_LEAVE("");
1537:   public array(string) find_dir(string file, RequestID id, void|int(0..1) verbose)   {    array dir; -  TRACE_ENTER(sprintf(LOCALE("", "List directory %O."), file), 0); +  TRACE_ENTER(sprintf("List directory %O.", file), 0);       if(file[0] != '/')    file = "/" + file;
1552: Inside #if defined(URL_MODULES)
   string of = id->not_query;    id->not_query = file;    LOCK(funp); -  TRACE_ENTER(LOCALE("", "URL module"), funp); +  TRACE_ENTER("URL module", funp);    void|mapping|object remap=funp( id, file );    UNLOCK();       if(mappingp( remap ))    {    id->not_query=of; -  TRACE_LEAVE(LOCALE("", "Returned 'No thanks'.")); +  TRACE_LEAVE("Returned 'No thanks'.");    TRACE_LEAVE("");    return 0;    }
1568: Inside #if defined(URL_MODULES)
   array err;    nest ++;    -  TRACE_LEAVE(LOCALE("", "Recursing")); +  TRACE_LEAVE("Recursing");    file = id->not_query;    err = catch {    if( nest < 20 )
1596:    loc = tmp[0];    if(!search(file, loc)) {    /* file == loc + subpath */ -  TRACE_ENTER(sprintf(LOCALE("", "Location module [%s] "), loc), tmp[1]); +  TRACE_ENTER(sprintf("Location module [%s] ", loc), tmp[1]);   #ifdef MODULE_LEVEL_SECURITY    if(check_security(tmp[1], id)) { -  TRACE_LEAVE(LOCALE("", "Permission denied")); +  TRACE_LEAVE("Permission denied");    continue;    }   #endif
1609:    if(mappingp(d))    {    if(d->files) { -  TRACE_LEAVE(LOCALE("", "Got exclusive directory.")); -  TRACE_LEAVE(sprintf(LOCALE("", "Returning list of %d files."), sizeof(d->files))); +  TRACE_LEAVE("Got exclusive directory."); +  TRACE_LEAVE(sprintf("Returning list of %d files.", sizeof(d->files)));    return d->files;    } else    TRACE_LEAVE("");    } else { -  TRACE_LEAVE(LOCALE("", "Got files.")); +  TRACE_LEAVE("Got files.");    if(!dir) dir=({ });    dir |= d;    }
1631:    /* loc == file + "/" + subpath + "/"    * and stat_file(".") returns non-zero.    */ -  TRACE_ENTER(sprintf(LOCALE("", "Location module [%s] "), loc), tmp[1]); +  TRACE_ENTER(sprintf("Location module [%s] ", loc), tmp[1]);    loc=loc[strlen(file)..];    sscanf(loc, "%s/", loc);    if (dir) {
1639:    } else {    dir = ({ loc });    } -  TRACE_LEAVE(LOCALE("", "Added module mountpoint.")); +  TRACE_LEAVE("Added module mountpoint.");    }    }    if(!dir) return verbose ? ({0})+locks : ([])[0];    if(sizeof(dir))    { -  TRACE_LEAVE(sprintf(LOCALE("", "Returning list of %d files."), sizeof(dir))); +  TRACE_LEAVE(sprintf("Returning list of %d files.", sizeof(dir)));    return dir;    } -  TRACE_LEAVE(LOCALE("", "Returning 'No such directory'.")); +  TRACE_LEAVE("Returning 'No such directory'.");    return 0;   }   
1661: Inside #if defined(THREADS)
  #ifdef THREADS    object key;   #endif -  TRACE_ENTER(sprintf(LOCALE("", "Stat file %O."), file), 0); +  TRACE_ENTER(sprintf("Stat file %O.", file), 0);       file=replace(file, "//", "/"); // "//" is really "/" here...   
1672: Inside #if defined(URL_MODULES)
   string of = id->not_query;    id->not_query = file;    -  TRACE_ENTER(LOCALE("", "URL module"), funp); +  TRACE_ENTER("URL module", funp);    LOCK(funp);    tmp=funp( id, file );    UNLOCK();
1680: Inside #if defined(URL_MODULES)
   if(mappingp( tmp )) {    id->not_query = of;    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Returned 'No thanks'.")); +  TRACE_LEAVE("Returned 'No thanks'.");    return 0;    }    if(objectp( tmp ))
1689: Inside #if defined(URL_MODULES)
      array err;    nest ++; -  TRACE_LEAVE(LOCALE("", "Recursing")); +  TRACE_LEAVE("Recursing");    err = catch {    if( nest < 20 )    tmp = (id->conf || this_object())->stat_file( file, id );
1701: Inside #if defined(URL_MODULES)
   if(err)    throw(err);    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Returning data")); +  TRACE_LEAVE("Returning data");    return tmp;    }    TRACE_LEAVE("");
1715:    loc = tmp[0];    if((file == loc) || ((file+"/")==loc))    { -  TRACE_ENTER(sprintf(LOCALE("", "Location module [%s] "), loc), tmp[1]); -  TRACE_LEAVE(LOCALE("", "Exact match.")); +  TRACE_ENTER(sprintf("Location module [%s] ", loc), tmp[1]); +  TRACE_LEAVE("Exact match.");    TRACE_LEAVE("");    return ({ 0775, -3, 0, 0, 0, 0, 0 });    }    if(!search(file, loc))    { -  TRACE_ENTER(sprintf(LOCALE("", "Location module [%s] "), loc), tmp[1]); +  TRACE_ENTER(sprintf("Location module [%s] ", loc), tmp[1]);   #ifdef MODULE_LEVEL_SECURITY    if(check_security(tmp[1], id)) {    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Permission denied")); +  TRACE_LEAVE("Permission denied");    continue;    }   #endif    if(s=function_object(tmp[1])->stat_file(file[strlen(loc)..], id))    {    TRACE_LEAVE(""); -  TRACE_LEAVE(LOCALE("", "Stat ok.")); +  TRACE_LEAVE("Stat ok.");    return s;    }    TRACE_LEAVE("");    }    } -  TRACE_LEAVE(LOCALE("", "Returned 'no such file'.")); +  TRACE_LEAVE("Returned 'no such file'.");   }      class StringFile
1863:    return ({ file->file, file });    }    id->not_query = oq; -  return ({ 0, (["error":501, "data":LOCALE("","Not implemented") ]) }); +  return ({ 0, (["error":501, "data":LOCALE("y","Not implemented") ]) });   }      
1881:       // FIXME: Should I append a "/" to file if missing?    -  TRACE_ENTER(sprintf(LOCALE("", "Request for directory and stat's \"%s\"."), file), 0); +  TRACE_ENTER(sprintf("Request for directory and stat's \"%s\".", file), 0);      #ifdef URL_MODULES   #ifdef THREADS
1893: Inside #if defined(URL_MODULES)
   string of = id->not_query;    id->not_query = file;    LOCK(funp); -  TRACE_ENTER(LOCALE("", "URL module"), funp); +  TRACE_ENTER("URL module", funp);    tmp=funp( id, file );    UNLOCK();   
1904: Inside #if defined(URL_MODULES) and #if defined(MODULE_DEBUG)
   werror("conf->find_dir_stat(\"%s\"): url_module returned mapping:%O\n",    file, tmp);   #endif /* MODULE_DEBUG */ -  TRACE_LEAVE(LOCALE("", "Returned mapping.")+sprintf("%O", tmp)); +  TRACE_LEAVE("Returned mapping."+sprintf("%O", tmp));    TRACE_LEAVE("");    return 0;    }
1918: Inside #if defined(URL_MODULES)
   if( nest < 20 )    tmp = (id->conf || this_object())->find_dir_stat( file, id );    else { -  TRACE_LEAVE(LOCALE("", "Too deep recursion")); +  TRACE_LEAVE("Too deep recursion");    error("Too deep recursion in roxen::find_dir_stat() while mapping "    +file+".\n");    }
1930: Inside #if defined(URL_MODULES) and #if defined(MODULE_DEBUG)
   werror("conf->find_dir_stat(\"%s\"): url_module returned object:\n",    file);   #endif /* MODULE_DEBUG */ -  TRACE_LEAVE(LOCALE("", "Returned object.")); -  TRACE_LEAVE(LOCALE("", "Returning it.")); +  TRACE_LEAVE("Returned object."); +  TRACE_LEAVE("Returning it.");    return tmp; // FIXME: Return 0 instead?    }    id->not_query=of;
1943:    {    loc = tmp[0];    -  TRACE_ENTER(sprintf(LOCALE("", "Location module [%s] "), loc), 0); +  TRACE_ENTER(sprintf("Location module [%s] ", loc), 0);    /* Note that only new entries are added. */    if(!search(file, loc))    {
1954:    RoxenModule c = function_object(tmp[1]);    string f = file[strlen(loc)..];    if (c->find_dir_stat) { -  TRACE_ENTER(LOCALE("", "Has find_dir_stat()."), 0); +  TRACE_ENTER("Has find_dir_stat().", 0);    if (d = c->find_dir_stat(f, id)) { -  TRACE_ENTER(LOCALE("", "Returned mapping.")+sprintf("%O", d), c); +  TRACE_ENTER("Returned mapping."+sprintf("%O", d), c);    dir = d | dir;    TRACE_LEAVE("");    }    TRACE_LEAVE("");    } else if(d = c->find_dir(f, id)) { -  TRACE_ENTER(LOCALE("", "Returned array."), 0); +  TRACE_ENTER("Returned array.", 0);    dir = mkmapping(d, Array.map(d, lambda(string fn)    {    return c->stat_file(f + fn, id);
1975:    /* loc == file + "/" + subpath + "/"    * and stat_file(".") returns non-zero.    */ -  TRACE_ENTER(sprintf(LOCALE("", "The file %O is on the path to the mountpoint %O."), +  TRACE_ENTER(sprintf("The file %O is on the path to the mountpoint %O.",    file, loc), 0);    loc=loc[strlen(file)..];    sscanf(loc, "%s/", loc);
2245:       catch( mi->update_with( nm,0 ) ); // This is sort of nessesary...    -  nm->report_notice ("Reloaded %s.\n", mi->get_name()); +  nm->report_notice(LOCALE("z", "Reloaded %s.\n"), mi->get_name());    destruct( old_module );    }   
2339:    if (err != "") {   #endif    string bt=describe_backtrace(err); -  report_error(LOCALE("", "Error while initiating module copy of %s%s"), +  report_error("enable_module(): " + +  LOCALE("A", "Error while initiating module copy of %s%s"),    moduleinfo->get_name(), (bt ? ":\n"+bt : "\n"));   #ifdef MODULE_DEBUG    }
2512:    report_debug("\bERROR\n");   #endif    string bt=describe_backtrace(err); -  report_error(LOCALE("", "Error while initiating module copy of %s%s"), +  report_error(LOCALE("A", "Error while initiating module copy of %s%s"),    moduleinfo->get_name(), (bt ? ":\n"+bt : "\n"));       /* Clean up some broken references to this module. */
2536:    if (enable_module_batch_msgs) report_debug("\bERROR\n");   #endif    string bt=describe_backtrace(err); -  report_error(LOCALE("", "Error while initiating module copy of %s%s"), +  report_error(LOCALE("A", "Error while initiating module copy of %s%s"),    moduleinfo->get_name(), (bt ? ":\n"+bt : "\n"));    pr = 3;    }
2545:       if(module_type & MODULE_EXTENSION)    { -  report_error( LOCALE("", "%s is an MODULE_EXTENSION, that type is no " +  report_error("%s is an MODULE_EXTENSION, that type is no "    "longer available.\nPlease notify the modules writer.\n"    "Suitable replacement types include MODULE_FIRST and " -  " MODULE_LAST.\n"), moduleinfo->get_name()); +  " MODULE_LAST.\n", moduleinfo->get_name());    }       if(module_type & MODULE_FILE_EXTENSION)
2568:    if (enable_module_batch_msgs) report_debug("\bERROR\n");   #endif    string bt=describe_backtrace(err); -  report_error(LOCALE("", "Error while initiating module copy of %s%s"), +  report_error(LOCALE("A", "Error while initiating module copy of %s%s"),    moduleinfo->get_name(), (bt ? ":\n"+bt : "\n"));    }   
2588:    if (enable_module_batch_msgs) report_debug("\bERROR\n");   #endif    string bt=describe_backtrace(err); -  report_error(LOCALE("", "Error while initiating module copy of %s%s"), +  report_error(LOCALE("A", "Error while initiating module copy of %s%s"),    moduleinfo->get_name(), (bt ? ":\n"+bt : "\n"));    }   
2685:       if(!module)    { -  report_error(LOCALE("", "Failed to disable module:\n" +  report_error("disable_module(): " + +  LOCALE("B", "Failed to disable module:\n"    "No module by that name: \"%s\".\n"), modname);    return 0;    }
2700:       if(!me)    { -  report_error(LOCALE("", "Failed to disable module \"%s\".\n"), +  report_error("disable_module(): " + +  LOCALE("C", "Failed to disable module \"%s\".\n"),    descr);    return 0;    }
2708:    if(me->stop)    if (mixed err = catch (me->stop())) {    string bt=describe_backtrace(err); -  report_error (LOCALE("", "Error while disabling module %s%s"), +  report_error("disable_module(): " + +  LOCALE("D", "Error while disabling module %s%s"),    descr, (bt ? ":\n"+bt : "\n"));    }   
2918:    {    if( !forcibly_added[ tmp_string ] )    if(err = catch( enable_module( tmp_string ))) -  report_error(LOCALE("", "Failed to enable the module %s. Skipping.\n%s"), +  report_error(LOCALE("E", "Failed to enable the module %s. Skipping.\n%s"),    tmp_string, describe_backtrace(err));    }    enable_module_batch_msgs = 0;
2943:    after_init_hooks = ({});       inited = 1; -  report_notice("All modules for %s enabled in %3.1f seconds\n\n", +  report_notice(LOCALE("F", "All modules for %s enabled in %3.1f seconds\n\n"),    query_name(),(gethrtime()-start_time)/1000000.0);   }   
2960:       defvar("comment", "", DLOCALE("", "Virtual server comment"),    TYPE_TEXT_FIELD|VAR_MORE, -  DLOCALE("", "This text will be visible in the administration interface, it " -  " can be quite useful to use as a memory helper.")); +  DLOCALE("", "This text will be visible in the administration " +  "interface, it can be quite useful to use as a memory helper."));       defvar("name", "", DLOCALE("", "Virtual server name"),    TYPE_STRING|VAR_MORE,
2975:    "*: $host - - [$cern_date] \"$method $resource $protocol\" $response $length",    DLOCALE("", "Logging: Format"),    TYPE_TEXT_FIELD|VAR_MORE, -  +     DLOCALE("", "What format to use for logging. The syntax is:\n"    "<pre>" -  "response-code or *: Log format for that response acode\n\n" +  "response-code or *: Log format for that response code\n\n"    "Log format is normal characters, or one or more of the "    "variables below:\n"    "\n"
2992:    "$bin-ip_number -- The remote host id as a binary integer number.\n"    "\n"    "$cern_date -- Cern Common Log file format date.\n" -  "$bin-date -- Time, but as an 32 bit iteger in network byteorder\n" +  "$bin-date -- Time, but as an 32 bit integer in network byteorder\n"    "\n"    "$method -- Request method\n"    "$resource -- Resource identifier\n"
3001:    "$response -- The response code sent\n"    "$bin-response -- The response code sent as a binary short number\n"    "$length -- The length of the data section of the reply\n" -  "$bin-length -- Same, but as an 32 bit iteger in network byteorder\n" +  "$bin-length -- Same, but as an 32 bit integer in network byteorder\n"    "$request-time -- The time the request took (seconds)\n"    "$referer -- the header 'referer' from the request, or '-'.\n"    "$user_agent -- the header 'User-Agent' from the request, or '-'.\n\n"
3010:    " by the client, otherwise '0'\n"    "</pre>"), 0, lambda(){ return !query("Log");});    -  defvar("Log", 1, DLOCALE("", "Logging: Enabled"), TYPE_FLAG, DLOCALE("", "Log requests")); +  defvar("Log", 1, DLOCALE("", "Logging: Enabled"), +  TYPE_FLAG, DLOCALE("", "Log requests"));       // FIXME: Mention it is relative to getcwd(). Can not be localized in pike 7.0.    defvar("LogFile", "$LOGDIR/"+Roxen.short_name(name)+"/Log",
3029:       defvar("NoLog", ({ }),    DLOCALE("", "Logging: No Logging for"), TYPE_STRING_LIST|VAR_MORE, -  DLOCALE("", "Don't log requests from hosts with an IP number which matches any " -  "of the patterns in this list. This also affects the access counter " -  "log."), 0, lambda(){ return !query("Log");}); +  DLOCALE("", "Don't log requests from hosts with an IP number which " +  "matches any of the patterns in this list. This also affects " +  "the access counter log."), +  0, lambda(){ return !query("Log");});       defvar("Domain", roxen->get_domain(), DLOCALE("", "Domain"), TYPE_STRING,    DLOCALE("", "The domainname of the server. The domainname is used " -  " to generate default URLs, and to gererate email addresses.")); +  "to generate default URLs, and to generate email addresses."));       defvar("MyWorldLocation", "http://"+gethostname()+"/",    DLOCALE("", "Primary Server URL"), TYPE_URL, -  DLOCALE("", "This is the main server URL, where your start page is located. " -  "Please note that you also have to configure the 'URLs' variable.")); +  DLOCALE("", "This is the main server URL, where your start page is " +  "located. Please note that you also have to configure the " +  "'URLs' variable."));       defvar("URLs",    Variable.PortList( ({"http://*/"}), VAR_INITIAL,    DLOCALE("", "URLs"), -  DLOCALE("", "Bind to these URLs. You can use '*' and '?' to perform globbing " -  "(using any of these will default to binding to all IP-numbers on " -  "your machine). The possible protocols are http, fhttp (a faster " -  "version of the normal HTTP protocol, but not 100% compatible with " -  "all modules) https, ftp, ftps, gopher and tetris."))); +  DLOCALE("", "Bind to these URLs. You can use '*' and '?' to perform" +  " globbing (using any of these will default to binding to " +  "all IP-numbers on your machine). The possible protocols " +  "are http, fhttp (a faster version of the normal HTTP " +  "protocol, but not 100% compatible with all modules) " +  "https, ftp, ftps, gopher and tetris.")));       defvar("InternalLoc", "/_internal/",    DLOCALE("", "Internal module resource mountpoint"),    TYPE_LOCATION|VAR_MORE|VAR_DEVELOPER, -  DLOCALE("", "Some modules may want to create links to internal resources. " -  "This setting configures an internally handled location that can " -  "be used for such purposes. Simply select a location that you are " -  "not likely to use for regular resources.")); +  DLOCALE("", "Some modules may want to create links to internal " +  "resources. This setting configures an internally handled " +  "location that can be used for such purposes. Simply select " +  "a location that you are not likely to use for regular " +  "resources."));          // Throttling-related variables
3163:   </body>   ",    DLOCALE("", "Messages: No such file"),TYPE_TEXT_FIELD, -  DLOCALE("", "What to return when there is no resource or file available " -  "at a certain location.")); +  DLOCALE("", "What to return when there is no resource or file " +  "available at a certain location."));       definvisvar( "no_delayed_load", 0, TYPE_FLAG );