~midori/midori/nativeGTK+ErrorPages

« back to all changes in this revision

Viewing changes to src/prefs.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:
296
296
 
297
297
GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
298
298
{
299
 
    gchar* dialogTitle = g_strdup_printf("%s Preferences", g_get_application_name());
 
299
    gchar* dialogTitle = g_strdup_printf(_("%s Preferences"), g_get_application_name());
300
300
    GtkWidget* dialog = gtk_dialog_new_with_buttons(dialogTitle
301
301
        , GTK_WINDOW(browser)
302
302
        , GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR
360
360
     gtk_container_add(GTK_CONTAINER(align), __widget);\
361
361
     FILLED_ADD(align, __left, __right, __top, __bottom)
362
362
    // Page "General"
363
 
    PAGE_NEW("General");
364
 
    FRAME_NEW("Startup");
 
363
    PAGE_NEW(_("General"));
 
364
    FRAME_NEW(_("Startup"));
365
365
    TABLE_NEW(2, 2);
366
 
    INDENTED_ADD(gtk_label_new("Load on startup"), 0, 1, 0, 1);
 
366
    INDENTED_ADD(gtk_label_new(_("Load on startup")), 0, 1, 0, 1);
367
367
    combobox = gtk_combo_box_new_text();
368
368
    sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
369
 
     , "Blank page", "Homepage", "Last open pages", NULL);
 
369
     , _("Blank page"), _("Homepage"), _("Last open pages"), NULL);
370
370
    gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), config->startup);
371
371
    g_signal_connect(combobox, "changed"
372
372
     , G_CALLBACK(on_prefs_loadonstartup_changed), prefs);
373
373
    FILLED_ADD(combobox, 1, 2, 0, 1);
374
 
    INDENTED_ADD(gtk_label_new("Homepage"), 0, 1, 1, 2);
 
374
    INDENTED_ADD(gtk_label_new(_("Homepage")), 0, 1, 1, 2);
375
375
    entry = gtk_entry_new();
376
376
    gtk_entry_set_text(GTK_ENTRY(entry), config->homepage);
377
377
    g_signal_connect(entry, "focus-out-event"
378
378
    , G_CALLBACK(on_prefs_homepage_focus_out), prefs);
379
379
    FILLED_ADD(entry, 1, 2, 1, 2);
380
380
    // TODO: We need something like "use current website"
381
 
    FRAME_NEW("Downloads");
 
381
    FRAME_NEW(_("Transfers"));
382
382
    TABLE_NEW(1, 2);
383
 
    INDENTED_ADD(gtk_label_new("Download folder"), 0, 1, 0, 1);
 
383
    INDENTED_ADD(gtk_label_new(_("Download folder")), 0, 1, 0, 1);
384
384
    GtkWidget* filebutton = gtk_file_chooser_button_new(
385
 
     "Choose download folder", GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
 
385
     _("Choose downloaded files folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
386
386
    // FIXME: The default should probably be ~/Desktop
387
387
    gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(filebutton)
388
388
     , g_get_home_dir()); //...
389
389
    gtk_widget_set_sensitive(filebutton, FALSE); //...
390
390
    FILLED_ADD(filebutton, 1, 2, 0, 1);
391
391
    checkbutton = gtk_check_button_new_with_mnemonic
392
 
     ("Show a notification window for finished downloads");
 
392
     (_("Show a notification window for finished transfers"));
393
393
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
394
394
    SPANNED_ADD(checkbutton, 0, 2, 1, 2);
395
 
    FRAME_NEW("Languages");
 
395
    FRAME_NEW(_("Languages"));
396
396
    TABLE_NEW(1, 2);
397
 
    INDENTED_ADD(gtk_label_new("Preferred languages"), 0, 1, 0, 1);
 
397
    INDENTED_ADD(gtk_label_new(_("Preferred languages")), 0, 1, 0, 1);
398
398
    entry = gtk_entry_new();
399
399
    // TODO: Make sth like get_browser_languages_default filtering encodings and C out
400
400
    // TODO: Provide a real ui with real language names (iso-codes)
406
406
    FILLED_ADD(entry, 1, 2, 0, 1);
407
407
 
408
408
    // Page "Appearance"
409
 
    PAGE_NEW("Appearance");
410
 
    FRAME_NEW("Font settings");
 
409
    PAGE_NEW(_("Appearance"));
 
410
    FRAME_NEW(_("Font settings"));
411
411
    TABLE_NEW(5, 2);
412
 
    INDENTED_ADD(gtk_label_new_with_mnemonic("Default _font"), 0, 1, 0, 1);
 
412
    INDENTED_ADD(gtk_label_new_with_mnemonic(_("Default _font")), 0, 1, 0, 1);
413
413
    gchar* defaultFont = g_strdup_printf("%s %d"
414
414
     , config->defaultFontFamily, config->defaultFontSize);
415
415
    button = gtk_font_button_new_with_font(defaultFont);
416
416
    g_free(defaultFont);
417
417
    g_signal_connect(button, "font-set", G_CALLBACK(on_prefs_defaultFont_changed), prefs);
418
418
    FILLED_ADD(button, 1, 2, 0, 1);
419
 
    INDENTED_ADD(gtk_label_new_with_mnemonic("_Minimum font size"), 0, 1, 1, 2);
 
419
    INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Minimum font size")), 0, 1, 1, 2);
420
420
    hbox = gtk_hbox_new(FALSE, 4);
421
421
    spinbutton = gtk_spin_button_new_with_range(1, G_MAXINT, 1);
422
422
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), config->minimumFontSize);
423
423
    g_signal_connect(spinbutton, "value-changed"
424
424
     , G_CALLBACK(on_prefs_minimumFontSize_changed), prefs);
425
425
    gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
426
 
    button = gtk_button_new_with_mnemonic("_Advanced");
 
426
    button = gtk_button_new_with_mnemonic(_("_Advanced"));
427
427
    gtk_widget_set_sensitive(button, FALSE); //...
428
428
    gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 4);
429
429
    FILLED_ADD(hbox, 1, 2, 1, 2);
430
 
    INDENTED_ADD(gtk_label_new_with_mnemonic("Default _encoding"), 0, 1, 2, 3);
 
430
    INDENTED_ADD(gtk_label_new_with_mnemonic(_("Default _encoding")), 0, 1, 2, 3);
431
431
    combobox = gtk_combo_box_new_text();
432
432
    sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
433
 
     , "Chinese (BIG5)", "Japanese (SHIFT_JIS)", "Russian (KOI8-R)"
434
 
     , "Unicode (UTF-8)", "Western (ISO-8859-1)", NULL);
 
433
     , _("Chinese (BIG5)"), _("Japanese (SHIFT_JIS)"), _("Russian (KOI8-R)")
 
434
     , _("Unicode (UTF-8)"), _("Western (ISO-8859-1)"), NULL);
435
435
    if(!strcmp(config->defaultEncoding, "BIG5"))
436
436
        gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), 0);
437
437
    else if(!strcmp(config->defaultEncoding, "SHIFT_JIS"))
446
446
    g_signal_connect(combobox, "changed"
447
447
     , G_CALLBACK(on_prefs_defaultEncoding_changed), prefs);
448
448
    FILLED_ADD(combobox, 1, 2, 2, 3);
449
 
    button = gtk_button_new_with_label("Advanced settings");
 
449
    button = gtk_button_new_with_label(_("Advanced settings"));
450
450
    gtk_widget_set_sensitive(button, FALSE); //...
451
451
    WIDGET_ADD(button, 1, 2, 2, 3);
452
 
    FRAME_NEW("Default colors");
 
452
    FRAME_NEW(_("Default colors"));
453
453
    TABLE_NEW(2, 4);
454
 
    SEMI_INDENTED_ADD(gtk_label_new("Text color"), 0, 1, 0, 1);
 
454
    SEMI_INDENTED_ADD(gtk_label_new(_("Text color")), 0, 1, 0, 1);
455
455
    colorbutton = gtk_color_button_new();
456
456
    gtk_widget_set_sensitive(colorbutton, FALSE); //...
457
457
    WIDGET_ADD(colorbutton, 1, 2, 0, 1);
458
 
    SEMI_INDENTED_ADD(gtk_label_new("Background color"), 2, 3, 0, 1);
 
458
    SEMI_INDENTED_ADD(gtk_label_new(_("Background color")), 2, 3, 0, 1);
459
459
    colorbutton = gtk_color_button_new();
460
460
    gtk_widget_set_sensitive(colorbutton, FALSE); //...
461
461
    WIDGET_ADD(colorbutton, 3, 4, 0, 1);
462
 
    SEMI_INDENTED_ADD(gtk_label_new("Normal link color"), 0, 1, 1, 2);
 
462
    SEMI_INDENTED_ADD(gtk_label_new(_("Link color")), 0, 1, 1, 2);
463
463
    colorbutton = gtk_color_button_new();
464
464
    gtk_widget_set_sensitive(colorbutton, FALSE); //...
465
465
    WIDGET_ADD(colorbutton, 1, 2, 1, 2);
466
 
    SEMI_INDENTED_ADD(gtk_label_new("Visited link color"), 2, 3, 1, 2);
 
466
    SEMI_INDENTED_ADD(gtk_label_new(_("Visited link color")), 2, 3, 1, 2);
467
467
    colorbutton = gtk_color_button_new();
468
468
    gtk_widget_set_sensitive(colorbutton, FALSE); //...
469
469
    WIDGET_ADD(colorbutton, 3, 4, 1, 2);
470
470
 
471
471
    // Page "Behavior"
472
 
    PAGE_NEW("Behavior");
473
 
    FRAME_NEW("Browsing");
 
472
    PAGE_NEW(_("Behavior"));
 
473
    FRAME_NEW(_("Browsing"));
474
474
    TABLE_NEW(3, 2);
475
 
    INDENTED_ADD(gtk_label_new_with_mnemonic("Open _new pages in"), 0, 1, 0, 1);
 
475
    INDENTED_ADD(gtk_label_new_with_mnemonic(_("Open _new pages in")), 0, 1, 0, 1);
476
476
    combobox = gtk_combo_box_new_text();
477
477
    sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
478
 
     , "New tab", "New window", "Current tab", NULL);
 
478
     , _("New tab"), _("New window"), _("Current tab"), NULL);
479
479
    gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), config->newPages);
480
480
    g_signal_connect(combobox, "changed", G_CALLBACK(on_prefs_newpages_changed), prefs);
481
481
    gtk_widget_set_sensitive(combobox, FALSE); //...
482
482
    FILLED_ADD(combobox, 1, 2, 0, 1);
483
 
    checkbutton = gtk_check_button_new_with_mnemonic("_Middle click goto");
 
483
    checkbutton = gtk_check_button_new_with_mnemonic(_("_Middle click opens selection"));
484
484
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->middleClickGoto);
485
485
    g_signal_connect(checkbutton, "toggled"
486
486
     , G_CALLBACK(on_prefs_middleClickGoto_toggled), prefs);
487
487
    INDENTED_ADD(checkbutton, 0, 1, 1, 2);
488
 
    checkbutton = gtk_check_button_new_with_mnemonic("Open tabs in the _background");
 
488
    checkbutton = gtk_check_button_new_with_mnemonic(_("Open tabs in the _background"));
489
489
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->openTabsInTheBackground);
490
490
    g_signal_connect(checkbutton, "toggled"
491
491
     , G_CALLBACK(on_prefs_openTabsInTheBackground_toggled), prefs);
492
492
    SPANNED_ADD(checkbutton, 1, 2, 1, 2);
493
 
    checkbutton = gtk_check_button_new_with_mnemonic("Open popups in _tabs");
 
493
    checkbutton = gtk_check_button_new_with_mnemonic(_("Open popups in _tabs"));
494
494
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->openPopupsInTabs);
495
495
    g_signal_connect(checkbutton, "toggled"
496
496
     , G_CALLBACK(on_prefs_openPopupsInTabs_toggled), prefs);
497
497
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
498
498
    SPANNED_ADD(checkbutton, 0, 2, 2, 3);
499
 
    FRAME_NEW("Features");
 
499
    FRAME_NEW(_("Features"));
500
500
    TABLE_NEW(4, 2);
501
 
    checkbutton = gtk_check_button_new_with_mnemonic("Load _images");
 
501
    checkbutton = gtk_check_button_new_with_mnemonic(_("Load _images"));
502
502
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->autoLoadImages);
503
503
    g_signal_connect(checkbutton, "toggled"
504
504
     , G_CALLBACK(on_prefs_loadImagesAutomatically_toggled), prefs);
505
505
    INDENTED_ADD(checkbutton, 0, 1, 0, 1);
506
 
    checkbutton = gtk_check_button_new_with_mnemonic("_Shrink images to fit");
 
506
    checkbutton = gtk_check_button_new_with_mnemonic(_("_Shrink images to fit"));
507
507
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->autoShrinkImages);
508
508
    g_signal_connect(checkbutton, "toggled"
509
509
     , G_CALLBACK(on_prefs_shrinkImagesToFit_toggled), prefs);
510
510
    SPANNED_ADD(checkbutton, 1, 2, 0, 1);
511
 
    checkbutton = gtk_check_button_new_with_mnemonic("Print _backgrounds");
 
511
    checkbutton = gtk_check_button_new_with_mnemonic(_("Print _backgrounds"));
512
512
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->printBackgrounds);
513
513
    g_signal_connect(checkbutton, "toggled"
514
514
     , G_CALLBACK(on_prefs_printBackgrounds_toggled), prefs);
515
515
    INDENTED_ADD(checkbutton, 0, 1, 1, 2);
516
 
    checkbutton = gtk_check_button_new_with_mnemonic("_Resizable textareas");
 
516
    checkbutton = gtk_check_button_new_with_mnemonic(_("_Resizable textareas"));
517
517
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->resizableTextAreas);
518
518
    g_signal_connect(checkbutton, "toggled"
519
519
     , G_CALLBACK(on_prefs_resizableTextAreas_toggled), prefs);
520
520
    SPANNED_ADD(checkbutton, 1, 2, 1, 2);
521
 
    checkbutton = gtk_check_button_new_with_mnemonic("Enable _scripts");
 
521
    checkbutton = gtk_check_button_new_with_mnemonic(_("Enable _scripts"));
522
522
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->enableScripts);
523
523
    g_signal_connect(checkbutton, "toggled"
524
524
     , G_CALLBACK(on_prefs_enableJavaScript_toggled), prefs);
525
525
    INDENTED_ADD(checkbutton, 0, 1, 2, 3);
526
 
    checkbutton = gtk_check_button_new_with_mnemonic("Enable _plugins");
 
526
    checkbutton = gtk_check_button_new_with_mnemonic(_("Enable _plugins"));
527
527
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->enablePlugins);
528
528
    g_signal_connect(checkbutton, "toggled"
529
529
     , G_CALLBACK(on_prefs_enablePlugins_toggled), prefs);
530
530
    SPANNED_ADD(checkbutton, 1, 2, 2, 3);
531
 
    checkbutton = gtk_check_button_new_with_mnemonic("_User Stylesheet");
 
531
    checkbutton = gtk_check_button_new_with_mnemonic(_("_User Stylesheet"));
532
532
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->userStylesheet);
533
533
    g_signal_connect(checkbutton, "toggled"
534
534
     , G_CALLBACK(on_prefs_userStylesheet_toggled), prefs);
535
535
    INDENTED_ADD(checkbutton, 0, 1, 3, 4);
536
536
    filebutton = gtk_file_chooser_button_new(
537
 
     "Choose user stylesheet", GTK_FILE_CHOOSER_ACTION_OPEN);
 
537
     _("Choose user stylesheet"), GTK_FILE_CHOOSER_ACTION_OPEN);
538
538
    prefs->userStylesheetUri = filebutton;
539
539
    gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(filebutton), config->userStylesheetUri);
540
540
    g_signal_connect(filebutton, "file-set"
543
543
    FILLED_ADD(filebutton, 1, 2, 3, 4);
544
544
 
545
545
    // Page "Interface"
546
 
    PAGE_NEW("Interface");
547
 
    FRAME_NEW("Navigationbar");
 
546
    PAGE_NEW(_("Interface"));
 
547
    FRAME_NEW(_("Navigationbar"));
548
548
    TABLE_NEW(3, 2);
549
 
    INDENTED_ADD(gtk_label_new_with_mnemonic("_Toolbar style"), 0, 1, 0, 1);
 
549
    INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Toolbar style")), 0, 1, 0, 1);
550
550
    combobox = gtk_combo_box_new_text();
551
551
    sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
552
 
     , "Default", "Icons", "Text", "Both", "Both horizontal", NULL);
 
552
     , _("Default"), _("Icons"), _("Text"), _("Both"), _("Both horizontal"), NULL);
553
553
    gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), config->toolbarStyle);
554
554
    g_signal_connect(combobox, "changed"
555
555
     , G_CALLBACK(on_prefs_toolbarstyle_changed), prefs);
556
556
    FILLED_ADD(combobox, 1, 2, 0, 1);
557
 
    checkbutton = gtk_check_button_new_with_mnemonic("Show small _icons");
 
557
    checkbutton = gtk_check_button_new_with_mnemonic(_("Show small _icons"));
558
558
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarSmall);
559
559
    g_signal_connect(checkbutton, "toggled"
560
560
     , G_CALLBACK(on_prefs_toolbarSmall_toggled), prefs);
561
561
    INDENTED_ADD(checkbutton, 0, 1, 1, 2);
562
 
    checkbutton = gtk_check_button_new_with_mnemonic("Show web_search");
 
562
    checkbutton = gtk_check_button_new_with_mnemonic(_("Show Web_search"));
563
563
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarWebSearch);
564
564
    g_signal_connect(checkbutton, "toggled"
565
565
     , G_CALLBACK(on_prefs_toolbarWebSearch_toggled), prefs);
566
566
    SPANNED_ADD(checkbutton, 1, 2, 1, 2);
567
 
    checkbutton = gtk_check_button_new_with_mnemonic("Show _New Tab Button");
 
567
    checkbutton = gtk_check_button_new_with_mnemonic(_("Show _New Tab"));
568
568
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarNewTab);
569
569
    g_signal_connect(checkbutton, "toggled"
570
570
     , G_CALLBACK(on_prefs_toolbarNewTab_toggled), prefs);
571
571
    INDENTED_ADD(checkbutton, 0, 1, 2, 3);
572
 
    checkbutton = gtk_check_button_new_with_mnemonic("Show _closed tabs button");
 
572
    checkbutton = gtk_check_button_new_with_mnemonic(_("Show _Trash"));
573
573
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarClosedTabs);
574
574
    g_signal_connect(checkbutton, "toggled"
575
575
     , G_CALLBACK(on_prefs_toolbarClosedTabs_toggled), prefs);
576
576
    SPANNED_ADD(checkbutton, 1, 2, 2, 3);
577
 
    FRAME_NEW("Miscellaneous");
 
577
    FRAME_NEW(_("Miscellaneous"));
578
578
    TABLE_NEW(2, 2);
579
 
    checkbutton = gtk_check_button_new_with_mnemonic("Close _buttons on tabs");
 
579
    checkbutton = gtk_check_button_new_with_mnemonic(_("Close _buttons on tabs"));
580
580
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->tabClose);
581
581
    g_signal_connect(checkbutton, "toggled"
582
582
     , G_CALLBACK(on_prefs_tabClose_toggled), prefs);
583
583
    INDENTED_ADD(checkbutton, 0, 1, 0, 1);
584
584
    hbox = gtk_hbox_new(FALSE, 4);
585
585
    gtk_box_pack_start(GTK_BOX(hbox)
586
 
     , gtk_label_new_with_mnemonic("Tab Si_ze"), FALSE, FALSE, 4);
 
586
     , gtk_label_new_with_mnemonic(_("Tab Si_ze")), FALSE, FALSE, 4);
587
587
    spinbutton = gtk_spin_button_new_with_range(0, 36, 1);
588
588
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), config->tabSize);
589
589
    g_signal_connect(spinbutton, "changed"
590
590
     , G_CALLBACK(on_prefs_tabSize_changed), prefs);
591
591
    gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
592
592
    FILLED_ADD(hbox, 1, 2, 0, 1);
593
 
    INDENTED_ADD(gtk_label_new_with_mnemonic("_Location search engine"), 0, 1, 1, 2);
 
593
    INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Location search engine")), 0, 1, 1, 2);
594
594
    entry = gtk_entry_new();
595
595
    gtk_entry_set_text(GTK_ENTRY(entry), config->locationSearch);
596
596
    g_signal_connect(entry, "focus-out-event"
598
598
    FILLED_ADD(entry, 1, 2, 1, 2);
599
599
 
600
600
    // Page "Network"
601
 
    PAGE_NEW("Network");
602
 
    FRAME_NEW("Proxy Server");
 
601
    PAGE_NEW(_("Network"));
 
602
    FRAME_NEW(_("Proxy Server"));
603
603
    TABLE_NEW(5, 2);
604
 
    checkbutton = gtk_check_button_new_with_mnemonic("_Custom proxy server");
 
604
    checkbutton = gtk_check_button_new_with_mnemonic(_("_Custom proxy server"));
605
605
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
606
606
    SPANNED_ADD(checkbutton, 0, 2, 0, 1);
607
607
    hbox = gtk_hbox_new(FALSE, 4);
608
 
    INDENTED_ADD(gtk_label_new_with_mnemonic("_Host/ Port"), 0, 1, 1, 2);
 
608
    INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Host/ Port")), 0, 1, 1, 2);
609
609
    entry = gtk_entry_new();
610
610
    gtk_widget_set_sensitive(entry, FALSE); //...
611
611
    gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 0);
614
614
    gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
615
615
    FILLED_ADD(hbox, 1, 2, 1, 2);
616
616
    checkbutton = gtk_check_button_new_with_mnemonic
617
 
     ("Proxy requires authentication");
 
617
     (_("Proxy requires authentication"));
618
618
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
619
619
    // TODO: The proxy user and pass need to be indented further
620
620
    SPANNED_ADD(checkbutton, 0, 2, 2, 3);
621
 
    INDENTED_ADD(gtk_label_new("Username"), 0, 1, 3, 4);
 
621
    INDENTED_ADD(gtk_label_new(_("Username")), 0, 1, 3, 4);
622
622
    entry = gtk_entry_new();
623
623
    gtk_widget_set_sensitive(entry, FALSE); //...
624
624
    FILLED_ADD(entry, 1, 2, 3, 4);
625
 
    INDENTED_ADD(gtk_label_new("Password"), 0, 1, 4, 5);
 
625
    INDENTED_ADD(gtk_label_new(_("Password")), 0, 1, 4, 5);
626
626
    entry = gtk_entry_new();
627
627
    gtk_widget_set_sensitive(entry, FALSE); //...
628
628
    FILLED_ADD(entry, 1, 2, 4, 5);
629
 
    FRAME_NEW("Cache");
 
629
    FRAME_NEW(_("Cache"));
630
630
    TABLE_NEW(1, 2);
631
 
    INDENTED_ADD(gtk_label_new("Cache size"), 0, 1, 0, 1);
 
631
    INDENTED_ADD(gtk_label_new(_("Cache size")), 0, 1, 0, 1);
632
632
    hbox = gtk_hbox_new(FALSE, 4);
633
633
    spinbutton = gtk_spin_button_new_with_range(0, 10000, 10);
634
634
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), 100/*config->iCacheSize*/);
635
635
    gtk_widget_set_sensitive(spinbutton, FALSE); //...
636
636
    gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
637
 
    gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("MB"), FALSE, FALSE, 0);
638
 
    button = gtk_button_new_with_label("Clear cache");
 
637
    gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("MB")), FALSE, FALSE, 0);
 
638
    button = gtk_button_new_with_label(_("Clear cache"));
639
639
    gtk_widget_set_sensitive(button, FALSE); //...
640
640
    gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 4);
641
641
    FILLED_ADD(hbox, 1, 2, 0, 1);
642
642
 
643
643
    // Page "Privacy"
644
 
    PAGE_NEW("Privacy");
645
 
    FRAME_NEW("Cookies");
 
644
    PAGE_NEW(_("Privacy"));
 
645
    FRAME_NEW(_("Cookies"));
646
646
    TABLE_NEW(3, 2);
647
 
    INDENTED_ADD(gtk_label_new("Accept cookies"), 0, 1, 0, 1);
 
647
    INDENTED_ADD(gtk_label_new(_("Accept cookies")), 0, 1, 0, 1);
648
648
    combobox = gtk_combo_box_new_text();
649
649
    sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
650
 
     , "All cookies", "Session cookies", "None", NULL);
 
650
     , _("All cookies"), _("Session cookies"), _("None"), NULL);
651
651
    gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), 0); //...
652
652
    gtk_widget_set_sensitive(combobox, FALSE); //...
653
653
    FILLED_ADD(combobox, 1, 2, 0, 1);
654
654
    checkbutton = gtk_check_button_new_with_mnemonic
655
 
     ("Allow cookies from the original website only");
 
655
     (_("Allow cookies from the original website only"));
656
656
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
657
657
    SPANNED_ADD(checkbutton, 0, 2, 1, 2);
658
 
    INDENTED_ADD(gtk_label_new("Maximum cookie age"), 0, 1, 2, 3);
 
658
    INDENTED_ADD(gtk_label_new(_("Maximum cookie age")), 0, 1, 2, 3);
659
659
    hbox = gtk_hbox_new(FALSE, 4);
660
660
    spinbutton = gtk_spin_button_new_with_range(0, 360, 1);
661
661
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), 30/*config->iCookieAgeMax*/);
662
662
    gtk_widget_set_sensitive(spinbutton, FALSE); //...
663
663
    gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
664
 
    gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("days"), FALSE, FALSE, 0);
665
 
    button = gtk_button_new_with_label("View cookies");
 
664
    gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("days")), FALSE, FALSE, 0);
 
665
    button = gtk_button_new_with_label(_("View cookies"));
666
666
    gtk_widget_set_sensitive(button, FALSE); //...
667
667
    gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 4);
668
668
    FILLED_ADD(hbox, 1, 2, 2, 3);
669
 
    FRAME_NEW("History");
 
669
    FRAME_NEW(_("History"));
670
670
    TABLE_NEW(3, 2);
671
 
    checkbutton = gtk_check_button_new_with_mnemonic("Remember my visited pages");
 
671
    checkbutton = gtk_check_button_new_with_mnemonic(_("Remember my visited pages"));
672
672
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
673
673
    SPANNED_ADD(checkbutton, 0, 1, 0, 1);
674
674
    hbox = gtk_hbox_new(FALSE, 4);
676
676
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), 30/*config->iHistoryAgeMax*/);
677
677
    gtk_widget_set_sensitive(spinbutton, FALSE); //...
678
678
    gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
679
 
    gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("days"), FALSE, FALSE, 0);
 
679
    gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("days")), FALSE, FALSE, 0);
680
680
    SPANNED_ADD(hbox, 1, 2, 0, 1);
681
681
    checkbutton = gtk_check_button_new_with_mnemonic
682
 
     ("Remember my form inputs");
 
682
     (_("Remember my form inputs"));
683
683
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
684
684
    SPANNED_ADD(checkbutton, 0, 2, 1, 2);
685
685
    checkbutton = gtk_check_button_new_with_mnemonic
686
 
     ("Remember my downloaded files");
 
686
     (_("Remember my downloaded files"));
687
687
    gtk_widget_set_sensitive(checkbutton, FALSE); //...
688
688
    SPANNED_ADD(checkbutton, 0, 2, 2, 3);
689
689
 
690
690
    // Page "Programs"
691
 
    PAGE_NEW("Programs");
692
 
    FRAME_NEW("External programs");
 
691
    PAGE_NEW(_("Programs"));
 
692
    FRAME_NEW(_("External programs"));
693
693
    TABLE_NEW(3, 2);
694
694
    GtkWidget* treeview; GtkTreeViewColumn* column;
695
695
    GtkCellRenderer* renderer_text; GtkCellRenderer* renderer_pixbuf;
700
700
    renderer_text = gtk_cell_renderer_text_new();
701
701
    renderer_pixbuf = gtk_cell_renderer_pixbuf_new();
702
702
    column = gtk_tree_view_column_new_with_attributes(
703
 
     "Protocol", renderer_text, "text", PROTOCOLS_COL_NAME, NULL);
 
703
     _("Protocol"), renderer_text, "text", PROTOCOLS_COL_NAME, NULL);
704
704
    gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
705
705
    column = gtk_tree_view_column_new();
706
 
    gtk_tree_view_column_set_title(column, "Command");
 
706
    gtk_tree_view_column_set_title(column, _("Command"));
707
707
    gtk_tree_view_column_pack_start(column, renderer_pixbuf, FALSE);
708
708
    gtk_tree_view_column_set_cell_data_func(column, renderer_pixbuf
709
709
     , (GtkTreeCellDataFunc)on_prefs_protocols_render_icon, prefs, NULL);