From ab5e47a8570068f507a26a148a0dbecbb51c1bab Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Wed, 21 Jan 2009 12:41:13 +0000 Subject: [PATCH] Migrated maemo to text-utils dgettext macros pmo-trunk-r7214 --- src/maemo/modest-address-book.c | 6 +++--- src/maemo/modest-main-window.c | 3 ++- src/maemo/modest-msg-edit-window.c | 22 +++++++++++++--------- src/maemo/modest-msg-view-window.c | 22 ++++++++++++---------- src/maemo/modest-platform.c | 2 +- 5 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/maemo/modest-address-book.c b/src/maemo/modest-address-book.c index 163046e..faa1fb1 100644 --- a/src/maemo/modest-address-book.c +++ b/src/maemo/modest-address-book.c @@ -508,7 +508,7 @@ run_add_email_addr_to_contact_dlg(const gchar * contact_name) if ((invalid_char_offset != NULL)&&(*invalid_char_offset != '\0')) { gchar *char_in_string = g_strdup_printf ("%c", *invalid_char_offset); gchar *message = g_strdup_printf( - dgettext("hildon-common-strings", "ckdg_ib_illegal_characters_entered"), + _CS("ckdg_ib_illegal_characters_entered"), char_in_string); hildon_banner_show_information ( add_email_addr_to_contact_dlg, NULL, message ); @@ -753,11 +753,11 @@ modest_address_book_check_names (ModestRecptEditor *recpt_editor, gboolean updat if ((invalid_char_position != NULL) && (*invalid_char_position != '\0')) { gchar *char_in_string = g_strdup_printf("%c", *invalid_char_position); gchar *message = g_strdup_printf( - dgettext("hildon-common-strings", "ckdg_ib_illegal_characters_entered"), + _CS("ckdg_ib_illegal_characters_entered"), char_in_string); g_free (char_in_string); hildon_banner_show_information (NULL, NULL, message ); - g_free (message); + g_free (message); result = FALSE; } else if (strstr (address, "@") == NULL) { /* here goes searching in addressbook */ diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index e63d715..25f744e 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -2765,7 +2765,8 @@ on_zoom_minus_plus_not_implemented (ModestWindow *window) { g_return_val_if_fail (MODEST_IS_MAIN_WINDOW (window), FALSE); - hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_cannot_zoom_here")); + hildon_banner_show_information (NULL, NULL, + _CS("ckct_ib_cannot_zoom_here")); return FALSE; } diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index d322a21..c7fa46b 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -2216,7 +2216,8 @@ modest_msg_edit_window_insert_image (ModestMsgEditWindow *window) if (stream == NULL) { - modest_platform_information_banner (NULL, NULL, dgettext("hildon-fm", "sfil_ib_opening_not_allowed")); + modest_platform_information_banner (NULL, NULL, + _FM("sfil_ib_opening_not_allowed")); g_object_unref (mime_part); gnome_vfs_file_info_unref (info); @@ -2372,7 +2373,7 @@ modest_msg_edit_window_attach_file_one (ModestMsgEditWindow *window, size = info->size; if (size > allowed_size) { modest_platform_information_banner (NULL, NULL, - dgettext("hildon-fm", "sfil_ib_opening_not_allowed")); + _FM("sfil_ib_opening_not_allowed")); return 0; } } else @@ -2382,7 +2383,7 @@ modest_msg_edit_window_attach_file_one (ModestMsgEditWindow *window, if (stream == NULL) { - modest_platform_information_banner (NULL, NULL, dgettext("hildon-fm", "sfil_ib_opening_not_allowed")); + modest_platform_information_banner (NULL, NULL, _FM("sfil_ib_opening_not_allowed")); g_object_unref (mime_part); gnome_vfs_file_info_unref (info); @@ -3344,8 +3345,7 @@ subject_field_insert_text (GtkEditable *editable, if (result_len + old_length > 1000) { hildon_banner_show_information (GTK_WIDGET (window), NULL, - dgettext("hildon-common-strings", - "ckdg_ib_maximum_characters_reached")); + _CS("ckdg_ib_maximum_characters_reached")); } g_string_free (result, TRUE); @@ -3453,7 +3453,8 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget, g_free (priv->last_search); priv->last_search = NULL; /* Information banner about empty search */ - hildon_banner_show_information (NULL, NULL, dgettext ("hildon-common-strings", "ecdg_ib_find_rep_enter_text")); + hildon_banner_show_information (NULL, NULL, + _CS ("ecdg_ib_find_rep_enter_text")); return; } @@ -3469,14 +3470,16 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget, result = gtk_text_iter_forward_search_insensitive (&selection_end, current_search, &match_start, &match_end); if (!result) - hildon_banner_show_information (NULL, NULL, dgettext ("hildon-libs", "ckct_ib_find_search_complete")); + hildon_banner_show_information (NULL, NULL, + _HL ("ckct_ib_find_search_complete")); } else { GtkTextIter buffer_start; gtk_text_buffer_get_start_iter (priv->text_buffer, &buffer_start); result = gtk_text_iter_forward_search_insensitive (&buffer_start, current_search, &match_start, &match_end); if (!result) - hildon_banner_show_information (NULL, NULL, dgettext ("hildon-libs", "ckct_ib_find_no_matches")); + hildon_banner_show_information (NULL, NULL, + _HL ("ckct_ib_find_no_matches")); } /* Mark as selected the string found in search */ @@ -3664,7 +3667,8 @@ on_zoom_minus_plus_not_implemented (ModestWindow *window) { g_return_val_if_fail (MODEST_IS_MSG_EDIT_WINDOW (window), FALSE); - hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_cannot_zoom_here")); + hildon_banner_show_information (NULL, NULL, + _CS("ckct_ib_cannot_zoom_here")); return FALSE; } diff --git a/src/maemo/modest-msg-view-window.c b/src/maemo/modest-msg-view-window.c index d31351f..facfbc4 100644 --- a/src/maemo/modest-msg-view-window.c +++ b/src/maemo/modest-msg-view-window.c @@ -1468,7 +1468,7 @@ modest_msg_view_window_find_toolbar_search (GtkWidget *widget, if ((current_search == NULL) || (strcmp (current_search, "") == 0)) { g_free (current_search); - hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ecdg_ib_find_rep_enter_text")); + hildon_banner_show_information (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text")); return; } @@ -1479,7 +1479,7 @@ modest_msg_view_window_find_toolbar_search (GtkWidget *widget, result = modest_isearch_view_search (MODEST_ISEARCH_VIEW (priv->msg_view), priv->last_search); if (!result) { - hildon_banner_show_information (NULL, NULL, dgettext("hildon-libs", "ckct_ib_find_no_matches")); + hildon_banner_show_information (NULL, NULL, _HL("ckct_ib_find_no_matches")); g_free (priv->last_search); priv->last_search = NULL; } else { @@ -1488,7 +1488,7 @@ modest_msg_view_window_find_toolbar_search (GtkWidget *widget, } } else { if (!modest_isearch_view_search_next (MODEST_ISEARCH_VIEW (priv->msg_view))) { - hildon_banner_show_information (NULL, NULL, dgettext("hildon-libs", "ckct_ib_find_search_complete")); + hildon_banner_show_information (NULL, NULL, _HL("ckct_ib_find_search_complete")); g_free (priv->last_search); priv->last_search = NULL; } else { @@ -1547,7 +1547,7 @@ modest_msg_view_window_zoom_plus (ModestWindow *window) group = gtk_radio_action_get_group (zoom_radio_action); if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (group->data))) { - hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_max_zoom_level_reached")); + hildon_banner_show_information (NULL, NULL, _CS("ckct_ib_max_zoom_level_reached")); return FALSE; } @@ -1579,7 +1579,8 @@ modest_msg_view_window_zoom_minus (ModestWindow *window) gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (node->next->data), TRUE); return TRUE; } else { - hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_min_zoom_level_reached")); + hildon_banner_show_information (NULL, NULL, + _CS("ckct_ib_min_zoom_level_reached")); return FALSE; } break; @@ -2718,10 +2719,11 @@ idle_save_mime_part_show_result (SaveMimePartInfo *info) if (info->result == GNOME_VFS_OK) { hildon_banner_show_information (NULL, NULL, _CS("sfil_ib_saved")); } else if (info->result == GNOME_VFS_ERROR_NO_SPACE) { - hildon_banner_show_information (NULL, NULL, dgettext("ke-recv", - "cerm_device_memory_full")); + hildon_banner_show_information (NULL, NULL, + _KR("cerm_device_memory_full")); } else { - hildon_banner_show_information (NULL, NULL, _("mail_ib_file_operation_failed")); + hildon_banner_show_information (NULL, NULL, + _("mail_ib_file_operation_failed")); } gdk_threads_leave (); /* CHECKED */ } @@ -2812,7 +2814,7 @@ save_attachments_response (GtkDialog *dialog, if (!modest_utils_folder_writable (chooser_uri)) { hildon_banner_show_information - (NULL, NULL, dgettext("hildon-fm", "sfil_ib_readonly_location")); + (NULL, NULL, _FM("sfil_ib_readonly_location")); } else { TnyIterator *iter; @@ -2824,7 +2826,7 @@ save_attachments_response (GtkDialog *dialog, !tny_mime_part_is_purged (mime_part) && (tny_mime_part_get_filename (mime_part) != NULL)) { SaveMimePartPair *pair; - + pair = g_slice_new0 (SaveMimePartPair); if (tny_list_get_length (mime_parts) > 1) { diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index 1842f34..6677eab 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -2114,7 +2114,7 @@ modest_platform_check_memory_low (ModestWindow *win, if (win && lowmem && visuals) modest_platform_run_information_dialog ( GTK_WINDOW(win), - dgettext("ke-recv","memr_ib_operation_disabled"), + _KR("memr_ib_operation_disabled"), TRUE); if (lowmem) -- 1.7.9.5