|
@@ -70,9 +70,9 @@ int G_truncate_fp_map(const char *name, const char *mapset)
|
|
|
G_quant_truncate(&quant);
|
|
|
/* quantize the map */
|
|
|
if (G_write_quant(name, mapset, &quant) < 0) {
|
|
|
- sprintf(buf, "G_truncate_fp_map: can't write quant rules for map %s",
|
|
|
- name);
|
|
|
- G_warning(buf);
|
|
|
+ G_warning (_("G_truncate_fp_map: can't write quant rules"
|
|
|
+ " for map %s"),
|
|
|
+ name);
|
|
|
return -1;
|
|
|
}
|
|
|
return 1;
|
|
@@ -87,9 +87,9 @@ int G_round_fp_map(const char *name, const char *mapset)
|
|
|
G_quant_round(&quant);
|
|
|
/* round the map */
|
|
|
if (G_write_quant(name, mapset, &quant) < 0) {
|
|
|
- sprintf(buf, "G_truncate_fp_map: can't write quant rules for map %s",
|
|
|
- name);
|
|
|
- G_warning(buf);
|
|
|
+ G_warning (_("G_truncate_fp_map: can't write quant rules"
|
|
|
+ " for map %s"),
|
|
|
+ name);
|
|
|
return -1;
|
|
|
}
|
|
|
return 1;
|
|
@@ -118,15 +118,14 @@ int G_quantize_fp_map(const char *name, const char *mapset,
|
|
|
struct FPRange fp_range;
|
|
|
|
|
|
if (G_read_fp_range(name, mapset, &fp_range) < 0) {
|
|
|
- sprintf(buf, "G_quantize_fp_map: can't read fp range for map %s",
|
|
|
- name);
|
|
|
- G_warning(buf);
|
|
|
+ G_warning (_("G_quantize_fp_map: can't read fp range for map %s"),
|
|
|
+ name);
|
|
|
return -1;
|
|
|
}
|
|
|
G_get_fp_range_min_max(&fp_range, &d_min, &d_max);
|
|
|
if (G_is_d_null_value(&d_min) || G_is_d_null_value(&d_max)) {
|
|
|
- sprintf(buf, "G_quantize_fp_map: raster map %s is empty", name);
|
|
|
- G_warning(buf);
|
|
|
+ G_warning (_("G_quantize_fp_map: raster map %s is empty"),
|
|
|
+ name);
|
|
|
return -1;
|
|
|
}
|
|
|
return G_quantize_fp_map_range(name, mapset, d_min, d_max, min, max);
|
|
@@ -166,10 +165,9 @@ int G_quantize_fp_map_range(const char *name, const char *mapset,
|
|
|
G_quant_add_rule(&quant, d_min, d_max, min, max);
|
|
|
/* quantize the map */
|
|
|
if (G_write_quant(name, mapset, &quant) < 0) {
|
|
|
- sprintf(buf,
|
|
|
- "G_quantize_fp_map_range: can't write quant rules for map %s",
|
|
|
- name);
|
|
|
- G_warning(buf);
|
|
|
+ G_warning (_("G_quantize_fp_map_range: can't write quant rules"
|
|
|
+ " for map %s"),
|
|
|
+ name);
|
|
|
return -1;
|
|
|
}
|
|
|
return 1;
|
|
@@ -203,8 +201,8 @@ int G_write_quant(const char *name, const char *mapset,
|
|
|
char buf[300];
|
|
|
|
|
|
if (G_raster_map_type(name, mapset) == CELL_TYPE) {
|
|
|
- sprintf(buf, _("Cannot write quant rules: map %s is integer"), name);
|
|
|
- G_warning(buf);
|
|
|
+ G_warning (_("Cannot write quant rules: map %s is integer"),
|
|
|
+ name);
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
@@ -212,8 +210,7 @@ int G_write_quant(const char *name, const char *mapset,
|
|
|
|
|
|
/* first actually write the rules */
|
|
|
if (G__quant_export(name, mapset, quant) < 0) {
|
|
|
- sprintf(buf, _("Cannot write quant rules for map %s"), name);
|
|
|
- G_warning(buf);
|
|
|
+ G_warning (_("Cannot write quant rules for map %s"), name);
|
|
|
return -1;
|
|
|
}
|
|
|
|