Kaynağa Gözat

png driver: i18n cosmetics (write) (merge https://trac.osgeo.org/grass/changeset/68195 from trunk)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@68196 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 yıl önce
ebeveyn
işleme
e38899b953
1 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  1. 7 5
      lib/pngdriver/write_png.c

+ 7 - 5
lib/pngdriver/write_png.c

@@ -16,6 +16,8 @@
 #include <png.h>
 
 #include <grass/gis.h>
+#include <grass/glocale.h>
+
 #include "pngdriver.h"
 
 
@@ -34,7 +36,7 @@ static void write_data(png_structp png_ptr, png_bytep data, png_size_t length)
     check = fwrite(data, 1, length, fp);
 
     if (check != length)
-	G_fatal_error("PNG: Write Error");
+	G_fatal_error(_("Unable to write PNG"));
 }
 
 static void output_flush(png_structp png_ptr)
@@ -66,18 +68,18 @@ void write_png(void)
     png_ptr =
 	png_create_write_struct(PNG_LIBPNG_VER_STRING, &jbuf, NULL, NULL);
     if (!png_ptr)
-	G_fatal_error("PNG: couldn't allocate PNG structure");
+	G_fatal_error(_("Unable to allocate PNG structure"));
 
     info_ptr = png_create_info_struct(png_ptr);
     if (!info_ptr)
-	G_fatal_error("PNG: couldn't allocate PNG structure");
+	G_fatal_error(_("Unable to allocate PNG structure"));
 
     if (setjmp(png_jmpbuf(png_ptr)))
-	G_fatal_error("error writing PNG file");
+	G_fatal_error(_("Unable to write PNG file"));
 
     output = fopen(png.file_name, "wb");
     if (!output)
-	G_fatal_error("PNG: couldn't open output file %s", png.file_name);
+	G_fatal_error(_("Unable to open output PNG file <%s>"), png.file_name);
 
     png_set_write_fn(png_ptr, output, write_data, output_flush);