Request string break for GNOME Calendar 3.16.x
- From: Erick Pérez Castellanos <erickpc gnome org>
- To: gnome-i18n gnome org, GNOME release-team <release-team gnome org>, gnome-doc-list gnome org
- Subject: Request string break for GNOME Calendar 3.16.x
- Date: Mon, 1 Jun 2015 14:16:00 -0400
Hi:
A stated in the bug here [1], Calendar is crashing in some locales. The proposed fix introduces a new string to be translated, which requires me to ask for a string break for this branch of calendar.
The main reason for asking the break is that Calendar can not change the date of a any event in some locales, and crashes, render the application almost completely useless. This would continue for the entire 3.16.x cycle, leaving distro like Fedora 22 using a broken version of Calendar.
The proposed patch change is shown below:
--------------------------------------------------------------------------------------------------
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
index 1e90224..2f93512 100644
--- a/src/gcal-date-selector.c
+++ b/src/gcal-date-selector.c
@@ -233,14 +233,26 @@ gcal_date_selector_init (GcalDateSelector *self)
priv->month = 1;
priv->year = 1970;
- priv->mask = nl_langinfo (D_FMT);
+ /* This string represents day/month/year order for each of the differents
+ * languages. It could possibly be default value, %m/%d/%y placing the month
+ * before, or any ordering according to the translators environment */
+ priv->mask = _("%d/%m/%y");
/**
* Select the day, month and year indexes. This will
* be used later on to map the date entries to the
- * corresponding indexes.
+ * corresponding indexes. I've should add more validations here.
*/
max = strlen (priv->mask);
+ if (max != 6)
+ {
+ /* I'll assume an error and bail out with the default values */
+ priv->day_pos = 0;
+ priv->month_pos = 1;
+ priv->year_pos = 2;
+ return;
+ }
+
d_index = 0;
for (i = 0; i < max; i++)
--------------------------------------------------------------------------------------------------
[1]:
https://bugzilla.redhat.com/show_bug.cgi?id=1226823
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]