diff options
author | Matt Wilson <msw@redhat.com> | 2000-08-14 20:59:00 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-08-14 20:59:00 +0000 |
commit | 46505290016a3d06229a207d99348166534ea511 (patch) | |
tree | 4de53c9c9a07e553e80dc05befbc305c21a87468 /gnome-map | |
parent | b74d813709ac70fec0c485febd9095b6c5787987 (diff) | |
download | anaconda-46505290016a3d06229a207d99348166534ea511.tar.gz anaconda-46505290016a3d06229a207d99348166534ea511.tar.xz anaconda-46505290016a3d06229a207d99348166534ea511.zip |
i18n
Diffstat (limited to 'gnome-map')
-rw-r--r-- | gnome-map/Makefile | 2 | ||||
-rw-r--r-- | gnome-map/gglobe-canvas.c | 23 | ||||
-rw-r--r-- | gnome-map/timezones.c | 7 |
3 files changed, 17 insertions, 15 deletions
diff --git a/gnome-map/Makefile b/gnome-map/Makefile index 0a5115ca1..1e0691f34 100644 --- a/gnome-map/Makefile +++ b/gnome-map/Makefile @@ -2,7 +2,7 @@ include ../Makefile.inc all: gglobe-canvas timezonemapmodule.so -CFLAGS=-g -O2 -Wall -fPIC `gnome-config --cflags gnomeui` -I/usr/include/python1.5 +CFLAGS=-g -O2 -Wall -fPIC `gnome-config --cflags gnomeui` -I/usr/include/python1.5 -DENABLE_NLS LDFLAGS=`gnome-config --libs gnomeui` install: timezonemapmodule.so diff --git a/gnome-map/gglobe-canvas.c b/gnome-map/gglobe-canvas.c index add35368d..3b9c8335d 100644 --- a/gnome-map/gglobe-canvas.c +++ b/gnome-map/gglobe-canvas.c @@ -10,7 +10,6 @@ #include "gnome-canvas-dot.h" #include "timezones.h" - /* Command line options */ /* image - filename of file to use for map (must be PNG for antialias) */ /* mapwidth - width to scale image to (also size of canvas widget) */ @@ -98,13 +97,13 @@ struct _VIEW_DEF { typedef struct _VIEW_DEF ViewDefinition; ViewDefinition Views[] = { - { "World", LONGITUDE_CONSTRAINT, -180.0, 180.0, 0.0 }, - { "North America", LONGITUDE_CONSTRAINT, -171.0, -21.0, 40.0 }, - { "South America", LATITUDE_CONSTRAINT, 15.0, -70.0, -70.0 }, - { "Pacific Rim", LATITUDE_CONSTRAINT, -47.0, 47.0, 155.0}, - { "Europe", LONGITUDE_CONSTRAINT, -25.0, 70.0, 45.0 }, - { "Africa", LATITUDE_CONSTRAINT, 40.0, -40.0, 15.0}, - { "Asia", LONGITUDE_CONSTRAINT, 20.0, 165.0, 40.0} + { N_("World"), LONGITUDE_CONSTRAINT, -180.0, 180.0, 0.0 }, + { N_("North America"), LONGITUDE_CONSTRAINT, -171.0, -21.0, 40.0 }, + { N_("South America"), LATITUDE_CONSTRAINT, 15.0, -70.0, -70.0 }, + { N_("Pacific Rim"), LATITUDE_CONSTRAINT, -47.0, 47.0, 155.0}, + { N_("Europe"), LONGITUDE_CONSTRAINT, -25.0, 70.0, 45.0 }, + { N_("Africa"), LATITUDE_CONSTRAINT, 40.0, -40.0, 15.0}, + { N_("Asia"), LONGITUDE_CONSTRAINT, 20.0, 165.0, 40.0} }; gint numviews = sizeof(Views)/sizeof(ViewDefinition); @@ -137,7 +136,7 @@ find_location (gchar *locname) static int find_nearest ( double longitude, double latitude ) { - double mindist; + double mindist = 0; double dist; double dx, dy; int i, mini; @@ -616,7 +615,7 @@ create_view_menu ( void ) menu = gtk_menu_new (); for (i=0; i < numviews; i++) { - menu_item = gtk_menu_item_new_with_label (Views[i].name); + menu_item = gtk_menu_item_new_with_label (_(Views[i].name)); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_signal_connect (GTK_OBJECT (menu_item), "activate", @@ -762,7 +761,7 @@ main (int argc, char **argv) gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 2); viewcombo = create_view_menu (); - gtk_box_pack_start (GTK_BOX (hbox2), gtk_label_new ("View: "), + gtk_box_pack_start (GTK_BOX (hbox2), gtk_label_new (_("View: ")), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox2), viewcombo, FALSE, FALSE, 2); @@ -779,7 +778,7 @@ main (int argc, char **argv) gtk_widget_show_all (mainwindow); /* pick New York City as default */ - set_selection (find_location ("America/New_York"), TRUE); + set_selection (find_location (_("America/New_York")), TRUE); gtk_main (); diff --git a/gnome-map/timezones.c b/gnome-map/timezones.c index 28830af5f..7b504ce52 100644 --- a/gnome-map/timezones.c +++ b/gnome-map/timezones.c @@ -1,6 +1,6 @@ /* GNOME canvas based interface to a map using a simple cylindrical proj */ /* */ -/* Copyright (C) 1999 Red Hat, Incorportated */ +/* Copyright (C) 1999, 2000 Red Hat, Incorportated */ /* Original work by Michael Fulbright <drmike@redhat.com> */ #include <glib.h> @@ -9,9 +9,12 @@ #include <unistd.h> #include <time.h> #include <math.h> +#include <string.h> +#include <libintl.h> #include "timezones.h" +#define _(string) gettext(string) TZZoneInfo * tzinfo_get_for_location (TimeZoneLocation *loc) @@ -156,7 +159,7 @@ loadTZDB( void ) #endif loc = g_new( TimeZoneLocation, 1); loc->country = g_strdup(tmpstrarr[0]); - loc->zone = g_strdup(tmpstrarr[2]); + loc->zone = g_strdup(_(tmpstrarr[2])); loc->comment = (tmpstrarr[3]) ? g_strdup(tmpstrarr[3]) : NULL; loc->latitude = convertPos(latstr,2); loc->longitude = convertPos(lngstr,3); |