]> err.no Git - mapper/commitdiff
Mark for translation.
authorKaj-Michael Lang <milang@onion.tal.org>
Wed, 19 Dec 2007 11:48:08 +0000 (13:48 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Wed, 19 Dec 2007 11:48:08 +0000 (13:48 +0200)
Start to add functions for routing annoucements.

src/announcements.c

index 40e7eac226612fb520255b28450372104d050f40..d31e17b07e237d3a01c689b3c383c6746904ff8c 100644 (file)
 #define _GNU_SOURCE
 
 #include <glib/gstdio.h>
+#include <glib/gi18n.h>
 #include <libintl.h>
 #include <locale.h>
 
+#include "announcements.h"
 #include "speak.h"
 
 static gboolean enable_speach=TRUE;
@@ -38,9 +40,9 @@ announce_distance_to_destination(gdouble distance, gchar *unit, gdouble climit)
 {
 gchar buffer[64];
 if (distance>climit) {
-       snprintf(buffer, sizeof(buffer), "Distance to destination: %.0f %s", distance, unit);
+       g_snprintf(buffer, sizeof(buffer), _("Distance to destination: %.01f %s"), distance, unit);
 } else {
-       snprintf(buffer, sizeof(buffer), "Distance to destination: %.02f %s", distance, unit);
+       g_snprintf(buffer, sizeof(buffer), _("Distance to destination: %.02f %s"), distance, unit);
 }
 if (enable_speach)
        speak_text(buffer);
@@ -50,7 +52,25 @@ void
 announce_destination_reached(void)
 {
 if (enable_speach)
-       speak_text("You have reached your destination.");
+       speak_text(_("You have reached your destination."));
 }
 
+#if 0
 
+void
+announce_continue(gchar *to_name, gchar *to_ref)
+{
+}
+
+void
+announce_turn(gdouble direction, gchar *to_name, gchar *to_ref, gdouble next_wpt_dist, gchar unit)
+{
+gchar buffer[64];
+gchar *turn, *amount;
+
+turn=(direction > 0) ? _("left") : _("right");
+amount= (fabs(direction)<25) 
+g_snprintf(buffer, sizeof(buffer), "Turn %s to %s", );
+}
+
+#endif