diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-17 01:21:03 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-17 01:25:49 -0700 |
commit | dbae888abc8ac3779ace49da323edaa4c3574394 (patch) | |
tree | af5640630753d0df8fc49236f1439ad75ff3027f /divelist.c | |
parent | 9c62e223d331543f915b8819385348c466de3c14 (diff) | |
download | subsurface-dbae888abc8ac3779ace49da323edaa4c3574394.tar.gz |
Handle dates and a "calculated plural" in translations
This looks like a massive commit mainly because of the line number changes
in the .po files. That sadly hides what really happened here:
- the places where we manually build dates have now been localized
- the one place where we did the English "calculated plural" has been
modified so that it now can be correctly translated (in English this
just adds an 's' to the noun if the number is != 1 - in other languages
this tends to be much more complicated)
I then updated the two German translations to take advantage of the new
constructs. And while I was at it, I changed the translation Trip->Gruppe
to Trip->Reise as that seemed much more appropriate.
I also fixed another error in the German translation where I translated
"dive time" as "Startzeit" - but in the context it was "Dauer".
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/divelist.c b/divelist.c index 1ded3f9d2..d78f3d6fa 100644 --- a/divelist.c +++ b/divelist.c @@ -363,7 +363,7 @@ static void date_data_func(GtkTreeViewColumn *col, int idx, nr; struct tm tm; timestamp_t when; - char buffer[40]; + char buffer[60]; gtk_tree_model_get(model, iter, DIVE_INDEX, &idx, DIVE_DATE, &when, -1); nr = gtk_tree_model_iter_n_children(model, iter); @@ -371,14 +371,17 @@ static void date_data_func(GtkTreeViewColumn *col, utc_mkdate(when, &tm); if (idx < 0) { snprintf(buffer, sizeof(buffer), - "Trip %s, %s %d, %d (%d dive%s)", + /*++GETTEXT 60 char buffer weekday, monthname, day of month, year, nr dives */ + ngettext("Trip %1$s, %2$s %3$d, %4$d (%5$d dive)", + "Trip %1$s, %2$s %3$d, %4$d (%5$d dives)", nr), weekday(tm.tm_wday), monthname(tm.tm_mon), tm.tm_mday, tm.tm_year + 1900, - nr, nr > 1 ? "s" : ""); + nr); } else { snprintf(buffer, sizeof(buffer), - "%s, %s %d, %d %02d:%02d", + /*++GETTEXT 60 char buffer weekday, monthname, day of month, year, hour:min */ + _("%1$s, %2$s %3$d, %4$d %5$02d:%6$02d"), weekday(tm.tm_wday), monthname(tm.tm_mon), tm.tm_mday, tm.tm_year + 1900, |