From 6c446b87088136adcba5e20f59f4ac4b6da6e94f Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 19 Dec 2007 13:48:08 +0200 Subject: [PATCH] Mark for translation. Start to add functions for routing annoucements. --- src/announcements.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/announcements.c b/src/announcements.c index 40e7eac..d31e17b 100644 --- a/src/announcements.c +++ b/src/announcements.c @@ -25,9 +25,11 @@ #define _GNU_SOURCE #include +#include #include #include +#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 -- 2.39.5