~tuxator/midori/speeddial-refresh

« back to all changes in this revision

Viewing changes to src/webSearch.c

  • Committer: Christian Dywan
  • Date: 2008-03-22 02:38:23 UTC
  • Revision ID: git-v1:be89221aea13aa092f64d2133fd5bed5c23f4972
Implement localization via Gettext.

Based on the implementation of localization via Gettext
contributed by Enrico Tröger, a few adjustments were made
to allow Midori to be properly localized. Initially
German is fully supported.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include <string.h>
20
20
#include <gdk/gdkkeysyms.h>
 
21
#include <glib/gi18n.h>
21
22
 
22
23
void update_searchEngine(guint index, GtkWidget* search)
23
24
{
78
79
    }
79
80
    else
80
81
    {
81
 
        menuitem = gtk_image_menu_item_new_with_label("Empty");
 
82
        menuitem = gtk_image_menu_item_new_with_label(_("Empty"));
82
83
        gtk_widget_set_sensitive(menuitem, FALSE);
83
84
        gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
84
85
        gtk_widget_show(menuitem);
149
150
static void webSearch_editEngine_dialog_new(gboolean newEngine, CWebSearch* webSearch)
150
151
{
151
152
    GtkWidget* dialog = gtk_dialog_new_with_buttons(
152
 
        newEngine ? "Add search engine" : "Edit search engine"
 
153
        newEngine ? _("Add search engine") : _("Edit search engine")
153
154
        , GTK_WINDOW(webSearch->window)
154
155
        , GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR
155
156
        , GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL
179
180
 
180
181
    GtkWidget* hbox = gtk_hbox_new(FALSE, 8);
181
182
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
182
 
    GtkWidget* label = gtk_label_new_with_mnemonic("_Name:");
 
183
    GtkWidget* label = gtk_label_new_with_mnemonic(_("_Name:"));
183
184
    gtk_size_group_add_widget(sizegroup, label);
184
185
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
185
186
    GtkWidget* entry_shortName = gtk_entry_new();
195
196
    
196
197
    hbox = gtk_hbox_new(FALSE, 8);
197
198
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
198
 
    label = gtk_label_new_with_mnemonic("_Description:");
 
199
    label = gtk_label_new_with_mnemonic(_("_Description:"));
199
200
    gtk_size_group_add_widget(sizegroup, label);
200
201
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
201
202
    GtkWidget* entry_description = gtk_entry_new();
209
210
    
210
211
    hbox = gtk_hbox_new(FALSE, 8);
211
212
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
212
 
    label = gtk_label_new_with_mnemonic("_Url:");
 
213
    label = gtk_label_new_with_mnemonic(_("_URL:"));
213
214
    gtk_size_group_add_widget(sizegroup, label);
214
215
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
215
216
    GtkWidget* entry_url = gtk_entry_new();
223
224
    
224
225
    hbox = gtk_hbox_new(FALSE, 8);
225
226
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
226
 
    label = gtk_label_new_with_mnemonic("_Icon (name or file):");
 
227
    label = gtk_label_new_with_mnemonic(_("_Icon (name or file):"));
227
228
    gtk_size_group_add_widget(sizegroup, label);
228
229
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
229
230
    GtkWidget* entry_icon = gtk_entry_new();
237
238
    
238
239
    hbox = gtk_hbox_new(FALSE, 8);
239
240
    gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
240
 
    label = gtk_label_new_with_mnemonic("_Keyword:");
 
241
    label = gtk_label_new_with_mnemonic(_("_Keyword:"));
241
242
    gtk_size_group_add_widget(sizegroup, label);
242
243
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
243
244
    GtkWidget* entry_keyword = gtk_entry_new();
306
307
 
307
308
GtkWidget* webSearch_manageSearchEngines_dialog_new(MidoriBrowser* browser)
308
309
{
309
 
    const gchar* dialogTitle = "Manage search engines";
 
310
    const gchar* dialogTitle = _("Manage search engines");
310
311
    GtkWidget* dialog = gtk_dialog_new_with_buttons(dialogTitle
311
312
        , GTK_WINDOW(browser)
312
313
        , GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR