Improve strings for the sake of better localization

This commit is contained in:
Christian Dywan 2008-11-03 00:17:43 +01:00
parent 02751ee575
commit dbcfce4197
4 changed files with 37 additions and 33 deletions

View file

@ -75,8 +75,6 @@ stock_items_init (void)
{ STOCK_EXTENSIONS, N_("_Extensions"), 0, 0, GTK_STOCK_CONVERT }, { STOCK_EXTENSIONS, N_("_Extensions"), 0, 0, GTK_STOCK_CONVERT },
{ STOCK_HISTORY, N_("_History"), 0, 0, GTK_STOCK_SORT_ASCENDING }, { STOCK_HISTORY, N_("_History"), 0, 0, GTK_STOCK_SORT_ASCENDING },
{ STOCK_HOMEPAGE, N_("_Homepage"), 0, 0, GTK_STOCK_HOME }, { STOCK_HOMEPAGE, N_("_Homepage"), 0, 0, GTK_STOCK_HOME },
{ STOCK_OPEN_IN_TAB, N_("Open in New _Tab"), 0, 0, GTK_STOCK_ADD },
{ STOCK_OPEN_IN_WINDOW, N_("Open in New _Window"), 0, 0, GTK_STOCK_ADD },
{ STOCK_PAGE_HOLDER, N_("_Pageholder"), 0, 0, GTK_STOCK_ORIENTATION_PORTRAIT }, { STOCK_PAGE_HOLDER, N_("_Pageholder"), 0, 0, GTK_STOCK_ORIENTATION_PORTRAIT },
{ STOCK_SCRIPTS, N_("_Userscripts"), 0, 0, GTK_STOCK_EXECUTE }, { STOCK_SCRIPTS, N_("_Userscripts"), 0, 0, GTK_STOCK_EXECUTE },
{ STOCK_STYLES, N_("User_styles"), 0, 0, GTK_STOCK_SELECT_COLOR }, { STOCK_STYLES, N_("User_styles"), 0, 0, GTK_STOCK_SELECT_COLOR },
@ -133,7 +131,7 @@ settings_new_from_file (const gchar* filename)
G_KEY_FILE_KEEP_COMMENTS, &error)) G_KEY_FILE_KEEP_COMMENTS, &error))
{ {
if (error->code != G_FILE_ERROR_NOENT) if (error->code != G_FILE_ERROR_NOENT)
printf (_("The configuration couldn't be loaded. %s\n"), printf (_("The configuration couldn't be loaded: %s\n"),
error->message); error->message);
g_error_free (error); g_error_free (error);
} }
@ -591,7 +589,7 @@ db_open (const char* dbname,
{ {
*error = g_error_new (MIDORI_HISTORY_ERROR, *error = g_error_new (MIDORI_HISTORY_ERROR,
MIDORI_HISTORY_ERROR_DB_OPEN, MIDORI_HISTORY_ERROR_DB_OPEN,
_("Error opening database: %s\n"), _("Failed to open database: %s\n"),
sqlite3_errmsg (db)); sqlite3_errmsg (db));
} }
sqlite3_close (db); sqlite3_close (db);
@ -623,7 +621,7 @@ db_exec_callback (sqlite3* db,
{ {
*error = g_error_new (MIDORI_HISTORY_ERROR, *error = g_error_new (MIDORI_HISTORY_ERROR,
MIDORI_HISTORY_ERROR_EXEC_SQL, MIDORI_HISTORY_ERROR_EXEC_SQL,
_("Error opening database: %s\n"), _("Failed to open database: %s\n"),
errmsg); errmsg);
} }
sqlite3_free (errmsg); sqlite3_free (errmsg);
@ -678,7 +676,7 @@ midori_history_remove_item_cb (KatzeArray* history,
success = db_exec (db, sqlcmd, &error); success = db_exec (db, sqlcmd, &error);
if (!success) if (!success)
{ {
g_printerr (_("Failed to remove history item. %s\n"), error->message); g_printerr (_("Failed to remove history item: %s\n"), error->message);
g_error_free (error); g_error_free (error);
return ; return ;
} }
@ -702,7 +700,7 @@ midori_history_clear_cb (KatzeArray* history,
if (!db_exec (db, "DELETE FROM history", &error)) if (!db_exec (db, "DELETE FROM history", &error))
{ {
g_printerr (_("Failed to clear history. %s\n"), error->message); g_printerr (_("Failed to clear history: %s\n"), error->message);
g_error_free (error); g_error_free (error);
} }
} }
@ -735,7 +733,7 @@ midori_history_add_item_cb (KatzeArray* array,
if (!db_exec_callback (db, "SELECT date('now')", if (!db_exec_callback (db, "SELECT date('now')",
gettimestr, item, &error)) gettimestr, item, &error))
{ {
g_printerr (_("Failed to add history item. %s\n"), error->message); g_printerr (_("Failed to add history item: %s\n"), error->message);
g_error_free (error); g_error_free (error);
return; return;
} }
@ -750,7 +748,7 @@ midori_history_add_item_cb (KatzeArray* array,
g_free (sqlcmd); g_free (sqlcmd);
if (!success) if (!success)
{ {
g_printerr (_("Failed to add history item. %s\n"), error->message); g_printerr (_("Failed to add history item: %s\n"), error->message);
g_error_free (error); g_error_free (error);
return ; return ;
} }
@ -867,7 +865,7 @@ midori_history_terminate (sqlite3* db,
db_exec (db, sqlcmd, &error); db_exec (db, sqlcmd, &error);
if (!success) if (!success)
{ {
g_printerr (_("Failed to remove old history items. %s\n"), error->message); g_printerr (_("Failed to remove old history items: %s\n"), error->message);
g_error_free (error); g_error_free (error);
return ; return ;
} }
@ -1193,7 +1191,7 @@ main (int argc,
{ {
if (error->code != G_FILE_ERROR_NOENT) if (error->code != G_FILE_ERROR_NOENT)
g_string_append_printf (error_messages, g_string_append_printf (error_messages,
_("The bookmarks couldn't be loaded. %s\n"), error->message); _("The bookmarks couldn't be loaded: %s\n"), error->message);
g_error_free (error); g_error_free (error);
} }
g_free (config_file); g_free (config_file);
@ -1207,7 +1205,7 @@ main (int argc,
{ {
if (error->code != G_FILE_ERROR_NOENT) if (error->code != G_FILE_ERROR_NOENT)
g_string_append_printf (error_messages, g_string_append_printf (error_messages,
_("The session couldn't be loaded. %s\n"), error->message); _("The session couldn't be loaded: %s\n"), error->message);
g_error_free (error); g_error_free (error);
} }
g_free (config_file); g_free (config_file);
@ -1219,7 +1217,7 @@ main (int argc,
{ {
if (error->code != G_FILE_ERROR_NOENT) if (error->code != G_FILE_ERROR_NOENT)
g_string_append_printf (error_messages, g_string_append_printf (error_messages,
_("The trash couldn't be loaded. %s\n"), error->message); _("The trash couldn't be loaded: %s\n"), error->message);
g_error_free (error); g_error_free (error);
} }
g_free (config_file); g_free (config_file);
@ -1232,7 +1230,7 @@ main (int argc,
if ((db = midori_history_initialize (history, config_file, &error)) == NULL) if ((db = midori_history_initialize (history, config_file, &error)) == NULL)
{ {
g_string_append_printf (error_messages, g_string_append_printf (error_messages,
_("The history couldn't be loaded. %s\n"), error->message); _("The history couldn't be loaded: %s\n"), error->message);
g_error_free (error); g_error_free (error);
} }
g_free (config_file); g_free (config_file);

View file

@ -1145,7 +1145,7 @@ _action_open_activate (GtkAction* action,
GtkWidget* dialog; GtkWidget* dialog;
dialog = gtk_file_chooser_dialog_new ( dialog = gtk_file_chooser_dialog_new (
("Open file"), GTK_WINDOW (browser), _("Open file"), GTK_WINDOW (browser),
GTK_FILE_CHOOSER_ACTION_OPEN, GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
@ -1221,7 +1221,7 @@ _action_save_as_activate (GtkAction* action,
gchar* folder; gchar* folder;
dialog = gtk_file_chooser_dialog_new ( dialog = gtk_file_chooser_dialog_new (
("Save file as"), GTK_WINDOW (browser), _("Save file as"), GTK_WINDOW (browser),
GTK_FILE_CHOOSER_ACTION_SAVE, GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
@ -2165,6 +2165,7 @@ midori_panel_bookmarks_cursor_or_row_changed_cb (GtkTreeView* tree_view,
static void static void
midori_browser_bookmark_popup_item (GtkWidget* menu, midori_browser_bookmark_popup_item (GtkWidget* menu,
const gchar* stock_id, const gchar* stock_id,
const gchar* label,
KatzeItem* item, KatzeItem* item,
gpointer callback, gpointer callback,
MidoriBrowser* browser) MidoriBrowser* browser)
@ -2175,6 +2176,9 @@ midori_browser_bookmark_popup_item (GtkWidget* menu,
uri = katze_item_get_uri (item); uri = katze_item_get_uri (item);
menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL); menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
if (label)
gtk_label_set_text_with_mnemonic (GTK_LABEL (gtk_bin_get_child (
GTK_BIN (menuitem))), label);
if (!strcmp (stock_id, GTK_STOCK_EDIT)) if (!strcmp (stock_id, GTK_STOCK_EDIT))
gtk_widget_set_sensitive (menuitem, gtk_widget_set_sensitive (menuitem,
KATZE_IS_ARRAY (item) || uri != NULL); KATZE_IS_ARRAY (item) || uri != NULL);
@ -2292,22 +2296,22 @@ midori_browser_bookmark_popup (GtkWidget* widget,
GtkWidget* menuitem; GtkWidget* menuitem;
menu = gtk_menu_new (); menu = gtk_menu_new ();
midori_browser_bookmark_popup_item (menu, GTK_STOCK_OPEN, midori_browser_bookmark_popup_item (menu, GTK_STOCK_OPEN, NULL,
item, midori_browser_bookmark_open_activate_cb, browser); item, midori_browser_bookmark_open_activate_cb, browser);
midori_browser_bookmark_popup_item (menu, STOCK_OPEN_IN_TAB, midori_browser_bookmark_popup_item (menu, STOCK_TAB_NEW, _("Open in New _Tab"),
item, midori_browser_bookmark_open_in_tab_activate_cb, browser); item, midori_browser_bookmark_open_in_tab_activate_cb, browser);
midori_browser_bookmark_popup_item (menu, STOCK_OPEN_IN_WINDOW, midori_browser_bookmark_popup_item (menu, STOCK_WINDOW_NEW, _("Open in New _Window"),
item, midori_browser_bookmark_open_in_window_activate_cb, browser); item, midori_browser_bookmark_open_in_window_activate_cb, browser);
if (history_item && !KATZE_IS_ARRAY (item)) if (history_item && !KATZE_IS_ARRAY (item))
midori_browser_bookmark_popup_item (menu, STOCK_BOOKMARK_ADD, midori_browser_bookmark_popup_item (menu, STOCK_BOOKMARK_ADD, NULL,
item, midori_browser_bookmark_bookmark_activate_cb, browser); item, midori_browser_bookmark_bookmark_activate_cb, browser);
menuitem = gtk_separator_menu_item_new (); menuitem = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
gtk_widget_show (menuitem); gtk_widget_show (menuitem);
if (!history_item) if (!history_item)
midori_browser_bookmark_popup_item (menu, GTK_STOCK_EDIT, midori_browser_bookmark_popup_item (menu, GTK_STOCK_EDIT, NULL,
item, midori_browser_bookmark_edit_activate_cb, browser); item, midori_browser_bookmark_edit_activate_cb, browser);
midori_browser_bookmark_popup_item (menu, GTK_STOCK_DELETE, midori_browser_bookmark_popup_item (menu, GTK_STOCK_DELETE, NULL,
item, midori_browser_bookmark_delete_activate_cb, browser); item, midori_browser_bookmark_delete_activate_cb, browser);
sokoke_widget_popup (widget, GTK_MENU (menu), sokoke_widget_popup (widget, GTK_MENU (menu),
@ -3132,7 +3136,7 @@ static const GtkActionEntry entries[] = {
N_("Clear the entire history"), G_CALLBACK (_action_history_clear_activate) }, N_("Clear the entire history"), G_CALLBACK (_action_history_clear_activate) },
{ "HistoryAddBookmark", STOCK_BOOKMARK_ADD, { "HistoryAddBookmark", STOCK_BOOKMARK_ADD,
NULL, "", NULL, "",
N_("Add the selected history item as a bookmark"), N_("Bookmark the selected history item"),
G_CALLBACK (_action_history_add_bookmark_activate) }, G_CALLBACK (_action_history_add_bookmark_activate) },
{ "Tools", NULL, N_("_Tools") }, { "Tools", NULL, N_("_Tools") },
{ "ManageSearchEngines", GTK_STOCK_PROPERTIES, { "ManageSearchEngines", GTK_STOCK_PROPERTIES,
@ -3516,7 +3520,7 @@ midori_browser_init (MidoriBrowser* browser)
"name", "RecentlyVisited", "name", "RecentlyVisited",
"label", _("_Recently visited pages"), "label", _("_Recently visited pages"),
"stock-id", STOCK_HISTORY, "stock-id", STOCK_HISTORY,
"tooltip", _("Revisit pages that you opened before"), "tooltip", _("Reopen pages that you visited earlier"),
NULL); NULL);
g_object_connect (action, g_object_connect (action,
"signal::populate-popup", "signal::populate-popup",
@ -3532,7 +3536,7 @@ midori_browser_init (MidoriBrowser* browser)
"name", "Bookmarks", "name", "Bookmarks",
"label", _("_Bookmarks"), "label", _("_Bookmarks"),
"stock-id", STOCK_BOOKMARKS, "stock-id", STOCK_BOOKMARKS,
"tooltip", _("Reopen a previously closed tab or window"), "tooltip", _("Show the saved bookmarks"),
NULL); NULL);
g_object_connect (action, g_object_connect (action,
"signal::populate-popup", "signal::populate-popup",
@ -3546,7 +3550,7 @@ midori_browser_init (MidoriBrowser* browser)
action = g_object_new (KATZE_TYPE_ARRAY_ACTION, action = g_object_new (KATZE_TYPE_ARRAY_ACTION,
"name", "Window", "name", "Window",
"label", _("Window"), "label", _("_Window"),
"stock-id", GTK_STOCK_INDEX, "stock-id", GTK_STOCK_INDEX,
"tooltip", _("Show a list of all open tabs"), "tooltip", _("Show a list of all open tabs"),
"array", browser->proxy_array, "array", browser->proxy_array,

View file

@ -426,7 +426,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
#ifdef WEBKIT_CHECK_VERSION #ifdef WEBKIT_CHECK_VERSION
#if WEBKIT_CHECK_VERSION (1, 0, 3) #if WEBKIT_CHECK_VERSION (1, 0, 3)
button = katze_property_proxy (settings, "enable-developer-extras", NULL); button = katze_property_proxy (settings, "enable-developer-extras", NULL);
gtk_button_set_label (GTK_BUTTON (button), _("Developer tools")); gtk_button_set_label (GTK_BUTTON (button), _("Enable developer tools"));
SPANNED_ADD (button, 0, 1, 3, 4); SPANNED_ADD (button, 0, 1, 3, 4);
#endif #endif
#endif #endif
@ -478,7 +478,8 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
WIDGET_ADD (button, 1, 2, 3, 4); WIDGET_ADD (button, 1, 2, 3, 4);
/* Page "Network" */ /* Page "Network" */
/*PAGE_NEW (GTK_STOCK_NETWORK, _("Network")); #if 0
PAGE_NEW (GTK_STOCK_NETWORK, _("Network"));
FRAME_NEW (_("Network")); FRAME_NEW (_("Network"));
TABLE_NEW (2, 2); TABLE_NEW (2, 2);
label = katze_property_label (settings, "http-proxy"); label = katze_property_label (settings, "http-proxy");
@ -492,11 +493,13 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("MB")), gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("MB")),
FALSE, FALSE, 0); FALSE, FALSE, 0);
FILLED_ADD (hbox, 1, 2, 1, 2);*/ FILLED_ADD (hbox, 1, 2, 1, 2);
#endif
/* Page "Privacy" */ /* Page "Privacy" */
PAGE_NEW (GTK_STOCK_INDEX, _("Privacy")); PAGE_NEW (GTK_STOCK_INDEX, _("Privacy"));
/*FRAME_NEW (_("Web Cookies")); #if 0
FRAME_NEW (_("Web Cookies"));
TABLE_NEW (3, 2); TABLE_NEW (3, 2);
label = katze_property_label (settings, "accept-cookies"); label = katze_property_label (settings, "accept-cookies");
INDENTED_ADD (label, 0, 1, 0, 1); INDENTED_ADD (label, 0, 1, 0, 1);
@ -511,7 +514,8 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("days")), gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("days")),
FALSE, FALSE, 0); FALSE, FALSE, 0);
FILLED_ADD (hbox, 1, 2, 2, 3);*/ FILLED_ADD (hbox, 1, 2, 2, 3);
#endif
FRAME_NEW (_("History")); FRAME_NEW (_("History"));
TABLE_NEW (3, 2); TABLE_NEW (3, 2);
button = katze_property_proxy (settings, "remember-last-visited-pages", NULL); button = katze_property_proxy (settings, "remember-last-visited-pages", NULL);

View file

@ -29,8 +29,6 @@
#define STOCK_PAGE_HOLDER GTK_STOCK_ORIENTATION_PORTRAIT #define STOCK_PAGE_HOLDER GTK_STOCK_ORIENTATION_PORTRAIT
#define STOCK_STYLE "gnome-settings-theme" #define STOCK_STYLE "gnome-settings-theme"
#define STOCK_STYLES "gnome-settings-theme" #define STOCK_STYLES "gnome-settings-theme"
#define STOCK_OPEN_IN_TAB "stock_new-tab"
#define STOCK_OPEN_IN_WINDOW "stock_new-window"
#define STOCK_TRANSFER "package" #define STOCK_TRANSFER "package"
#define STOCK_TRANSFERS "package" #define STOCK_TRANSFERS "package"