Changeset 35 for trunk/zoo-services


Ignore:
Timestamp:
Oct 1, 2010, 2:52:10 PM (14 years ago)
Author:
djay
Message:

Correct use of translation function in ogr base-vect-ops Services Provider...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-services/ogr/base-vect-ops/service.c

    r34 r35  
    9191    free(tmp);
    9292    if(res==NULL){
    93       setMapInMaps(conf,"lenv","message","Unable to call OGR_G_CreatFromGML");
     93      setMapInMaps(conf,"lenv","message",_("Unable to call OGR_G_CreatFromGML"));
    9494      return NULL;
    9595    }
     
    111111    map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    112112    if(!tmp){
    113       setMapInMaps(conf,"lenv","message","Unagle to parse the input geometry from InputPolygon");
     113      setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
    114114      return SERVICE_FAILED;
    115115    }
     
    123123    }
    124124    else{
    125       setMapInMaps(conf,"lenv","message","Unable to find any geometry for InputPolygon");
     125      setMapInMaps(conf,"lenv","message",_("Unable to find any geometry for InputPolygon"));
    126126      return SERVICE_FAILED;
    127127    }
    128128    if(geometry==NULL){
    129       setMapInMaps(conf,"lenv","message","Unagle to parse the input geometry from InputPolygon");
     129      setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
    130130      return SERVICE_FAILED;
    131131    }
     
    178178#endif
    179179    map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    180     if(!tmp)
    181       return SERVICE_FAILED;
     180    if(!tmp){
     181      setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
     182      return SERVICE_FAILED;
     183    }
    182184    fprintf(stderr,"Service internal print \n");
    183185    dumpMaps(inputs);
     
    196198    else
    197199      geometry=createGeometryFromGML(conf,tmp->value);
    198     if(geometry==NULL)
    199       return SERVICE_FAILED;
     200    if(geometry==NULL){
     201      setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
     202      return SERVICE_FAILED;
     203    }
    200204    res=(*myFunc)(geometry);
    201205    fprintf(stderr,"Service internal print \n");
     
    252256   map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    253257   if(tmp==NULL){
    254      setMapInMaps(conf,"lenv","message","Unable to fetch input geometry");
     258     setMapInMaps(conf,"lenv","message",_("Unable to fetch input geometry"));
    255259     return SERVICE_FAILED;
    256260   }else
    257261     if(strlen(tmp->value)<=0){
    258        setMapInMaps(conf,"lenv","message","Unable to fetch input geometry");
     262       setMapInMaps(conf,"lenv","message",_("Unable to fetch input geometry"));
    259263       return SERVICE_FAILED;
    260264     }
     
    265269     geometry=createGeometryFromGML(conf,tmp->value);
    266270   if(geometry==NULL){
    267      setMapInMaps(conf,"lenv","message","Unable to parse input geometry");
     271     setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry"));
    268272     return SERVICE_FAILED;
    269273   }
     
    287291     char *tmpS=OGR_G_ExportToGML(res);
    288292     setMapInMaps(outputs,"Result","value",tmpS);
     293     free(tmpS);
    289294     setMapInMaps(outputs,"Result","mimeType","text/xml");
    290295     setMapInMaps(outputs,"Result","encoding","UTF-8");
     
    355360    }
    356361    if(geometry1==NULL){
    357       setMapInMaps(conf,"lenv","message","Unable to parse input geometry for InputEntity1.");
     362      setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity1."));
    358363      fprintf(stderr,"SERVICE FAILED !\n");
    359364      return SERVICE_FAILED;
     
    385390    fprintf(stderr,"\nService internal print1 InputEntity2 Final\n");
    386391    if(geometry2==NULL){
    387       setMapInMaps(conf,"lenv","message","Unable to parse input geometry for InputEntity2.");
     392      setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity2."));
    388393      fprintf(stderr,"SERVICE FAILED !\n");
    389394      return SERVICE_FAILED;
     
    461466    }
    462467    if(geometry1==NULL){
    463       setMapInMaps(conf,"lenv","message","Unable to parse input geometry for InputEntity1.");
     468      setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity1."));
    464469      fprintf(stderr,"SERVICE FAILED !\n");
    465470      return SERVICE_FAILED;
     
    512517    map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    513518    if(tmp==NULL){
    514       setMapInMaps(conf,"lenv","message","Unable to parse input geometry from InputPolygon");
     519      setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry from InputPolygon"));
    515520      return SERVICE_FAILED;
    516521    }
     
    518523    geometry=createGeometryFromGML(conf,tmp->value);
    519524    if(geometry==NULL){
    520       setMapInMaps(conf,"lenv","message","Unable to parse input geometry from InputPolygon");
     525      setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry from InputPolygon"));
    521526      return SERVICE_FAILED;
    522527    }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png