|
@@ -3,13 +3,13 @@
|
|
|
#include <grass/gis.h>
|
|
|
#include <grass/display.h>
|
|
|
#include <grass/colors.h>
|
|
|
+#include <grass/glocale.h>
|
|
|
#include "colors.h"
|
|
|
|
|
|
int get_map_info(char *name, char *mapset)
|
|
|
{
|
|
|
struct Colors colors;
|
|
|
struct Categories categories;
|
|
|
- char buff[128];
|
|
|
|
|
|
if (!name)
|
|
|
exit(0);
|
|
@@ -17,16 +17,12 @@ int get_map_info(char *name, char *mapset)
|
|
|
exit(0);
|
|
|
|
|
|
/* Reading color lookup table */
|
|
|
- if (Rast_read_cats(name, mapset, &categories) == -1) {
|
|
|
- sprintf(buff, "category file for [%s] not available", name);
|
|
|
- G_fatal_error(buff);
|
|
|
- }
|
|
|
+ if (Rast_read_cats(name, mapset, &categories) == -1)
|
|
|
+ G_fatal_error(_("Error reading category file for <%s>"), name);
|
|
|
|
|
|
/* Reading color lookup table */
|
|
|
- if (Rast_read_colors(name, mapset, &colors) == -1) {
|
|
|
- sprintf(buff, "color file for [%s] not available", name);
|
|
|
- G_fatal_error(buff);
|
|
|
- }
|
|
|
+ if (Rast_read_colors(name, mapset, &colors) == -1)
|
|
|
+ G_fatal_error(_("Unable to read color table for raster map <%s>"), name);
|
|
|
|
|
|
interact(&categories, &colors, name, mapset);
|
|
|
|