diff options
author | Milan Crha <mcrha@redhat.com> | 2010-04-07 00:34:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-04-07 00:34:36 +0800 |
commit | 6060c29567271ff3b1553db1811f3d6e209adabc (patch) | |
tree | 35a11f0566c1af9f564552dbd83bf21e3d318851 /calendar | |
parent | e96830d65e1f92a437156852f33f2a66070366d6 (diff) | |
download | gsoc2013-evolution-6060c29567271ff3b1553db1811f3d6e209adabc.tar.gz gsoc2013-evolution-6060c29567271ff3b1553db1811f3d6e209adabc.tar.zst gsoc2013-evolution-6060c29567271ff3b1553db1811f3d6e209adabc.zip |
Bug #567304 - Review strings for translation
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/dialogs/comp-editor-util.c | 96 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor-util.h | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.ui | 4 | ||||
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-memo-table.c | 2 | ||||
-rw-r--r-- | calendar/gui/goto-dialog.ui | 2 | ||||
-rw-r--r-- | calendar/gui/print.c | 18 |
7 files changed, 19 insertions, 107 deletions
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index cd16b46974..45c08d3ae7 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -111,102 +111,6 @@ comp_editor_free_dates (CompEditorPageDates *dates) e_cal_component_free_icaltimetype (dates->complete); } -/* dtstart is only passed in if tt is the dtend. */ -static void -write_label_piece (struct icaltimetype *tt, - gchar *buffer, - gint size, - gchar *stext, - const gchar *etext, - struct icaltimetype *dtstart) -{ - struct tm tmp_tm = { 0 }; - struct icaltimetype tt_copy = *tt; - gint len; - - /* FIXME: May want to convert the time to an appropriate zone. */ - - if (stext != NULL) - strcat (buffer, stext); - - /* If we are writing the DTEND (i.e. DTSTART is set), and - DTEND > DTSTART, subtract 1 day. The DTEND date is not inclusive. */ - if (tt_copy.is_date && dtstart - && icaltime_compare_date_only (tt_copy, *dtstart) > 0) { - icaltime_adjust (&tt_copy, -1, 0, 0, 0); - } - - tmp_tm.tm_year = tt_copy.year - 1900; - tmp_tm.tm_mon = tt_copy.month - 1; - tmp_tm.tm_mday = tt_copy.day; - tmp_tm.tm_hour = tt_copy.hour; - tmp_tm.tm_min = tt_copy.minute; - tmp_tm.tm_sec = tt_copy.second; - tmp_tm.tm_isdst = -1; - - tmp_tm.tm_wday = time_day_of_week (tt_copy.day, tt_copy.month - 1, - tt_copy.year); - - len = strlen (buffer); - e_time_format_date_and_time (&tmp_tm, - calendar_config_get_24_hour_format (), - !tt_copy.is_date, FALSE, - &buffer[len], size - len); - if (etext != NULL) - strcat (buffer, etext); -} - -/** - * comp_editor_date_label: - * @dates: The dates to use in constructing a label - * @label: The label whose text is to be set - * - * Set the text of a label based on the dates available and the user's - * formatting preferences - **/ -void -comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label) -{ - gchar buffer[1024]; - gboolean start_set = FALSE, end_set = FALSE; - gboolean complete_set = FALSE, due_set = FALSE; - - buffer[0] = '\0'; - - if (dates->start && !icaltime_is_null_time (*dates->start->value)) - start_set = TRUE; - if (dates->end && !icaltime_is_null_time (*dates->end->value)) - end_set = TRUE; - if (dates->complete && !icaltime_is_null_time (*dates->complete)) - complete_set = TRUE; - if (dates->due && !icaltime_is_null_time (*dates->due->value)) - due_set = TRUE; - - if (start_set) - write_label_piece (dates->start->value, buffer, 1024, - NULL, NULL, NULL); - - if (start_set && end_set) - write_label_piece (dates->end->value, buffer, 1024, - _(" to "), NULL, dates->start->value); - - if (complete_set) { - if (start_set) - write_label_piece (dates->complete, buffer, 1024, _(" (Completed "), ")", NULL); - else - write_label_piece (dates->complete, buffer, 1024, _("Completed "), NULL, NULL); - } - - if (due_set && dates->complete == NULL) { - if (start_set) - write_label_piece (dates->due->value, buffer, 1024, _(" (Due "), ")", NULL); - else - write_label_piece (dates->due->value, buffer, 1024, _("Due "), NULL, NULL); - } - - gtk_label_set_text (GTK_LABEL (label), buffer); -} - /** * comp_editor_new_date_edit: * @show_date: Whether to show a date picker in the widget. diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h index 6eeb8c5410..d3230051e3 100644 --- a/calendar/gui/dialogs/comp-editor-util.h +++ b/calendar/gui/dialogs/comp-editor-util.h @@ -32,8 +32,6 @@ void comp_editor_dates (CompEditorPageDates *date, ECalComponent *comp); void comp_editor_free_dates (CompEditorPageDates *dates); -void comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label); - GtkWidget * comp_editor_new_date_edit (gboolean show_date, gboolean show_time, gboolean make_time_insensitive); diff --git a/calendar/gui/dialogs/event-page.ui b/calendar/gui/dialogs/event-page.ui index 328b6eac42..061c0b1e43 100644 --- a/calendar/gui/dialogs/event-page.ui +++ b/calendar/gui/dialogs/event-page.ui @@ -323,7 +323,7 @@ <child> <object class="GtkLabel" id="summary-label"> <property name="visible">True</property> - <property name="label" translatable="yes">Su_mmary:</property> + <property name="label" translatable="yes">_Summary:</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_CENTER</property> @@ -858,7 +858,7 @@ <child> <object class="GtkLabel" id="attendees-label"> <property name="visible">True</property> - <property name="label" translatable="yes">Attendee_s...</property> + <property name="label" translatable="yes">Atte_ndees...</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 72f531bc0f..1401bee284 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -562,7 +562,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em gtk_widget_show (hbox); mts->add_attendees_button = - gtk_button_new_with_mnemonic (_("A_ttendees...")); + gtk_button_new_with_mnemonic (_("Atte_ndees...")); gtk_button_set_image ( GTK_BUTTON (mts->add_attendees_button), gtk_image_new_from_stock ( diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 2323f75341..7a31efd7f0 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -570,6 +570,7 @@ memo_table_query_tooltip (GtkWidget *widget, FALSE, FALSE, buff, 1000); if (buff [0]) { + /* Translators: This is followed by an event's start date/time */ g_string_append (tmp2, _("Start: ")); g_string_append (tmp2, buff); } @@ -588,6 +589,7 @@ memo_table_query_tooltip (GtkWidget *widget, if (tmp2->len) g_string_append (tmp2, "; "); + /* Translators: This is followed by an event's due date/time */ g_string_append (tmp2, _("Due: ")); g_string_append (tmp2, buff); } diff --git a/calendar/gui/goto-dialog.ui b/calendar/gui/goto-dialog.ui index 2e9fbf19d0..a7e3014712 100644 --- a/calendar/gui/goto-dialog.ui +++ b/calendar/gui/goto-dialog.ui @@ -81,7 +81,7 @@ <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Select Today</property> + <property name="label" translatable="yes">Select _Today</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> diff --git a/calendar/gui/print.c b/calendar/gui/print.c index a3e9af3bdd..f563168d5e 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -2414,21 +2414,29 @@ print_date_label (GtkPrintContext *context, ECalComponent *comp, ECal *client, if (start > 0) write_label_piece (start, buffer, 1024, NULL, NULL); - if (end > 0 && start > 0) + if (end > 0 && start > 0) { + /* Translators: This is part of "START to END" text, where START and END are date/times */ write_label_piece (end, buffer, 1024, _(" to "), NULL); + } if (complete > 0) { - if (start > 0) + if (start > 0) { + /* Translators: This is part of "START to END (Completed COMPLETED)", where COMPLETED is a completed date/time */ write_label_piece (complete, buffer, 1024, _(" (Completed "), ")"); - else + } else { + /* Translators: This is part of "Completed COMPLETED", where COMPLETED is a completed date/time */ write_label_piece (complete, buffer, 1024, _("Completed "), NULL); + } } if (due > 0 && complete == 0) { - if (start > 0) + if (start > 0) { + /* Translators: This is part of "START (Due DUE)", where START and DUE are dates/times */ write_label_piece (due, buffer, 1024, _(" (Due "), ")"); - else + } else { + /* Translators: This is part of "Due DUE", where DUE is a date/time due the event should be finished */ write_label_piece (due, buffer, 1024, _("Due "), NULL); + } } print_text_size_bold (context, buffer, PANGO_ALIGN_LEFT, |