[Pkg-xfce-commits] r2354 - in desktop/trunk/orage/debian: . patches

ncommander-guest at alioth.debian.org ncommander-guest at alioth.debian.org
Tue Oct 7 06:54:25 UTC 2008


Author: ncommander-guest
Date: 2008-10-07 06:54:25 +0000 (Tue, 07 Oct 2008)
New Revision: 2354

Added:
   desktop/trunk/orage/debian/patches/en_in_bug.patch
Modified:
   desktop/trunk/orage/debian/changelog
   desktop/trunk/orage/debian/control
Log:
Added a fix to orage that corrects a localization issue on en_IN that was reported in Ubuntu. Fix tested on both Ubuntu intrepid and Debian sid.

Modified: desktop/trunk/orage/debian/changelog
===================================================================
--- desktop/trunk/orage/debian/changelog	2008-10-05 11:23:39 UTC (rev 2353)
+++ desktop/trunk/orage/debian/changelog	2008-10-07 06:54:25 UTC (rev 2354)
@@ -1,3 +1,9 @@
+orage (4.5.14.0-2) unstable; urgency=low
+
+  * Corrected i18n bug in the en_IN locale by adding en_in_bug.patch (LP: #257964)
+
+ -- Michael Casadevall <sonicmctails at gmail.com>  Tue, 07 Oct 2008 02:27:23 -0400
+
 orage (4.5.14.0-1) unstable; urgency=low
 
   * New upstream release.

Modified: desktop/trunk/orage/debian/control
===================================================================
--- desktop/trunk/orage/debian/control	2008-10-05 11:23:39 UTC (rev 2353)
+++ desktop/trunk/orage/debian/control	2008-10-07 06:54:25 UTC (rev 2354)
@@ -2,7 +2,7 @@
 Section: x11
 Priority: optional
 Maintainer: Debian Xfce Maintainers <pkg-xfce-devel at lists.alioth.debian.org>
-Uploaders: Emanuele Rocca <ema at debian.org>, Simon Huggins <huggie at earth.li>, Yves-Alexis Perez <corsac at debian.org>
+Uploaders: Emanuele Rocca <ema at debian.org>, Simon Huggins <huggie at earth.li>, Yves-Alexis Perez <corsac at debian.org>, Michael Casadevall <sonicmctails at gmail.com>
 Build-Depends: debhelper (>= 4.1.0), xfce4-mcs-manager-dev (>= 4.4.2), cdbs, libxml-parser-perl, libgtk2.0-dev (>= 2.10.1), xfce4-panel-dev (>= 4.4.2), chrpath
 Standards-Version: 3.8.0
 Homepage: http://www.xfce.org/

Added: desktop/trunk/orage/debian/patches/en_in_bug.patch
===================================================================
--- desktop/trunk/orage/debian/patches/en_in_bug.patch	                        (rev 0)
+++ desktop/trunk/orage/debian/patches/en_in_bug.patch	2008-10-07 06:54:25 UTC (rev 2354)
@@ -0,0 +1,99 @@
+diff -Nur -x '*.orig' -x '*~' orage-4.5.14.0/src/day-view.c orage-4.5.14.0.new/src/day-view.c
+--- orage-4.5.14.0/src/day-view.c	2008-03-10 17:41:48.000000000 -0400
++++ orage-4.5.14.0.new/src/day-view.c	2008-10-07 02:19:43.000000000 -0400
+@@ -872,6 +872,9 @@
+             }
+             tm_date.tm_mday = 1;
+         }
++        /* some rare locales show weekday in the default date, so we need to 
++         * make it correct. Safer would be to call mktime() */
++        tm_date.tm_wday = ++tm_date.tm_wday%7;
+     }
+     fill_hour_arrow(dw, days+1);
+     g_free(today);
+diff -Nur -x '*.orig' -x '*~' orage-4.5.14.0/src/functions.c orage-4.5.14.0.new/src/functions.c
+--- orage-4.5.14.0/src/functions.c	2008-03-06 09:44:26.000000000 -0500
++++ orage-4.5.14.0.new/src/functions.c	2008-10-07 02:19:43.000000000 -0400
+@@ -350,6 +350,12 @@
+             , (unsigned int *)&tm_date.tm_mon
+             , (unsigned int *)&tm_date.tm_mday);
+     tm_date.tm_year -= 1900;
++    /* need to fill missing tm_wday and tm_yday, which are in use 
++     * in some locale's default date. For example in en_IN. mktime does it */
++    if (mktime(&tm_date) == (time_t) -1) {
++        g_warning("orage: orage_cal_to_i18_date mktime failed %d %d %d"
++                , tm_date.tm_year, tm_date.tm_mon, tm_date.tm_mday);
++    }
+     return(orage_tm_date_to_i18_date(&tm_date));
+ }
+ 
+@@ -357,26 +363,52 @@
+ {
+     int i;
+     struct tm t = {0,0,0,0,0,0,0,0,0};
++    char *ret;
+ 
++    /*
+     i = sscanf(icaltime, XFICAL_APPT_TIME_FORMAT
+             , &t.tm_year, &t.tm_mon, &t.tm_mday
+             , &t.tm_hour, &t.tm_min, &t.tm_sec);
+     switch (i) {
+-        case 3: /* date */
++        case 3: / * date * /
+             t.tm_hour = -1;
+             t.tm_min = -1;
+             t.tm_sec = -1;
+             break;
+-        case 6: /* time */
++        case 6: / * time * /
+             break;
+-        default: /* error */
++        default: / * error * /
+             g_error("orage: orage_icaltime_to_tm_time error %s %d", icaltime, i);
+             break;
+     }
+-    if (real_tm) { /* normalise to standard tm format */
++
++    if (real_tm) { / * normalise to standard tm format * /
+         t.tm_year -= 1900;
+         t.tm_mon -= 1;
+     }
++            */
++    ret = strptime(icaltime, "%Y%m%dT%H%M%S", &t);
++    if (ret == NULL) {
++        /* not all format string matched, so it must be DATE */
++        /* and tm_wday is not calculated ! */
++    /* need to fill missing tm_wday and tm_yday, which are in use 
++     * in some locale's default date. For example in en_IN. mktime does it */
++        if (mktime(&t) == (time_t) -1) {
++            g_warning("orage: orage_icaltime_to_tm_time mktime failed %d %d %d"
++                    , t.tm_year, t.tm_mon, t.tm_mday);
++        }
++        t.tm_hour = -1;
++        t.tm_min = -1;
++        t.tm_sec = -1;
++    }
++    else if (ret[0] != 0) { /* icaltime was not processed completely */
++        g_error("orage: orage_icaltime_to_tm_time error %s %s", icaltime, ret);
++    }
++
++    if (!real_tm) { /* convert from standard tm format to "normal" format */
++        t.tm_year += 1900;
++        t.tm_mon += 1;
++    }
+     return(t);
+ }
+ 
+@@ -457,6 +489,12 @@
+         t->tm_mday = 1;
+     }
+     t->tm_year -= 1900;
++    /* need to fill missing tm_wday and tm_yday, which are in use 
++     * in some locale's default date. For example in en_IN. mktime does it */
++    if (mktime(t) == (time_t) -1) {
++        g_warning("orage: orage_icaltime_to_tm_time mktime failed %d %d %d"
++                , t->tm_year, t->tm_mon, t->tm_mday);
++    }
+ }
+ 
+ gint orage_days_between(struct tm *t1, struct tm *t2)




More information about the Pkg-xfce-commits mailing list