Changeset 36


Ignore:
Timestamp:
Oct 2, 2010, 1:16:14 AM (9 years ago)
Author:
djay
Message:

Better using the _ss function from service code for translation ...

File:
1 edited

Legend:

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

    r35 r36  
    2323 */
    2424
    25 #include <libintl.h>
    26 #include <locale.h>
    27 #define _(String) dgettext ("zoo-services",String)
    28 
    2925#include "cpl_conv.h"
    3026#include "ogr_api.h"
     
    3228#include "geos_c.h"
    3329#include "service.h"
    34 
     30#include "service_internal.h"
    3531
    3632extern "C" {
     
    9187    free(tmp);
    9288    if(res==NULL){
    93       setMapInMaps(conf,"lenv","message",_("Unable to call OGR_G_CreatFromGML"));
     89      setMapInMaps(conf,"lenv","message",_ss("Unable to call OGR_G_CreatFromGML"));
    9490      return NULL;
    9591    }
     
    111107    map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    112108    if(!tmp){
    113       setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
     109      setMapInMaps(conf,"lenv","message",_ss("Unable to parse the input geometry from InputPolygon"));
    114110      return SERVICE_FAILED;
    115111    }
     
    123119    }
    124120    else{
    125       setMapInMaps(conf,"lenv","message",_("Unable to find any geometry for InputPolygon"));
     121      setMapInMaps(conf,"lenv","message",_ss("Unable to find any geometry for InputPolygon"));
    126122      return SERVICE_FAILED;
    127123    }
    128124    if(geometry==NULL){
    129       setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
     125      setMapInMaps(conf,"lenv","message",_ss("Unable to parse the input geometry from InputPolygon"));
    130126      return SERVICE_FAILED;
    131127    }
     
    179175    map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    180176    if(!tmp){
    181       setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
     177      setMapInMaps(conf,"lenv","message",_ss("Unable to parse the input geometry from InputPolygon"));
    182178      return SERVICE_FAILED;
    183179    }
     
    199195      geometry=createGeometryFromGML(conf,tmp->value);
    200196    if(geometry==NULL){
    201       setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon"));
     197      setMapInMaps(conf,"lenv","message",_ss("Unable to parse the input geometry from InputPolygon"));
    202198      return SERVICE_FAILED;
    203199    }
     
    256252   map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    257253   if(tmp==NULL){
    258      setMapInMaps(conf,"lenv","message",_("Unable to fetch input geometry"));
     254     setMapInMaps(conf,"lenv","message",_ss("Unable to fetch input geometry"));
    259255     return SERVICE_FAILED;
    260256   }else
    261257     if(strlen(tmp->value)<=0){
    262        setMapInMaps(conf,"lenv","message",_("Unable to fetch input geometry"));
     258       setMapInMaps(conf,"lenv","message",_ss("Unable to fetch input geometry"));
    263259       return SERVICE_FAILED;
    264260     }
     
    269265     geometry=createGeometryFromGML(conf,tmp->value);
    270266   if(geometry==NULL){
    271      setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry"));
     267     setMapInMaps(conf,"lenv","message",_ss("Unable to parse input geometry"));
    272268     return SERVICE_FAILED;
    273269   }
     
    360356    }
    361357    if(geometry1==NULL){
    362       setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity1."));
     358      setMapInMaps(conf,"lenv","message",_ss("Unable to parse input geometry for InputEntity1."));
    363359      fprintf(stderr,"SERVICE FAILED !\n");
    364360      return SERVICE_FAILED;
     
    390386    fprintf(stderr,"\nService internal print1 InputEntity2 Final\n");
    391387    if(geometry2==NULL){
    392       setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity2."));
     388      setMapInMaps(conf,"lenv","message",_ss("Unable to parse input geometry for InputEntity2."));
    393389      fprintf(stderr,"SERVICE FAILED !\n");
    394390      return SERVICE_FAILED;
     
    466462    }
    467463    if(geometry1==NULL){
    468       setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity1."));
     464      setMapInMaps(conf,"lenv","message",_ss("Unable to parse input geometry for InputEntity1."));
    469465      fprintf(stderr,"SERVICE FAILED !\n");
    470466      return SERVICE_FAILED;
     
    489485    }
    490486    if(geometry2==NULL){
    491       setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity2."));
     487      setMapInMaps(conf,"lenv","message",_ss("Unable to parse input geometry for InputEntity2."));
    492488      fprintf(stderr,"SERVICE FAILED !\n");
    493489      return SERVICE_FAILED;
     
    517513    map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    518514    if(tmp==NULL){
    519       setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry from InputPolygon"));
     515      setMapInMaps(conf,"lenv","message",_ss("Unable to parse input geometry from InputPolygon"));
    520516      return SERVICE_FAILED;
    521517    }
     
    523519    geometry=createGeometryFromGML(conf,tmp->value);
    524520    if(geometry==NULL){
    525       setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry from InputPolygon"));
     521      setMapInMaps(conf,"lenv","message",_ss("Unable to parse input geometry from InputPolygon"));
    526522      return SERVICE_FAILED;
    527523    }
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