tomboy r2350 - in trunk: . Tomboy
- From: sharm svn gnome org
- To: svn-commits-list gnome org
- Subject: tomboy r2350 - in trunk: . Tomboy
- Date: Mon, 16 Feb 2009 23:00:40 +0000 (UTC)
Author: sharm
Date: Mon Feb 16 23:00:40 2009
New Revision: 2350
URL: http://svn.gnome.org/viewvc/tomboy?rev=2350&view=rev
Log:
* Tomboy/Utils.cs: Proper localization support for plural strings.
Fixes bug #476061, patch courtesy of Benjamin Podszun.
Modified:
trunk/ChangeLog
trunk/Tomboy/Utils.cs
Modified: trunk/Tomboy/Utils.cs
==============================================================================
--- trunk/Tomboy/Utils.cs (original)
+++ trunk/Tomboy/Utils.cs Mon Feb 16 23:00:40 2009
@@ -202,10 +202,14 @@
else if (date.DayOfYear < now.DayOfYear
&& date.DayOfYear > now.DayOfYear - 6)
pretty_str = show_time ?
- String.Format (Catalog.GetString ("{0} days ago, {1}"),
- now.DayOfYear - date.DayOfYear, short_time) :
- String.Format (Catalog.GetString ("{0} days ago"),
- now.DayOfYear - date.DayOfYear);
+ String.Format (Catalog.GetPluralString (
+ "{0} day ago, {1}", "{0} days ago, {1}",
+ now.DayOfYear - date.DayOfYear),
+ now.DayOfYear - date.DayOfYear, short_time) :
+ String.Format (Catalog.GetPluralString (
+ "{0} day ago", "{0} days ago",
+ now.DayOfYear - date.DayOfYear),
+ now.DayOfYear - date.DayOfYear);
else if (date.DayOfYear > now.DayOfYear
&& date.DayOfYear == now.DayOfYear + 1)
pretty_str = show_time ?
@@ -215,10 +219,14 @@
else if (date.DayOfYear > now.DayOfYear
&& date.DayOfYear < now.DayOfYear + 6)
pretty_str = show_time ?
- String.Format (Catalog.GetString ("In {0} days, {1}"),
- date.DayOfYear - now.DayOfYear, short_time) :
- String.Format (Catalog.GetString ("In {0} days"),
- date.DayOfYear - now.DayOfYear);
+ String.Format (Catalog.GetPluralString (
+ "In {0} day, {1}", "In {0} days, {1}",
+ date.DayOfYear - now.DayOfYear),
+ date.DayOfYear - now.DayOfYear, short_time) :
+ String.Format (Catalog.GetPluralString (
+ "In {0} day", "In {0} days",
+ date.DayOfYear - now.DayOfYear),
+ date.DayOfYear - now.DayOfYear);
else
pretty_str = show_time ?
date.ToString (Catalog.GetString ("MMMM d, h:mm tt")) :
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]