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.
This commit is contained in:
Christian Dywan 2008-03-22 03:38:23 +01:00
parent bf80618658
commit be89221aea
25 changed files with 1540 additions and 282 deletions

View file

@ -1,8 +1,22 @@
AUTOMAKE_OPTIONS = gnu
SUBDIRS = katze src
SUBDIRS = katze src po
desktopdir = $(datadir)/applications
desktop_DATA = midori.desktop
desktop_in_files = midori.desktop
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
EXTRA_DIST = HACKING TODO $(desktop_DATA)
DISTCLEANFILES = \
midori.desktop \
intltool-extract \
intltool-merge \
intltool-update
EXTRA_DIST = \
HACKING \
TODO \
midori.desktop.in \
intltool-extract.in \
intltool-merge.in \
intltool-update.in

View file

@ -1,7 +1,9 @@
#!/bin/sh
echo "no" | glib-gettextize --force --copy
intltoolize --copy --force --automake
libtoolize --copy --force
aclocal
autoheader
autoconf
automake --add-missing --copy
automake --add-missing --copy

View file

@ -10,6 +10,7 @@ AM_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_INTLTOOL
# Checks for header files
AC_HEADER_STDC
@ -82,11 +83,26 @@ AC_SUBST(LIBXML_LIBS)
LIBXML_VER=`pkg-config --modversion libxml-2.0`
AC_DEFINE_UNQUOTED([LIBXML_VER], "$LIBXML_VER", [libXML2 version])
# i18n
GETTEXT_PACKAGE=midori
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS
AM_GLIB_GNU_GETTEXT
# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
if test "x$MSGFMT" = "xno"; then
AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
fi
# Here we tell the configure script which files to *create*
AC_CONFIG_FILES([
Makefile \
katze/Makefile \
src/Makefile
src/Makefile \
po/Makefile.in
])
AC_OUTPUT
@ -96,7 +112,6 @@ echo " GTK+2 $GTK_VER"
echo " WebKit $WEBKIT_VER"
echo " Libsexy $LIBSEXY_VER"
echo " libXML2 $LIBXML_VER"
echo " GetText N/A"
echo
echo " Debugging $enable_debug"
echo

View file

@ -6,7 +6,8 @@ noinst_LTLIBRARIES = \
libkatze.la
libkatze_la_LIBADD = \
$(GTK_LIBS) \
$(GTK_LIBS) \
$(INTLLIBS) \
$(LIBXML_LIBS)
libkatze_la_SOURCES = \

View file

@ -12,6 +12,7 @@
#include "katze-throbber.h"
#include <gtk/gtk.h>
#include <glib/gi18n.h>
G_DEFINE_TYPE (KatzeThrobber, katze_throbber, GTK_TYPE_MISC)
@ -131,7 +132,7 @@ katze_throbber_class_init (KatzeThrobberClass* class)
g_param_spec_int (
"icon-size",
"Icon size",
"Symbolic size to use for the animation",
_("Symbolic size to use for the animation"),
0, G_MAXINT, GTK_ICON_SIZE_MENU,
flags));
@ -140,7 +141,7 @@ katze_throbber_class_init (KatzeThrobberClass* class)
g_param_spec_string (
"icon-name",
"Icon Name",
"The name of an icon containing animation frames",
_("The name of an icon containing animation frames"),
"process-working",
flags));
@ -149,7 +150,7 @@ katze_throbber_class_init (KatzeThrobberClass* class)
g_param_spec_object (
"pixbuf",
"Pixbuf",
"A GdkPixbuf containing animation frames",
_("A GdkPixbuf containing animation frames"),
GDK_TYPE_PIXBUF,
flags));
@ -158,7 +159,7 @@ katze_throbber_class_init (KatzeThrobberClass* class)
g_param_spec_boolean (
"animated",
"Animated",
"Whether the throbber should be animated",
_("Whether the throbber should be animated"),
FALSE,
flags));
@ -167,7 +168,7 @@ katze_throbber_class_init (KatzeThrobberClass* class)
g_param_spec_string (
"static-icon-name",
"Static Icon Name",
"The name of an icon to be used as the static image",
_("The name of an icon to be used as the static image"),
NULL,
flags));
@ -176,7 +177,7 @@ katze_throbber_class_init (KatzeThrobberClass* class)
g_param_spec_object (
"static-pixbuf",
"Static Pixbuf",
"A GdkPixbuf to be used as the static image",
_("A GdkPixbuf to be used as the static image"),
GDK_TYPE_PIXBUF,
flags));
@ -185,7 +186,7 @@ katze_throbber_class_init (KatzeThrobberClass* class)
g_param_spec_string (
"static-stock-id",
"Static Stock ID",
"The stock ID of an icon to be used as the static image",
_("The stock ID of an icon to be used as the static image"),
NULL,
flags));

View file

@ -24,6 +24,7 @@
#include <string.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <glib/gi18n.h>
#include "katze-utils.h"
@ -719,7 +720,7 @@ katze_xbel_folder_from_data (KatzeXbelItem* folder,
{
// No valid xml or broken encoding
*error = g_error_new (KATZE_XBEL_ERROR, KATZE_XBEL_ERROR_READ,
"Malformed document.");
_("Malformed document."));
return FALSE;
}
if (!katze_xbel_folder_from_xmlDocPtr (folder, doc))
@ -727,7 +728,7 @@ katze_xbel_folder_from_data (KatzeXbelItem* folder,
// Parsing failed
xmlFreeDoc(doc);
*error = g_error_new (KATZE_XBEL_ERROR, KATZE_XBEL_ERROR_READ,
"Malformed document.");
_("Malformed document."));
return FALSE;
}
xmlFreeDoc(doc);
@ -755,7 +756,7 @@ katze_xbel_folder_from_file (KatzeXbelItem* folder,
{
// File doesn't exist
*error = g_error_new (G_FILE_ERROR, G_FILE_ERROR_NOENT,
"File not found.");
_("File not found."));
return FALSE;
}
xmlDocPtr doc;
@ -763,7 +764,7 @@ katze_xbel_folder_from_file (KatzeXbelItem* folder,
{
// No valid xml or broken encoding
*error = g_error_new (KATZE_XBEL_ERROR, KATZE_XBEL_ERROR_READ,
"Malformed document.");
_("Malformed document."));
return FALSE;
}
if (!katze_xbel_folder_from_xmlDocPtr (folder, doc))
@ -771,7 +772,7 @@ katze_xbel_folder_from_file (KatzeXbelItem* folder,
// Parsing failed
xmlFreeDoc (doc);
*error = g_error_new (KATZE_XBEL_ERROR, KATZE_XBEL_ERROR_READ,
"Malformed document.");
_("Malformed document."));
return FALSE;
}
xmlFreeDoc (doc);
@ -800,7 +801,7 @@ katze_xbel_folder_from_data_dirs (KatzeXbelItem* folder,
// FIXME: Essentially unimplemented
*error = g_error_new (KATZE_XBEL_ERROR, KATZE_XBEL_ERROR_READ,
"Malformed document.");
_("Malformed document."));
return FALSE;
}
@ -948,7 +949,7 @@ katze_xbel_folder_to_file (KatzeXbelItem* folder,
if(!(fp = fopen (file, "w")))
{
*error = g_error_new (G_FILE_ERROR, G_FILE_ERROR_ACCES,
"Writing failed.");
_("Writing failed."));
return FALSE;
}
fputs (data, fp);

View file

@ -3,9 +3,9 @@
Version=1.0
Encoding=UTF-8
Type=Application
Name=Midori Web Browser
GenericName=Web Browser
Comment=Lightweight web browser
_Name=Midori Web Browser
_GenericName=Web Browser
_Comment=Lightweight web browser
Categories=GTK;Network;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;
Exec=midori %u

2
po/LINGUAS Normal file
View file

@ -0,0 +1,2 @@
# set of available languages (in alphabetic order)
de

218
po/Makefile.in.in Normal file
View file

@ -0,0 +1,218 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
#
# This file may be copied and used freely without restrictions. It may
# be used in projects which are not available under a GNU Public License,
# but which still want to provide support for the GNU gettext functionality.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
DATADIRNAME = @DATADIRNAME@
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
ALL_LINGUAS = @ALL_LINGUAS@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
POTFILES = \
# This comment gets stripped out
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
.SUFFIXES:
.SUFFIXES: .po .pox .gmo .mo .msg .cat
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
$(mkdir_p) $(DESTDIR)$(itlocaledir)
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $(srcdir)/$$lang.gmo as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
if test -r $$lang.gmo.m; then \
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
if test -r $(srcdir)/$$lang.gmo.m ; then \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $(srcdir)/$$lang.gmo.m as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
# Empty stubs to satisfy archaic automake needs
dvi info tags TAGS ID:
# Define this as empty until I found a useful application.
install-exec installcheck:
uninstall:
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
check: all $(GETTEXT_PACKAGE).pot
rm -f missing notexist
srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
if [ -r missing -o -r notexist ]; then \
exit 1; \
fi
mostlyclean:
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES stamp-it
rm -f *.mo *.msg *.cat *.cat.m *.gmo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f Makefile.in.in
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
test -f $$file || file="$(srcdir)/$$file"; \
ln $$file $(distdir) 2> /dev/null \
|| cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.gmo failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
Makefile POTFILES: stamp-it
@if test ! -f $@; then \
rm -f stamp-it; \
$(MAKE) stamp-it; \
fi
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

18
po/POTFILES.in Normal file
View file

@ -0,0 +1,18 @@
# List of source files containing translatable strings.
midori.desktop.in
src/conf.c
src/helpers.c
src/main.c
src/midori-browser.c
src/midori-panel.c
src/midori-trash.c
src/midori-websettings.c
src/midori-webview.c
src/prefs.c
src/search.c
src/sokoke.c
src/webSearch.c
katze/katze-throbber.c
katze/katze-utils.c
katze/katze-xbel.c

1
po/POTFILES.skip Normal file
View file

@ -0,0 +1 @@
# List of source files containing translatable strings but should be ignored.

956
po/de.po Normal file
View file

@ -0,0 +1,956 @@
# German translations for midori package.
# Copyright (C) 2008 THE midori'S COPYRIGHT HOLDER
# This file is distributed under the same license as the midori package.
# Enrico Tröger <enrico.troeger@uvena.de> 2008
# Christian Dywan <christian@twotoasts.de> 2008
#
msgid ""
msgstr ""
"Project-Id-Version: midori 0.0.17\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-03-22 03:05+0100\n"
"PO-Revision-Date: 2008-03-20 13:21+0100\n"
"Last-Translator: Christian Dywan <christian@twotoasts.de>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../midori.desktop.in.h:1
msgid "Lightweight web browser"
msgstr "Kleiner Navigator"
#: ../midori.desktop.in.h:2
msgid "Midori Web Browser"
msgstr "Midori Navigator"
#: ../midori.desktop.in.h:3
msgid "Web Browser"
msgstr "Navigator"
#. FIXME: Should we have a more specific message?
#: ../src/helpers.c:68 ../src/helpers.c:84
msgid "Could not run external program."
msgstr "Externes Programm konnte nicht gestartet werden"
#: ../src/main.c:49
msgid "Bookmark"
msgstr "Lesezeichen"
#: ../src/main.c:50
msgid "New Bookmark"
msgstr "Neues Lesezeichen"
#: ../src/main.c:51
msgid "_Form Fill"
msgstr "_Formulare ausfüllen"
#: ../src/main.c:52 ../src/prefs.c:369 ../src/prefs.c:374
msgid "Homepage"
msgstr "Startseite"
#: ../src/main.c:53
msgid "New _Tab"
msgstr "Neuer _Reiter"
#: ../src/main.c:54
msgid "New _Window"
msgstr "Neues _Fenster"
#: ../src/main.c:59
msgid "_Fullscreen"
msgstr "_Vollbild"
#: ../src/main.c:60
msgid "_Leave Fullscreen"
msgstr "Vollbild _verlassen"
#: ../src/main.c:139 ../src/main.c:171
msgid "midori"
msgstr "midori"
#: ../src/main.c:146
msgid "Display program version"
msgstr "Programmversion anzeigen"
#: ../src/main.c:150
msgid "[URL]"
msgstr "[URL]"
#: ../src/main.c:173
msgid "Debugging"
msgstr "Fehlerbehebung"
#: ../src/main.c:174
msgid "Please report comments, suggestions and bugs to:"
msgstr "Kommentare, Vorschläge und Fehlerberichte senden an:"
#: ../src/main.c:176
msgid "Check for new versions at:"
msgstr "Informieren Sie sich über neue Versionen unter:"
#: ../src/main.c:193
#, c-format
msgid "The configuration couldn't be loaded. %s\n"
msgstr "Die Konfiguration konnte nicht geladen werden. %s\n"
#: ../src/main.c:219
#, c-format
msgid "The bookmarks couldn't be loaded. %s\n"
msgstr "Die Lesezeichen konnten nicht geladen werden. %s\n"
#: ../src/main.c:232
#, c-format
msgid "The session couldn't be loaded. %s\n"
msgstr "Die Sitzung konnte nicht geladen werden. %s\n"
#: ../src/main.c:244
#, c-format
msgid "The trash couldn't be loaded. %s\n"
msgstr "Der Papierkorb konnte nicht geladen werden. %s\n"
#: ../src/main.c:254
msgid "The following errors occured:"
msgstr "Folgende Fehler sind aufgetreten:"
#: ../src/main.c:56
msgid "Select _All"
msgstr "A_lles markieren"
#: ../src/midori-browser.c:185 ../src/midori-browser.c:1918
#: ../src/midori-browser.c:1924
msgid "Reload the current page"
msgstr "Diese Seite neu laden"
#: ../src/midori-browser.c:193 ../src/midori-browser.c:1921
msgid "Stop loading the current page"
msgstr "Laden dieser Seite abbrechen"
#: ../src/midori-browser.c:258
#, c-format
msgid "%d%% loaded"
msgstr "%d%% geladen"
#: ../src/midori-browser.c:521 ../src/midori-webview.c:253
msgid "The associated settings"
msgstr "Die zugewiesenen Einstellungen"
#: ../src/midori-browser.c:541 ../src/midori-webview.c:244
msgid "The text that is displayed in the statusbar"
msgstr "Der Text, der in der Statusleiste angezeigt wird"
#: ../src/midori-browser.c:560
msgid "The trash, collecting recently closed tabs and windows"
msgstr "Der Papierkorb, Behältnis für kürzlich geschlossene Reiter und Fenster"
#: ../src/midori-browser.c:1051
msgid "Open location"
msgstr "Adresse öffnen"
#: ../src/midori-browser.c:1063 ../src/midori-browser.c:1109
msgid "_Location:"
msgstr "_Ort:"
#. TODO: We should offer all of the search's features here
#: ../src/midori-browser.c:1097
msgid "Web search"
msgstr "Netzsuche"
#: ../src/midori-browser.c:1136
msgid "New bookmark"
msgstr "Neues Lesezeichen"
#: ../src/midori-browser.c:1136
msgid "Edit bookmark"
msgstr "Lesezeichen bearbeiten"
#: ../src/midori-browser.c:1153
msgid "_Title:"
msgstr "_Titel:"
#: ../src/midori-browser.c:1169 ../src/webSearch.c:199
msgid "_Description:"
msgstr "_Beschreibung"
#: ../src/midori-browser.c:1188 ../src/webSearch.c:213
msgid "_URL:"
msgstr "_URL:"
#: ../src/midori-browser.c:1206
msgid "_Folder:"
msgstr "_Ordner:"
#: ../src/midori-browser.c:1210
msgid "Root"
msgstr "Wurzel"
#: ../src/midori-browser.c:1429
msgid "<i>Separator</i>"
msgstr "<i>Trennlinie</i>"
#: ../src/midori-browser.c:1615
msgid "A lightweight web browser."
msgstr "Ein kleiner Navigator."
#: ../src/midori-browser.c:1623
msgid "translator-credits"
msgstr ""
"Enrico Tröger <enrico.troeger@uvena.de>\n"
"Christian Dywan <christian@twotoasts.de>"
#: ../src/midori-browser.c:1838
msgid "_File"
msgstr "_Datei"
#: ../src/midori-browser.c:1841
msgid "Open a new window"
msgstr "Ein neues Fenster öffnen"
#: ../src/midori-browser.c:1844
msgid "Open a new tab"
msgstr "Einen neuen Reiter öffnen"
#: ../src/midori-browser.c:1847
msgid "Open a file"
msgstr "Eine Datei öffnen"
#: ../src/midori-browser.c:1850
msgid "Save to a file"
msgstr "In Datei speichern"
#: ../src/midori-browser.c:1852
msgid "_Close Tab"
msgstr "Reiter sch_ließen"
#: ../src/midori-browser.c:1853
msgid "Close the current tab"
msgstr "Den aktuellen Reiter schließen"
#: ../src/midori-browser.c:1855
msgid "C_lose Window"
msgstr "_Fenster schließen"
#: ../src/midori-browser.c:1856
msgid "Close this window"
msgstr "Dieses Fenster schließen"
#: ../src/midori-browser.c:1858
msgid "Pa_ge Setup"
msgstr "Seite _einrichten"
#: ../src/midori-browser.c:1868
msgid "Quit the application"
msgstr "Programm beenden"
#: ../src/midori-browser.c:1870
msgid "_Edit"
msgstr "_Bearbeiten"
#: ../src/midori-browser.c:1873
msgid "Undo the last modification"
msgstr "Die letzte Änderung wiederrufen"
#: ../src/midori-browser.c:1876
msgid "Redo the last modification"
msgstr "Die letzte Änderung wiederholen"
#: ../src/midori-browser.c:1882 ../src/midori-browser.c:1885
msgid "Copy the selected text"
msgstr "MArkierten Text kopieren"
#: ../src/midori-browser.c:1888
msgid "Paste text from the clipboard"
msgstr "Text aus der Zwischenablage einfügen"
#: ../src/midori-browser.c:1891
msgid "Delete the selected text"
msgstr "Marlkierten Text löschen"
#: ../src/midori-browser.c:1894
msgid "Select all text"
msgstr "Gesamten Text auswählen"
#: ../src/midori-browser.c:1902
msgid "Find _Next"
msgstr "_Nächstes"
#: ../src/midori-browser.c:1905
msgid "Find _Previous"
msgstr "_Vorheriges"
#: ../src/midori-browser.c:1908
msgid "_Quick Find"
msgstr "_Schnellsuche"
#: ../src/midori-browser.c:1914
msgid "_View"
msgstr "_Ansicht"
#: ../src/midori-browser.c:1915
msgid "_Toolbars"
msgstr "_Werkzeugleisten"
#: ../src/midori-browser.c:1935
msgid "View Source"
msgstr "Quelltext anzeigen"
#: ../src/midori-browser.c:1938
msgid "View Selection Source"
msgstr "Quelltext der Markierung anzeigen"
#: ../src/midori-browser.c:1942
msgid "Toggle fullscreen view"
msgstr "Vollbildmodus ein-/ ausschalten"
#: ../src/midori-browser.c:1944
msgid "_Go"
msgstr "_Gehe zu"
#: ../src/midori-browser.c:1955
msgid "Location..."
msgstr "Ort..."
#: ../src/midori-browser.c:1958
msgid "Web Search..."
msgstr "Netzsuche..."
#: ../src/midori-browser.c:1961
msgid "Open in Page_holder..."
msgstr "In Seiten_halter öffnen..."
#: ../src/midori-browser.c:1964
msgid "Closed Tabs and Windows"
msgstr "Geschlossene Reiter und Fenster"
#: ../src/midori-browser.c:1965
msgid "Reopen a previously closed tab or window"
msgstr "Reiter oder Fenster zurückholen"
#: ../src/midori-browser.c:1967
msgid "Empty Trash"
msgstr "Papierkorb leeren"
#: ../src/midori-browser.c:1970
msgid "Undo Close Tab"
msgstr "Reiter zurückholen"
#: ../src/midori-browser.c:1973
msgid "_Bookmarks"
msgstr "_Lesezeichen"
#: ../src/midori-browser.c:1978
msgid "_Manage Bookmarks"
msgstr "Lesezeichen _verwalten"
#: ../src/midori-browser.c:1984
msgid "Open in New _Tab"
msgstr "In einem neuen _Reiter öffnen"
#: ../src/midori-browser.c:1987
msgid "Open in New _Window"
msgstr "In einem neuen _Fenster öffnen"
#: ../src/midori-browser.c:1996
msgid "_Tools"
msgstr "_Extras"
#: ../src/midori-browser.c:1998
msgid "_Manage Search Engines"
msgstr "Suchmaschinen verwalten"
#: ../src/midori-browser.c:1999
msgid "Add, edit and remove search engines..."
msgstr "Suchmaschinen hinzufügen, bearbeiten und löschen..."
#: ../src/midori-browser.c:2002
msgid "_Window"
msgstr "_Fenster"
#: ../src/midori-browser.c:2004
msgid "_Previous Tab"
msgstr "_Vorheriger Reiter"
#: ../src/midori-browser.c:2007
msgid "_Next Tab"
msgstr "_Nächster Reiter"
#: ../src/midori-browser.c:2010
msgid "Tab _Overview"
msgstr "Reiterüber_sicht"
#. G_CALLBACK (_action_tab_overview_activate)
#: ../src/midori-browser.c:2013
msgid "_Help"
msgstr "_Hilfe"
#: ../src/midori-browser.c:2015
msgid "_Contents"
msgstr "_Inhalt"
#: ../src/midori-browser.c:2025
msgid "P_rivate Browsing"
msgstr "_Privat navigieren"
#: ../src/midori-browser.c:2029
msgid "_Work Offline"
msgstr "_Ohne Verbindung arbeiten"
#: ../src/midori-browser.c:2034
msgid "_Navigationbar"
msgstr "Navigationsleiste"
#: ../src/midori-browser.c:2038
msgid "Side_panel"
msgstr "Seitenleiste"
#: ../src/midori-browser.c:2042
msgid "_Bookmarkbar"
msgstr "_Lesezeichenleiste"
#: ../src/midori-browser.c:2046
msgid "_Transferbar"
msgstr "_Übertragungsleiste"
#: ../src/midori-browser.c:2050
msgid "_Statusbar"
msgstr "_Statusleiste"
#: ../src/midori-browser.c:2520
msgid "Bookmarks"
msgstr "Lesezeichen"
#. TODO: We need something like "use current website"
#: ../src/midori-browser.c:2530 ../src/prefs.c:381
msgid "Transfers"
msgstr "Übertragungen"
#: ../src/midori-browser.c:2539
msgid "Console"
msgstr "Konsole"
#: ../src/midori-browser.c:2548 ../src/prefs.c:669
msgid "History"
msgstr "Verlauf"
#: ../src/midori-browser.c:2557
msgid "Pageholder"
msgstr "Seitenhalter"
#: ../src/midori-browser.c:2579
msgid "_Inline find:"
msgstr "Inkrementelle suche:"
#: ../src/midori-browser.c:2605
msgid "Match Case"
msgstr "Groß-/ Kleinschreibung beachten"
#: ../src/midori-browser.c:2622
msgid "Close Findbar"
msgstr "Suchleiste schließen"
#: ../src/midori-panel.c:140
msgid "Appearance of the shadow around each panel"
msgstr "Erscheinungsbild des Schattens um jede Leiste"
#: ../src/midori-panel.c:150
msgid "Menu to hold panel items"
msgstr "Menü für Leistenelemente"
#: ../src/midori-panel.c:159
msgid "The index of the current page"
msgstr "Der Index der aktiven Seite"
#: ../src/midori-panel.c:203 ../src/midori-panel.c:204
msgid "Close panel"
msgstr "Leiste schließen"
#: ../src/midori-panel.c:368
msgid "Untitled"
msgstr "Unbenannt"
#: ../src/midori-trash.c:97
msgid "The maximum number of items"
msgstr "Die maximale Anzahl an Elementen"
#: ../src/midori-websettings.c:69
msgid "The desired tab label size"
msgstr "Die gewünschte Größe der Reiterbeschriftung"
#: ../src/midori-websettings.c:78
msgid "Whether tabs have close buttons"
msgstr "Ob Reiter Schließenknöpfe haben"
#: ../src/midori-websettings.c:87
msgid "Load an URL from the selection via middle click"
msgstr "Lade eine ausgewählte URL mit der mittleren Maustaste"
#: ../src/midori-webview.c:217
msgid "The icon of the currently loaded page"
msgstr "Das Symbol der aktuellen Seite"
#: ../src/midori-webview.c:226
msgid "The URI of the currently loaded page"
msgstr "Die URI der aktuellen Seite"
#: ../src/midori-webview.c:235
msgid "The title of the currently loaded page"
msgstr "Der Titel der aktuellen Seite"
#: ../src/midori-webview.c:472
msgid "Open Link in New _Tab"
msgstr "Verweis in einem neuen _Reiter öffnen"
#: ../src/midori-webview.c:495
msgid "Open URL in New _Tab"
msgstr "_URL in einem neuen Reiter öffnen"
#: ../src/prefs.c:299
#, c-format
msgid "%s Preferences"
msgstr "%s Einstellungen"
#. Page "General"
#: ../src/prefs.c:363
msgid "General"
msgstr "Allgemein"
#: ../src/prefs.c:364
msgid "Startup"
msgstr "Programmstart"
#: ../src/prefs.c:366
msgid "Load on startup"
msgstr "Beim Programmstart öffnen"
#: ../src/prefs.c:369
msgid "Blank page"
msgstr "Leere Seite"
#: ../src/prefs.c:369
msgid "Last open pages"
msgstr "Zuletzt geöffnete Seiten"
#: ../src/prefs.c:383
msgid "Download folder"
msgstr "Dateispeicherordner"
#: ../src/prefs.c:385
msgid "Choose downloaded files folder"
msgstr "Ordner für heruntergeladene Dateien auswählen"
#: ../src/prefs.c:392
msgid "Show a notification window for finished transfers"
msgstr "Zeige ein Hinweisfenster für abgeschlossene Übertragungen"
#: ../src/prefs.c:395
msgid "Languages"
msgstr "Sprachen"
#: ../src/prefs.c:397
msgid "Preferred languages"
msgstr "Bevorzugte Sprachen"
#. Page "Appearance"
#: ../src/prefs.c:409
msgid "Appearance"
msgstr "Anzeige"
#: ../src/prefs.c:410
msgid "Font settings"
msgstr "Schrifteinstellungen"
#: ../src/prefs.c:412
msgid "Default _font"
msgstr "Standard_schrift"
#: ../src/prefs.c:419
msgid "_Minimum font size"
msgstr "_Minimale Schriftgröße"
#: ../src/prefs.c:426
msgid "_Advanced"
msgstr "_Erweitert"
#: ../src/prefs.c:430
msgid "Default _encoding"
msgstr "Standard_kodierung"
#: ../src/prefs.c:433
msgid "Chinese (BIG5)"
msgstr "Traditionelles Chinesisch (Big5)"
#: ../src/prefs.c:433
msgid "Japanese (SHIFT_JIS)"
msgstr "Japanisch (Shift_JIS)"
#: ../src/prefs.c:433
msgid "Russian (KOI8-R)"
msgstr "Russisch (KOI8-R)"
#: ../src/prefs.c:434
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-8)"
#: ../src/prefs.c:434
msgid "Western (ISO-8859-1)"
msgstr "Westlich (ISO-8859-1)"
#: ../src/prefs.c:449
msgid "Advanced settings"
msgstr "Erweiterte Einstellungen"
#: ../src/prefs.c:452
msgid "Default colors"
msgstr "Standardfarben"
#: ../src/prefs.c:454
msgid "Text color"
msgstr "Textfarbe"
#: ../src/prefs.c:458
msgid "Background color"
msgstr "Hintergrundfarbe"
#: ../src/prefs.c:462
msgid "Link color"
msgstr "Verweisfarbe"
#: ../src/prefs.c:466
msgid "Visited link color"
msgstr "Besuchte Verweisfarbe"
#. Page "Behavior"
#: ../src/prefs.c:472
msgid "Behavior"
msgstr "Verhalten"
#: ../src/prefs.c:473
msgid "Browsing"
msgstr "Navigation"
#: ../src/prefs.c:475
msgid "Open _new pages in"
msgstr "_Neue Seiten öffnen in"
#: ../src/prefs.c:478
msgid "New tab"
msgstr "Neuer Reiter"
#: ../src/prefs.c:478
msgid "New window"
msgstr "Neues Fenster"
#: ../src/prefs.c:478
msgid "Current tab"
msgstr "Aktuelle Reiter"
#: ../src/prefs.c:483
msgid "_Middle click opens selection"
msgstr "_Mittelklick öffnet Markierung"
#: ../src/prefs.c:488
msgid "Open tabs in the _background"
msgstr "Reiter im _Hintergrund öffnen"
#: ../src/prefs.c:493
msgid "Open popups in _tabs"
msgstr "Aufklappfenster in _Reitern öffnen"
#: ../src/prefs.c:499
msgid "Features"
msgstr "Inhalte"
#: ../src/prefs.c:501
msgid "Load _images"
msgstr "_Bilder laden"
#: ../src/prefs.c:506
msgid "_Shrink images to fit"
msgstr "Bilder automatisch ver_kleinern"
#: ../src/prefs.c:511
msgid "Print _backgrounds"
msgstr "Hintergründe _drucken"
#: ../src/prefs.c:516
msgid "_Resizable textareas"
msgstr "_Vergrößerbare Textfelder"
#: ../src/prefs.c:521
msgid "Enable _scripts"
msgstr "_Skripte aktiveren"
#: ../src/prefs.c:526
msgid "Enable _plugins"
msgstr "_Zusatzmodule aktivieren"
#: ../src/prefs.c:531
msgid "_User Stylesheet"
msgstr "Be_nutzerstilvorlage"
#: ../src/prefs.c:537
msgid "Choose user stylesheet"
msgstr "Stilvorlage auswählen"
#. Page "Interface"
#: ../src/prefs.c:546
msgid "Interface"
msgstr "Oberfläche"
#: ../src/prefs.c:547
msgid "Navigationbar"
msgstr "Navigationsleiste"
#: ../src/prefs.c:549
msgid "_Toolbar style"
msgstr "Werkzeugleistenstil"
#: ../src/prefs.c:552
msgid "Default"
msgstr "Standard"
#: ../src/prefs.c:552
msgid "Icons"
msgstr "Symbole"
#: ../src/prefs.c:552
msgid "Text"
msgstr "Text"
#: ../src/prefs.c:552
msgid "Both"
msgstr "Beides"
#: ../src/prefs.c:552
msgid "Both horizontal"
msgstr "Beides horizontal"
#: ../src/prefs.c:557
msgid "Show small _icons"
msgstr "Zeige _kleine Symbole"
#: ../src/prefs.c:562
msgid "Show Web_search"
msgstr "Zeige Netz_suche"
#: ../src/prefs.c:567
msgid "Show _New Tab"
msgstr "Zeige _Neuer Reiter"
#: ../src/prefs.c:572
msgid "Show _Trash"
msgstr "Zeige _Papierkorb"
#: ../src/prefs.c:577
msgid "Miscellaneous"
msgstr "Verschiedenes"
#: ../src/prefs.c:579
msgid "Close _buttons on tabs"
msgstr "Schließen_knöpfe auf Reitern"
#: ../src/prefs.c:586
msgid "Tab Si_ze"
msgstr "Reiter_größe"
#: ../src/prefs.c:593
msgid "_Location search engine"
msgstr "Adressfeldsuchmaschine"
#. Page "Network"
#: ../src/prefs.c:601
msgid "Network"
msgstr "Netzwerk"
#: ../src/prefs.c:602
msgid "Proxy Server"
msgstr "Zwischenrechner"
#: ../src/prefs.c:604
msgid "_Custom proxy server"
msgstr "_Benutzerdefinierter Zwischenrechner"
#: ../src/prefs.c:608
msgid "_Host/ Port"
msgstr "_Leitrechner/ Anschluss"
#: ../src/prefs.c:617
msgid "Proxy requires authentication"
msgstr "Zwischenrechner erfordert Authentifizierung"
#: ../src/prefs.c:621
msgid "Username"
msgstr "Benutzername"
#: ../src/prefs.c:625
msgid "Password"
msgstr "Kennwort"
#: ../src/prefs.c:629
msgid "Cache"
msgstr "Zwischenspeicher"
#: ../src/prefs.c:631
msgid "Cache size"
msgstr "Zwischenspeichergröße"
#: ../src/prefs.c:637
msgid "MB"
msgstr "MB"
#: ../src/prefs.c:638
msgid "Clear cache"
msgstr "Leere Zwischenspeicher"
#. Page "Privacy"
#: ../src/prefs.c:644
msgid "Privacy"
msgstr "Privatsphäre"
#: ../src/prefs.c:645
msgid "Cookies"
msgstr "Kekse"
#: ../src/prefs.c:647
msgid "Accept cookies"
msgstr "Kekse annehmen"
#: ../src/prefs.c:650
msgid "All cookies"
msgstr "Alle Kekse"
#: ../src/prefs.c:650
msgid "Session cookies"
msgstr "Sitzungskekse"
#: ../src/prefs.c:650
msgid "None"
msgstr "Keine"
#: ../src/prefs.c:655
msgid "Allow cookies from the original website only"
msgstr "Nur Kekse von der ursprünglichen Internetseite annehmen"
#: ../src/prefs.c:658
msgid "Maximum cookie age"
msgstr "Maximales Keksalter"
#: ../src/prefs.c:664 ../src/prefs.c:679
msgid "days"
msgstr "Tage"
#: ../src/prefs.c:665
msgid "View cookies"
msgstr "Kekse anzeigen"
#: ../src/prefs.c:671
msgid "Remember my visited pages"
msgstr "Besuchte Seiten merken"
#: ../src/prefs.c:682
msgid "Remember my form inputs"
msgstr "Eingegebene Formulare merken"
#: ../src/prefs.c:686
msgid "Remember my downloaded files"
msgstr "Heruntergeladene Dateien merken"
#. Page "Programs"
#: ../src/prefs.c:691
msgid "Programs"
msgstr "Programme"
#: ../src/prefs.c:692
msgid "External programs"
msgstr "Externe Programme"
#: ../src/prefs.c:703
msgid "Protocol"
msgstr "Protokoll"
#: ../src/prefs.c:706
msgid "Command"
msgstr "Befehl"
#: ../src/sokoke.c:157
msgid "Warning: You are using a superuser account!"
msgstr "Warnung: Sie benutzen ein Administratorkonto!"
#: ../src/sokoke.c:267 ../katze/katze-xbel.c:952
#, c-format
msgid "Writing failed."
msgstr "Schreiben fehlgeschlagen."
#: ../src/webSearch.c:82
msgid "Empty"
msgstr "Leer"
#: ../src/webSearch.c:153
msgid "Add search engine"
msgstr "Suchmaschine hinzufügen"
#: ../src/webSearch.c:153
msgid "Edit search engine"
msgstr "Suchmaschine bearbeiten"
#: ../src/webSearch.c:183
msgid "_Name:"
msgstr "_Name:"
#: ../src/webSearch.c:227
msgid "_Icon (name or file):"
msgstr "_Symbol (Name oder Datei):"
#: ../src/webSearch.c:241
msgid "_Keyword:"
msgstr "_Schlüsselwort:"
#: ../src/webSearch.c:310
msgid "Manage search engines"
msgstr "Suchmaschinen verwalten"
#: ../katze/katze-throbber.c:135
msgid "Symbolic size to use for the animation"
msgstr "Größenkonstante für die Animation"
#: ../katze/katze-throbber.c:144
msgid "The name of an icon containing animation frames"
msgstr "Der Name eines Symbols, welches Animationsbilder enthält"
#: ../katze/katze-throbber.c:153
msgid "A GdkPixbuf containing animation frames"
msgstr "Ein GdkPixbuf, welcher Animationsbilder enthält"
#: ../katze/katze-throbber.c:162
msgid "Whether the throbber should be animated"
msgstr "Ob das Aktivitätssymbol animiert sein soll"
#: ../katze/katze-throbber.c:171
msgid "The name of an icon to be used as the static image"
msgstr "Der Name eines Symbols, das als statisches Bild verwendet werden soll"
#: ../katze/katze-throbber.c:180
msgid "A GdkPixbuf to be used as the static image"
msgstr "Ein GdkPixbuf, welcher als statisches Bild verwendet werden soll"
#: ../katze/katze-throbber.c:189
msgid "The stock ID of an icon to be used as the static image"
msgstr ""
"Die Inventarkennung eines Symbols, das als statisches Bild verwendet werden "
"soll"
#: ../katze/katze-xbel.c:723 ../katze/katze-xbel.c:731
#: ../katze/katze-xbel.c:767 ../katze/katze-xbel.c:775
#: ../katze/katze-xbel.c:804
#, c-format
msgid "Malformed document."
msgstr "Fehlerhaftes Dokument"
#: ../katze/katze-xbel.c:759
#, c-format
msgid "File not found."
msgstr "Datei nicht gefunden."
#~ msgid "Location Entry"
#~ msgstr "Adresseingabefeld"

View file

@ -4,10 +4,13 @@ INCLUDES = \
$(LIBSEXY_CFLAGS) \
-I../katze
AM_CFLAGS = -DMIDORI_LOCALEDIR=\""$(localedir)"\"
LDADD = \
$(GTK_LIBS) \
$(WEBKIT_LIBS) \
$(LIBSEXY_LIBS) \
$(INTLLIBS) \
../katze/libkatze.la
bin_PROGRAMS = \

View file

@ -50,7 +50,7 @@ gboolean config_from_file(CConfig* config, const gchar* filename, GError** error
GET_INT(config->toolbarNavigation, "ToolbarNavigation", TRUE);
GET_INT(config->toolbarBookmarks, "ToolbarBookmarks", FALSE);
GET_INT(config->toolbarStatus, "ToolbarStatus", TRUE);
//GET_INT(config->toolbarDownloads, "ToolbarDownloads", FALSE);
//GET_INT(config->toolbarTransfer, "ToolbarTransfer", FALSE);
GET_INT(config->toolbarStyle, "ToolbarStyle", CONFIG_TOOLBAR_DEFAULT);
GET_INT(config->toolbarSmall, "ToolbarSmall", FALSE);
GET_INT(config->toolbarWebSearch, "ToolbarWebSearch", TRUE);
@ -133,7 +133,7 @@ gboolean config_to_file(CConfig* config, const gchar* filename, GError** error)
g_key_file_set_string (keyFile, "browser", "LocationSearch", config->locationSearch);
g_key_file_set_integer(keyFile, "browser", "ToolbarNavigation", config->toolbarNavigation);
g_key_file_set_integer(keyFile, "browser", "ToolbarBookmarks", config->toolbarBookmarks);
//g_key_file_set_integer(keyFile, "browser", "ToolbarDownloads", config->toolbarDownloads);
//g_key_file_set_integer(keyFile, "browser", "ToolbarTransfers", config->toolbarTransfers);
g_key_file_set_integer(keyFile, "browser", "ToolbarStatus", config->toolbarStatus);
g_key_file_set_integer(keyFile, "browser", "ToolbarStyle", config->toolbarStyle);
g_key_file_set_integer(keyFile, "browser", "ToolbarSmall", config->toolbarSmall);

View file

@ -20,6 +20,8 @@
#include <gtk/gtk.h>
#include <webkit/webkit.h>
#include <glib/gi18n.h>
// FIXME: Remove these globals
GList* searchEngines; // Items of type 'SearchEngine'
@ -36,12 +38,7 @@ MidoriWebSettings* webSettings;
#define STOCK_BOOKMARK GTK_STOCK_FILE // "stock_bookmark" "bookmark-web"
#define STOCK_FORM_FILL GTK_STOCK_JUSTIFY_FILL // "insert-text" "form-fill"
#define STOCK_LOCATION GTK_STOCK_BOLD // "location-entry"
#define STOCK_NEWSFEED "gtk-index" // "newsfeed"
#define STOCK_PLUGINS GTK_STOCK_CONVERT // "plugin"
#define STOCK_POPUPS_BLOCKED "popup-hidden"
#define STOCK_TAB_CLOSE GTK_STOCK_CLOSE // "tab-close"
#define STOCK_WINDOW_CLOSE GTK_STOCK_CLOSE // "window-close"
#define STOCK_NEWSFEED GTK_STOCK_INDEX
// We assume that these legacy icon names are usually present

View file

@ -65,7 +65,7 @@ gboolean spawn_protocol_command(const gchar* protocol, const gchar* res)
if(!g_shell_parse_argv(commandReady, NULL, &argv, &error))
{
// FIXME: Should we have a more specific message?
show_error("Could not run external program.", error->message, NULL);
show_error(_("Could not run external program."), error->message, NULL);
g_error_free(error);
g_free(commandReady); g_free(uriEscaped);
return FALSE;
@ -81,7 +81,7 @@ gboolean spawn_protocol_command(const gchar* protocol, const gchar* res)
if(!success)
{
// FIXME: Should we have a more specific message?
show_error("Could not run external program.", error->message, NULL);
show_error(_("Could not run external program."), error->message, NULL);
g_error_free(error);
}
g_free(commandReady);

View file

@ -26,6 +26,13 @@
#include "config.h"
#ifdef ENABLE_NLS
# include <libintl.h>
# if HAVE_LOCALE_H
# include <locale.h>
# endif
#endif
// -- stock icons
static void stock_items_init(void)
@ -39,24 +46,18 @@ static void stock_items_init(void)
{ STOCK_THEME },
{ STOCK_USER_TRASH },
{ STOCK_BOOKMARK, "Bookmark", 0, 0, NULL },
{ STOCK_BOOKMARK_NEW, "New Bookmark", 0, 0, NULL },
{ STOCK_FORM_FILL, "_Form Fill", 0, 0, NULL },
{ STOCK_HOMEPAGE, "Homepage", 0, 0, NULL },
{ STOCK_LOCATION, "Location Entry", 0, 0, NULL },
{ STOCK_NEWSFEED, "Newsfeed", 0, 0, NULL },
{ STOCK_PLUGINS, "_Plugins", 0, 0, NULL },
{ STOCK_POPUPS_BLOCKED, "Blocked Popups", 0, 0, NULL },
{ STOCK_TAB_CLOSE, "C_lose Tab", 0, 0, NULL },
{ STOCK_TAB_NEW, "New _Tab", 0, 0, NULL },
{ STOCK_WINDOW_CLOSE, "_Close Window", 0, 0, NULL },
{ STOCK_WINDOW_NEW, "New _Window", 0, 0, NULL },
{ STOCK_BOOKMARK, N_("Bookmark"), 0, 0, NULL },
{ STOCK_BOOKMARK_NEW, N_("New Bookmark"), 0, 0, NULL },
{ STOCK_FORM_FILL, N_("_Form Fill"), 0, 0, NULL },
{ STOCK_HOMEPAGE, N_("Homepage"), 0, 0, NULL },
{ STOCK_TAB_NEW, N_("New _Tab"), 0, 0, NULL },
{ STOCK_WINDOW_NEW, N_("New _Window"), 0, 0, NULL },
#if !GTK_CHECK_VERSION(2, 10, 0)
{ GTK_STOCK_SELECT_ALL, "Select _All", 0, 0, (gchar*)"gtk20" },
{ GTK_STOCK_SELECT_ALL, N_("Select _All", 0, 0, NULL },
#endif
#if !GTK_CHECK_VERSION(2, 8, 0)
{ GTK_STOCK_FULLSCREEN, "_Fullscreen", 0, 0, (gchar*)"gtk20" },
{ GTK_STOCK_FULLSCREEN, "_Leave Fullscreen", 0, 0, (gchar*)"gtk20" },
{ GTK_STOCK_FULLSCREEN, N_("_Fullscreen"), 0, 0, NULL },
{ GTK_STOCK_FULLSCREEN, N_("_Leave Fullscreen"), 0, 0, NULL },
#endif
};
GtkIconFactory* factory = gtk_icon_factory_new();
@ -117,21 +118,36 @@ midori_browser_new_window_cb (MidoriBrowser* browser,
midori_browser_append_uri (new_browser, uri);
}
static void
locale_init (void)
{
#ifdef ENABLE_NLS
#if HAVE_LOCALE_H
setlocale (LC_ALL, "");
#endif
bindtextdomain (GETTEXT_PACKAGE, MIDORI_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#endif
}
int main(int argc, char** argv)
{
g_set_application_name(PACKAGE_NAME);
locale_init();
g_set_application_name(_("midori"));
// Parse cli options
gint repeats = 2;
gboolean version = FALSE;
GOptionEntry entries[] =
{
{ "repeats", 'r', 0, G_OPTION_ARG_INT, &repeats, "An unused value", "N" },
{ "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Display program version", NULL }
{ "version", 'v', 0, G_OPTION_ARG_NONE, &version, N_("Display program version"), NULL }
};
GError* error = NULL;
if(!gtk_init_with_args(&argc, &argv, "[URI]", entries, NULL/*GETTEXT_PACKAGE*/, &error))
if(!gtk_init_with_args(&argc, &argv, _("[URL]"), entries, GETTEXT_PACKAGE, &error))
{
g_error_free(error);
return 1;
@ -139,19 +155,26 @@ int main(int argc, char** argv)
if(version)
{
g_print(PACKAGE_STRING " - Copyright (c) 2007-2008 Christian Dywan\n\n"
"GTK+2: " GTK_VER "\n"
"WebKit: " WEBKIT_VER "\n"
"Libsexy: " LIBSEXY_VER "\n"
"libXML2: " LIBXML_VER "\n"
"GetText: N/A\n"
"\n"
"Debugging: " SOKOKE_DEBUG_ "\n"
"\n"
"Please report comments, suggestions and bugs to:\n"
"\t" PACKAGE_BUGREPORT "\n"
"Check for new versions at:\n"
"\thttp://software.twotoasts.de\n");
g_print(
"%s %s - Copyright (c) 2007-2008 Christian Dywan\n\n"
"GTK+2: \t\t%s\n"
"WebKit: \t\t%s\n"
"Libsexy:\t\t%s\n"
"libXML2:\t\t%s\n"
"\n"
"%s:\t\t%s\n"
"\n"
"%s\n"
"\t%s\n"
"%s\n"
"\thttp://software.twotoasts.de\n",
_("midori"), PACKAGE_VERSION,
GTK_VER, WEBKIT_VER, LIBSEXY_VER, LIBXML_VER,
_("Debugging"), SOKOKE_DEBUG_,
_("Please report comments, suggestions and bugs to:"),
PACKAGE_BUGREPORT,
_("Check for new versions at:")
);
return 0;
}
@ -167,7 +190,7 @@ int main(int argc, char** argv)
{
if(error->code != G_FILE_ERROR_NOENT)
g_string_append_printf(errorMessages
, "Configuration was not loaded. %s\n", error->message);
, _("The configuration couldn't be loaded. %s\n"), error->message);
g_error_free(error);
}
g_free(configFile);
@ -182,7 +205,7 @@ int main(int argc, char** argv)
// FIXME: We may have a "file empty" error, how do we recognize that?
/*if(error->code != G_FILE_ERROR_NOENT)
g_string_append_printf(errorMessages
, "Notice: No search engines loaded. %s\n", error->message);*/
, _("The search engines couldn't be loaded. %s\n"), error->message);*/
g_error_free(error);
}
g_free(configFile);
@ -193,7 +216,7 @@ int main(int argc, char** argv)
{
if(error->code != G_FILE_ERROR_NOENT)
g_string_append_printf(errorMessages
, "Bookmarks couldn't be loaded. %s\n", error->message);
, _("The bookmarks couldn't be loaded. %s\n"), error->message);
g_error_free(error);
}
g_free(configFile);
@ -206,7 +229,7 @@ int main(int argc, char** argv)
{
if(error->code != G_FILE_ERROR_NOENT)
g_string_append_printf(errorMessages
, "Session couldn't be loaded. %s\n", error->message);
, _("The session couldn't be loaded. %s\n"), error->message);
g_error_free(error);
}
g_free(configFile);
@ -218,7 +241,7 @@ int main(int argc, char** argv)
{
if(error->code != G_FILE_ERROR_NOENT)
g_string_append_printf(errorMessages
, "Tabtrash couldn't be loaded. %s\n", error->message);
, _("The trash couldn't be loaded. %s\n"), error->message);
g_error_free(error);
}
g_free(configFile);
@ -228,7 +251,7 @@ int main(int argc, char** argv)
{
GtkWidget* dialog = gtk_message_dialog_new(NULL
, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE
, "The following errors occured.");
, _("The following errors occured:"));
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE);
gtk_window_set_title(GTK_WINDOW(dialog), g_get_application_name());
// FIXME: Use custom program icon
@ -255,7 +278,7 @@ int main(int argc, char** argv)
}
g_string_free(errorMessages, TRUE);
// TODO: Handle any number of separate uris from argv
// TODO: Handle any number of separate uris from argv
// Open as many tabs as we have uris, seperated by pipes
gchar* uri = argc > 1 ? strtok(g_strdup(argv[1]), "|") : NULL;
while(uri != NULL)
@ -350,7 +373,7 @@ int main(int argc, char** argv)
error = NULL;
if(!search_engines_to_file(searchEngines, configFile, &error))
{
g_warning("Search engines couldn't be saved. %s", error->message);
g_warning("The search engines couldn't be saved. %s", error->message);
g_error_free(error);
}
search_engines_free(searchEngines);
@ -359,7 +382,7 @@ int main(int argc, char** argv)
error = NULL;
if(!katze_xbel_folder_to_file(bookmarks, configFile, &error))
{
g_warning("Bookmarks couldn't be saved. %s", error->message);
g_warning("The bookmarks couldn't be saved. %s", error->message);
g_error_free(error);
}
katze_xbel_item_unref(bookmarks);
@ -368,7 +391,7 @@ int main(int argc, char** argv)
error = NULL;
if (!katze_xbel_folder_to_file (xbel_trash, configFile, &error))
{
g_warning ("Tabtrash couldn't be saved. %s", error->message);
g_warning ("The trash couldn't be saved. %s", error->message);
g_error_free (error);
}
katze_xbel_item_unref (xbel_trash);
@ -379,7 +402,7 @@ int main(int argc, char** argv)
error = NULL;
if(!katze_xbel_folder_to_file(session, configFile, &error))
{
g_warning("Session couldn't be saved. %s", error->message);
g_warning("The session couldn't be saved. %s", error->message);
g_error_free(error);
}
g_free(configFile);
@ -389,7 +412,7 @@ int main(int argc, char** argv)
error = NULL;
if(!config_to_file(config, configFile, &error))
{
g_warning("Configuration couldn't be saved. %s", error->message);
g_warning("The configuration couldn't be saved. %s", error->message);
g_error_free(error);
}
config_free(config);

View file

@ -182,7 +182,7 @@ _midori_browser_update_interface (MidoriBrowser* browser)
gtk_widget_set_sensitive (priv->throbber, FALSE);
g_object_set (action,
"stock-id", GTK_STOCK_REFRESH,
"tooltip", "Reload the current page", NULL);
"tooltip", _("Reload the current page"), NULL);
gtk_widget_hide (priv->progressbar);
}
else
@ -190,7 +190,7 @@ _midori_browser_update_interface (MidoriBrowser* browser)
gtk_widget_set_sensitive (priv->throbber, TRUE);
g_object_set (action,
"stock-id", GTK_STOCK_STOP,
"tooltip", "Stop loading the current page", NULL);
"tooltip", _("Stop loading the current page"), NULL);
gtk_widget_show (priv->progressbar);
}
katze_throbber_set_animated (KATZE_THROBBER (priv->throbber), loading);
@ -255,7 +255,7 @@ _midori_browser_update_progress (MidoriBrowser* browser,
{
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->progressbar),
progress ? progress / 100.0 : 0);
gchar* message = g_strdup_printf ("%d%% loaded", progress);
gchar* message = g_strdup_printf (_("%d%% loaded"), progress);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (priv->progressbar),
message);
g_free (message);
@ -518,7 +518,7 @@ midori_browser_class_init (MidoriBrowserClass* class)
g_param_spec_object (
"settings",
"Settings",
"The associated settings",
_("The associated settings"),
MIDORI_TYPE_WEB_SETTINGS,
G_PARAM_READWRITE));
@ -538,7 +538,7 @@ midori_browser_class_init (MidoriBrowserClass* class)
g_param_spec_string (
"statusbar-text",
"Statusbar Text",
"The text that is displayed in the statusbar",
_("The text that is displayed in the statusbar"),
"",
flags));
@ -557,7 +557,7 @@ midori_browser_class_init (MidoriBrowserClass* class)
g_param_spec_object (
"trash",
"Trash",
"The trash, collecting recently closed tabs and windows",
_("The trash, collecting recently closed tabs and windows"),
MIDORI_TYPE_TRASH,
G_PARAM_READWRITE));
@ -583,7 +583,7 @@ _action_open_activate (GtkAction* action,
MidoriBrowser* browser)
{
GtkWidget* dialog = gtk_file_chooser_dialog_new (
"Open file", GTK_WINDOW (browser),
("Open file"), GTK_WINDOW (browser),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
@ -1048,7 +1048,7 @@ _action_location_activate (GtkAction* action,
{
// TODO: We should offer all of the location's features here
GtkWidget* dialog;
dialog = gtk_dialog_new_with_buttons ("Open location"
dialog = gtk_dialog_new_with_buttons (_("Open location")
, GTK_WINDOW (browser)
, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR
, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL
@ -1060,7 +1060,7 @@ _action_location_activate (GtkAction* action,
GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 5);
GtkWidget* hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
GtkWidget* label = gtk_label_new_with_mnemonic ("_Location:");
GtkWidget* label = gtk_label_new_with_mnemonic (_("_Location:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
GtkWidget* entry = gtk_entry_new ();
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
@ -1094,7 +1094,7 @@ _action_search_activate (GtkAction* action,
else
{
// TODO: We should offer all of the search's features here
GtkWidget* dialog = gtk_dialog_new_with_buttons ("Web search"
GtkWidget* dialog = gtk_dialog_new_with_buttons (_("Web search")
, GTK_WINDOW (browser)
, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR
, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL
@ -1106,7 +1106,7 @@ _action_search_activate (GtkAction* action,
GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 5);
GtkWidget* hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
GtkWidget* label = gtk_label_new_with_mnemonic ("_Location:");
GtkWidget* label = gtk_label_new_with_mnemonic (_("_Location:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
GtkWidget* entry = gtk_entry_new ();
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
@ -1133,7 +1133,7 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
gboolean new_bookmark = !bookmark;
GtkWidget* dialog = gtk_dialog_new_with_buttons (
new_bookmark ? "New bookmark" : "Edit bookmark",
new_bookmark ? _("New bookmark") : _("Edit bookmark"),
GTK_WINDOW (browser),
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@ -1150,7 +1150,7 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
GtkWidget* hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
GtkWidget* label = gtk_label_new_with_mnemonic ("_Title:");
GtkWidget* label = gtk_label_new_with_mnemonic (_("_Title:"));
gtk_size_group_add_widget (sizegroup, label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
GtkWidget* entry_title = gtk_entry_new ();
@ -1166,7 +1166,7 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
label = gtk_label_new_with_mnemonic ("_Description:");
label = gtk_label_new_with_mnemonic (_("_Description:"));
gtk_size_group_add_widget (sizegroup, label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
GtkWidget* entry_desc = gtk_entry_new ();
@ -1185,7 +1185,7 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
{
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
label = gtk_label_new_with_mnemonic ("_Uri:");
label = gtk_label_new_with_mnemonic (_("_URL:"));
gtk_size_group_add_widget (sizegroup, label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
entry_uri = gtk_entry_new ();
@ -1203,11 +1203,11 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
{
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
label = gtk_label_new_with_mnemonic ("_Folder:");
label = gtk_label_new_with_mnemonic (_("_Folder:"));
gtk_size_group_add_widget (sizegroup, label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
combo_folder = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_folder), "Root");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_folder), _("Root"));
gtk_widget_set_sensitive (combo_folder, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), combo_folder, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
@ -1426,7 +1426,7 @@ midori_browser_bookmarks_item_render_text_cb (GtkTreeViewColumn* column,
}
if (katze_xbel_item_is_separator (item))
g_object_set (renderer, "markup", "<i>Separator</i>", NULL);
g_object_set (renderer, "markup", _("<i>Separator</i>"), NULL);
else
g_object_set (renderer, "markup", NULL,
"text", katze_xbel_item_get_title(item), NULL);
@ -1612,7 +1612,7 @@ _action_about_activate (GtkAction* action,
"logo-icon-name", gtk_window_get_icon_name (GTK_WINDOW (browser)),
"name", PACKAGE_NAME,
"version", PACKAGE_VERSION,
"comments", "A lightweight web browser.",
"comments", _("A lightweight web browser."),
"copyright", "Copyright © 2007-2008 Christian Dywan",
"website", "http://software.twotoasts.de",
"authors", credits_authors,
@ -1620,7 +1620,7 @@ _action_about_activate (GtkAction* action,
"artists", credits_artists,
"license", license,
"wrap-license", TRUE,
// "translator-credits", _("translator-credits"),
"translator-credits", _("translator-credits"),
NULL);
}
@ -1835,27 +1835,27 @@ _action_bookmark_delete_activate (GtkAction* action,
// FIXME: Fill in a good description for each 'hm?'
static const GtkActionEntry entries[] = {
{ "File", NULL, "_File" },
{ "File", NULL, N_("_File") },
{ "WindowNew", STOCK_WINDOW_NEW,
NULL, "<Ctrl>n",
"Open a new window", G_CALLBACK (_action_window_new_activate) },
N_("Open a new window"), G_CALLBACK (_action_window_new_activate) },
{ "TabNew", STOCK_TAB_NEW,
NULL, "<Ctrl>t",
"Open a new tab", G_CALLBACK (_action_tab_new_activate) },
N_("Open a new tab"), G_CALLBACK (_action_tab_new_activate) },
{ "Open", GTK_STOCK_OPEN,
NULL, "<Ctrl>o",
"Open a file", G_CALLBACK (_action_open_activate) },
N_("Open a file"), G_CALLBACK (_action_open_activate) },
{ "SaveAs", GTK_STOCK_SAVE_AS,
NULL, "<Ctrl>s",
"Save to a file", NULL/*G_CALLBACK (_action_saveas_activate)*/ },
{ "TabClose", STOCK_TAB_CLOSE,
NULL, "<Ctrl>w",
"Close the current tab", G_CALLBACK (_action_tab_close_activate) },
{ "WindowClose", STOCK_WINDOW_CLOSE,
NULL, "<Ctrl><Shift>w",
"Close this window", G_CALLBACK (_action_window_close_activate) },
N_("Save to a file"), NULL/*G_CALLBACK (_action_saveas_activate)*/ },
{ "TabClose", NULL,
N_("_Close Tab"), "<Ctrl>w",
N_("Close the current tab"), G_CALLBACK (_action_tab_close_activate) },
{ "WindowClose", NULL,
N_("C_lose Window"), "<Ctrl><Shift>w",
N_("Close this window"), G_CALLBACK (_action_window_close_activate) },
{ "PageSetup", GTK_STOCK_PROPERTIES,
"Pa_ge Setup", "",
N_("Pa_ge Setup"), "",
"hm?", NULL/*G_CALLBACK (_action_page_setup_activate)*/ },
{ "PrintPreview", GTK_STOCK_PRINT_PREVIEW,
NULL, "",
@ -1865,33 +1865,33 @@ static const GtkActionEntry entries[] = {
"hm?", NULL/*G_CALLBACK (_action_print_activate)*/ },
{ "Quit", GTK_STOCK_QUIT,
NULL, "<Ctrl>q",
"Quit the application", G_CALLBACK (_action_quit_activate) },
N_("Quit the application"), G_CALLBACK (_action_quit_activate) },
{ "Edit", NULL, "_Edit", NULL, NULL, G_CALLBACK (_action_edit_activate) },
{ "Edit", NULL, N_("_Edit"), NULL, NULL, G_CALLBACK (_action_edit_activate) },
{ "Undo", GTK_STOCK_UNDO,
NULL, "<Ctrl>z",
"Undo the last modification", NULL/*G_CALLBACK (_action_undo_activate)*/ },
N_("Undo the last modification"), NULL/*G_CALLBACK (_action_undo_activate)*/ },
{ "Redo", GTK_STOCK_REDO,
NULL, "<Ctrl><Shift>z",
"Redo the last modification", NULL/*G_CALLBACK (_action_redo_activate)*/ },
N_("Redo the last modification"), NULL/*G_CALLBACK (_action_redo_activate)*/ },
{ "Cut", GTK_STOCK_CUT,
NULL, "<Ctrl>x",
"Cut the selected text", G_CALLBACK (_action_cut_activate) },
{ "Copy", GTK_STOCK_COPY,
NULL, "<Ctrl>c",
"Copy the selected text", G_CALLBACK (_action_copy_activate) },
N_("Copy the selected text"), G_CALLBACK (_action_copy_activate) },
{ "Copy_", GTK_STOCK_COPY,
NULL, "<Ctrl>c",
"Copy the selected text", G_CALLBACK (_action_copy_activate) },
N_("Copy the selected text"), G_CALLBACK (_action_copy_activate) },
{ "Paste", GTK_STOCK_PASTE,
NULL, "<Ctrl>v",
"Paste text from the clipboard", G_CALLBACK (_action_paste_activate) },
N_("Paste text from the clipboard"), G_CALLBACK (_action_paste_activate) },
{ "Delete", GTK_STOCK_DELETE,
NULL, NULL,
"Delete the selected text", G_CALLBACK (_action_delete_activate) },
N_("Delete the selected text"), G_CALLBACK (_action_delete_activate) },
{ "SelectAll", GTK_STOCK_SELECT_ALL,
NULL, "<Ctrl>a",
"Selected all text", G_CALLBACK (_action_select_all_activate) },
N_("Select all text"), G_CALLBACK (_action_select_all_activate) },
{ "FormFill", STOCK_FORM_FILL,
NULL, "",
"hm?", NULL/*G_CALLBACK (_action_form_fill_activate)*/ },
@ -1899,29 +1899,29 @@ static const GtkActionEntry entries[] = {
NULL, "<Ctrl>f",
"hm?", G_CALLBACK (_action_find_activate) },
{ "FindNext", GTK_STOCK_GO_FORWARD,
"Find _Next", "<Ctrl>g",
N_("Find _Next"), "<Ctrl>g",
"hm?", G_CALLBACK (_action_find_next_activate) },
{ "FindPrevious", GTK_STOCK_GO_BACK,
"Find _Previous", "<Ctrl><Shift>g",
N_("Find _Previous"), "<Ctrl><Shift>g",
"hm?", G_CALLBACK (_action_find_previous_activate) },
{ "FindQuick", GTK_STOCK_FIND,
"_Quick Find", "period",
N_("_Quick Find"), "period",
"hm?", NULL/*G_CALLBACK (_action_find_quick_activate)*/ },
{ "Preferences", GTK_STOCK_PREFERENCES,
NULL, "<Ctrl><Alt>p",
"hm?", G_CALLBACK (_action_preferences_activate) },
{ "View", NULL, "_View" },
{ "Toolbars", NULL, "_Toolbars" },
{ "View", NULL, N_("_View") },
{ "Toolbars", NULL, N_("_Toolbars") },
{ "Reload", GTK_STOCK_REFRESH,
NULL, "<Ctrl>r",
"Reload the current page", G_CALLBACK (_action_reload_stop_activate) },
N_("Reload the current page"), G_CALLBACK (_action_reload_stop_activate) },
{ "Stop", GTK_STOCK_REFRESH,
NULL, "<Ctrl>r",
"Stop loading the current page", G_CALLBACK (_action_reload_stop_activate) },
N_("Stop loading the current page"), G_CALLBACK (_action_reload_stop_activate) },
{ "ReloadStop", GTK_STOCK_STOP,
NULL, "<Ctrl>r",
"Reload the current page", G_CALLBACK (_action_reload_stop_activate) },
N_("Reload the current page"), G_CALLBACK (_action_reload_stop_activate) },
{ "ZoomIn", GTK_STOCK_ZOOM_IN,
NULL, "<Ctrl>plus",
"hm?", NULL/*G_CALLBACK (_action_zoom_in_activate)*/ },
@ -1932,16 +1932,16 @@ static const GtkActionEntry entries[] = {
NULL, "<Ctrl>0",
"hm?", NULL/*G_CALLBACK (_action_zoom_normal_activate)*/ },
{ "SourceView", NULL,
"View Source", "",
"hm?", /*G_CALLBACK (_action_source_view_activate)*/ },
N_("View Source"), "",
"hm?", /*G_CALLBACK (_action_source_view_activate)*/ },
{ "SelectionSourceView", NULL,
"View Selection Source", "",
"hm?", NULL/*G_CALLBACK (_action_selection_source_view_activate)*/ },
N_("View Selection Source"), "",
"hm?", NULL/*G_CALLBACK (_action_selection_source_view_activate)*/ },
{ "Fullscreen", GTK_STOCK_FULLSCREEN,
NULL, "F11",
"Toggle fullscreen view", G_CALLBACK (_action_fullscreen_activate) },
N_("Toggle fullscreen view"), G_CALLBACK (_action_fullscreen_activate) },
{ "Go", NULL, "_Go" },
{ "Go", NULL, N_("_Go") },
{ "Back", GTK_STOCK_GO_BACK,
NULL, "<Alt>Left",
"hm?", G_CALLBACK (_action_back_activate) },
@ -1952,39 +1952,39 @@ static const GtkActionEntry entries[] = {
NULL, "<Alt>Home",
"hm?", G_CALLBACK (_action_home_activate) },
{ "Location", GTK_STOCK_JUMP_TO,
"Location...", "<Ctrl>l",
N_("Location..."), "<Ctrl>l",
"hm?", G_CALLBACK (_action_location_activate) },
{ "Search", GTK_STOCK_FIND,
"Web Search...", "<Ctrl><Shift>f",
N_("Web Search..."), "<Ctrl><Shift>f",
"hm?", G_CALLBACK (_action_search_activate) },
{ "OpenInPageholder", GTK_STOCK_JUMP_TO,
"Open in Page_holder...", "",
N_("Open in Page_holder..."), "",
"hm?", G_CALLBACK (_action_open_in_panel_activate) },
{ "Trash", STOCK_USER_TRASH,
"Closed Tabs and Windows", "",
"Reopen a previously closed tab or window", NULL },
N_("Closed Tabs and Windows"), "",
N_("Reopen a previously closed tab or window"), NULL },
{ "TrashEmpty", GTK_STOCK_CLEAR,
"Empty Trash", "",
N_("Empty Trash"), "",
"hm?", G_CALLBACK (_action_trash_empty_activate) },
{ "UndoTabClose", GTK_STOCK_UNDELETE,
"Undo Close Tab", "",
N_("Undo Close Tab"), "",
"hm?", G_CALLBACK (_action_undo_tab_close_activate) },
{ "Bookmarks", NULL, "_Bookmarks" },
{ "Bookmarks", NULL, N_("_Bookmarks") },
{ "BookmarkNew", STOCK_BOOKMARK_NEW,
NULL, "<Ctrl>d",
"hm?", G_CALLBACK (_action_bookmark_new_activate) },
{ "BookmarksManage", NULL,
"_Manage Bookmarks", "<Ctrl>b",
N_("_Manage Bookmarks"), "<Ctrl>b",
"hm?", NULL/*G_CALLBACK (_action_bookmarks_manage_activate)*/ },
{ "BookmarkOpen", GTK_STOCK_OPEN,
NULL, "",
"hm?", G_CALLBACK (_action_bookmark_open_activate) },
{ "BookmarkOpenTab", STOCK_TAB_NEW,
"Open in New _Tab", "",
N_("Open in New _Tab"), "",
"hm?", G_CALLBACK (_action_bookmark_open_tab_activate) },
{ "BookmarkOpenWindow", STOCK_WINDOW_NEW,
"Open in New _Window", "",
N_("Open in New _Window"), "",
"hm?", G_CALLBACK (_action_bookmark_open_window_activate) },
{ "BookmarkEdit", GTK_STOCK_EDIT,
NULL, "",
@ -1993,26 +1993,26 @@ static const GtkActionEntry entries[] = {
NULL, "",
"hm?", G_CALLBACK (_action_bookmark_delete_activate) },
{ "Tools", NULL, "_Tools" },
{ "Tools", NULL, N_("_Tools") },
{ "ManageSearchEngines", GTK_STOCK_PROPERTIES,
"_Manage Search Engines", "<Ctrl><Alt>s",
"Add, edit and remove search engines...",
N_("_Manage Search Engines"), "<Ctrl><Alt>s",
N_("Add, edit and remove search engines..."),
G_CALLBACK (_action_manage_search_engines_activate) },
{ "Window", NULL, "_Window" },
{ "Window", NULL, N_("_Window") },
{ "TabPrevious", GTK_STOCK_GO_BACK,
"_Previous Tab", "<Ctrl>Page_Up",
N_("_Previous Tab"), "<Ctrl>Page_Up",
"hm?", G_CALLBACK (_action_tab_previous_activate) },
{ "TabNext", GTK_STOCK_GO_FORWARD,
"_Next Tab", "<Ctrl>Page_Down",
N_("_Next Tab"), "<Ctrl>Page_Down",
"hm?", G_CALLBACK (_action_tab_next_activate) },
{ "TabOverview", NULL,
"Tab _Overview", "",
N_("Tab _Overview"), "",
"hm?", NULL/*G_CALLBACK (_action_tab_overview_activate)*/ },
{ "Help", NULL, "_Help" },
{ "Help", NULL, N_("_Help") },
{ "HelpContents", GTK_STOCK_HELP,
"_Contents", "F1",
N_("_Contents"), "F1",
"hm?", NULL/*G_CALLBACK (_action_help_contents_activate)*/ },
{ "About", GTK_STOCK_ABOUT,
NULL, "",
@ -2022,32 +2022,32 @@ static const GtkActionEntry entries[] = {
static const GtkToggleActionEntry toggle_entries[] = {
{ "PrivateBrowsing", NULL,
"P_rivate Browsing", "",
N_("P_rivate Browsing"), "",
"hm?", NULL/*G_CALLBACK (_action_private_browsing_activate)*/,
FALSE },
{ "WorkOffline", GTK_STOCK_DISCONNECT,
"_Work Offline", "",
N_("_Work Offline"), "",
"hm?", NULL/*G_CALLBACK (_action_work_offline_activate)*/,
FALSE },
{ "Navigationbar", NULL,
"_Navigationbar", "",
N_("_Navigationbar"), "",
"hm?", G_CALLBACK (_action_navigationbar_activate),
FALSE },
{ "Panel", NULL,
"_Panel", "F9",
N_("Side_panel"), "F9",
"hm?", G_CALLBACK (_action_panel_activate),
FALSE },
{ "Bookmarkbar", NULL,
"_Bookmarkbar", "",
N_("_Bookmarkbar"), "",
"hm?", G_CALLBACK (_action_bookmarkbar_activate),
FALSE },
{ "Downloadbar", NULL,
"_Downloadbar", "",
"hm?", NULL/*G_CALLBACK (_action_downloadbar_activate)*/,
{ "Transferbar", NULL,
N_("_Transferbar"), "",
"hm?", NULL/*G_CALLBACK (_action_transferbar_activate)*/,
FALSE },
{ "Statusbar", NULL,
"_Statusbar", "",
N_("_Statusbar"), "",
"hm?", G_CALLBACK (_action_statusbar_activate),
FALSE },
};
@ -2135,7 +2135,7 @@ static const gchar* ui_markup =
"<menu action='Toolbars'>"
"<menuitem action='Navigationbar'/>"
"<menuitem action='Bookmarkbar'/>"
"<menuitem action='Downloadbar'/>"
"<menuitem action='Transferbar'/>"
"<menuitem action='Statusbar'/>"
"</menu>"
"<menuitem action='Panel'/>"
@ -2255,6 +2255,7 @@ midori_browser_init (MidoriBrowser* browser)
// Let us see some ui manager magic
priv->action_group = gtk_action_group_new ("Browser");
gtk_action_group_set_translation_domain (priv->action_group, GETTEXT_PACKAGE);
gtk_action_group_add_actions (priv->action_group,
entries, entries_n, browser);
gtk_action_group_add_toggle_actions (priv->action_group,
@ -2290,7 +2291,7 @@ midori_browser_init (MidoriBrowser* browser)
gtk_action_set_sensitive (action, toggle_entries[i].callback != NULL);
}
//_action_set_active(browser, "Downloadbar", config->toolbarDownloads);
//_action_set_active(browser, "Transferbar", config->toolbarTransfers);
// Create the menubar
priv->menubar = gtk_ui_manager_get_widget (ui_manager, "/menubar");
@ -2516,17 +2517,17 @@ midori_browser_init (MidoriBrowser* browser)
priv->panel_bookmarks = treeview;
gtk_widget_show_all (box);
midori_panel_append_page (MIDORI_PANEL (priv->panel),
box, "vcard", "Bookmarks");
box, "vcard", _("Bookmarks"));
action = _action_by_name (browser, "PanelBookmarks");
// Downloads
// Transfers
priv->panel_pageholder = g_object_new (MIDORI_TYPE_WEB_VIEW,
"uri", "about:blank",
NULL);
gtk_widget_show (priv->panel_pageholder);
midori_panel_append_page (MIDORI_PANEL (priv->panel),
priv->panel_pageholder,
"package", "Downloads");
"package", _("Transfers"));
// Console
priv->panel_pageholder = g_object_new (MIDORI_TYPE_WEB_VIEW,
@ -2535,7 +2536,7 @@ midori_browser_init (MidoriBrowser* browser)
gtk_widget_show (priv->panel_pageholder);
midori_panel_append_page (MIDORI_PANEL (priv->panel),
priv->panel_pageholder,
"terminal", "Console");
"terminal", _("Console"));
// History
priv->panel_pageholder = g_object_new (MIDORI_TYPE_WEB_VIEW,
@ -2544,7 +2545,7 @@ midori_browser_init (MidoriBrowser* browser)
gtk_widget_show (priv->panel_pageholder);
midori_panel_append_page (MIDORI_PANEL (priv->panel),
priv->panel_pageholder,
"document-open-recent", "History");
"document-open-recent", _("History"));
// Pageholder
priv->panel_pageholder = g_object_new (MIDORI_TYPE_WEB_VIEW,
@ -2553,7 +2554,7 @@ midori_browser_init (MidoriBrowser* browser)
gtk_widget_show (priv->panel_pageholder);
midori_panel_append_page (MIDORI_PANEL (priv->panel),
priv->panel_pageholder,
GTK_STOCK_CONVERT, "Pageholder");
GTK_STOCK_CONVERT, _("Pageholder"));
midori_panel_set_current_page (MIDORI_PANEL (priv->panel),
config->panelActive);
@ -2575,7 +2576,7 @@ midori_browser_init (MidoriBrowser* browser)
toolitem = gtk_tool_item_new ();
gtk_container_set_border_width (GTK_CONTAINER (toolitem), 6);
gtk_container_add (GTK_CONTAINER (toolitem),
gtk_label_new_with_mnemonic ("_Inline find:"));
gtk_label_new_with_mnemonic (_("_Inline find:")));
gtk_toolbar_insert (GTK_TOOLBAR (priv->find), toolitem, -1);
priv->find_text = sexy_icon_entry_new ();
GtkWidget* icon = gtk_image_new_from_stock (GTK_STOCK_FIND,
@ -2601,7 +2602,7 @@ midori_browser_init (MidoriBrowser* browser)
gtk_toolbar_insert (GTK_TOOLBAR (priv->find), toolitem, -1);
priv->find_case = gtk_toggle_tool_button_new_from_stock (
GTK_STOCK_SPELL_CHECK);
gtk_tool_button_set_label (GTK_TOOL_BUTTON (priv->find_case), "Match Case");
gtk_tool_button_set_label (GTK_TOOL_BUTTON (priv->find_case), _("Match Case"));
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (priv->find_case), TRUE);
gtk_toolbar_insert (GTK_TOOLBAR (priv->find), priv->find_case, -1);
priv->find_highlight = gtk_toggle_tool_button_new_from_stock (
@ -2618,7 +2619,7 @@ midori_browser_init (MidoriBrowser* browser)
gtk_tool_item_set_expand (GTK_TOOL_ITEM (toolitem), TRUE);
gtk_toolbar_insert (GTK_TOOLBAR (priv->find), toolitem, -1);
toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_CLOSE);
gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), "Close Findbar");
gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("Close Findbar"));
g_signal_connect (toolitem, "clicked",
G_CALLBACK (midori_browser_find_button_close_clicked_cb), browser);
gtk_toolbar_insert (GTK_TOOLBAR (priv->find), toolitem, -1);

View file

@ -12,6 +12,7 @@
#include "midori-panel.h"
#include "sokoke.h"
#include <glib/gi18n.h>
G_DEFINE_TYPE (MidoriPanel, midori_panel, GTK_TYPE_HBOX)
@ -136,7 +137,7 @@ midori_panel_class_init (MidoriPanelClass* class)
g_param_spec_enum (
"shadow-type",
"Shadow Type",
"Appearance of the shadow around each panel",
_("Appearance of the shadow around each panel"),
GTK_TYPE_SHADOW_TYPE,
GTK_SHADOW_NONE,
flags));
@ -146,7 +147,7 @@ midori_panel_class_init (MidoriPanelClass* class)
g_param_spec_object (
"menu",
"Menu",
"Menu to hold panel items",
_("Menu to hold panel items"),
GTK_TYPE_MENU,
G_PARAM_READWRITE));
@ -155,7 +156,7 @@ midori_panel_class_init (MidoriPanelClass* class)
g_param_spec_int (
"page",
"Page",
"The index of the current page",
_("The index of the current page"),
-1, G_MAXINT, -1,
flags));
@ -199,8 +200,8 @@ midori_panel_init (MidoriPanel* panel)
gtk_container_set_border_width (GTK_CONTAINER (toolitem), 6);
gtk_toolbar_insert (GTK_TOOLBAR (labelbar), toolitem, -1);
toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_CLOSE);
gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), "Close panel");
sokoke_tool_item_set_tooltip_text (GTK_TOOL_ITEM (toolitem), "Close panel");
gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("Close panel"));
sokoke_tool_item_set_tooltip_text (GTK_TOOL_ITEM (toolitem), _("Close panel"));
g_signal_connect (toolitem, "clicked",
G_CALLBACK (midori_panel_button_close_clicked_cb), panel);
gtk_toolbar_insert (GTK_TOOLBAR (labelbar), toolitem, -1);
@ -364,7 +365,7 @@ midori_panel_append_page (MidoriPanel* panel,
guint n = midori_panel_page_num (panel, child);
const gchar* text = label ? label : "Untitled";
const gchar* text = label ? label : _("Untitled");
GtkWidget* image;
GtkToolItem* toolitem = gtk_radio_tool_button_new (priv->group);

View file

@ -12,6 +12,7 @@
#include "midori-trash.h"
#include "sokoke.h"
#include <glib/gi18n.h>
G_DEFINE_TYPE (MidoriTrash, midori_trash, G_TYPE_OBJECT)
@ -93,7 +94,7 @@ midori_trash_class_init (MidoriTrashClass* class)
g_param_spec_uint (
"limit",
"Limit",
"The maximum number of items",
_("The maximum number of items"),
0, G_MAXUINT, 10,
flags));

View file

@ -12,6 +12,7 @@
#include "midori-webview.h"
#include "sokoke.h"
#include <glib/gi18n.h>
G_DEFINE_TYPE (MidoriWebSettings, midori_web_settings, WEBKIT_TYPE_WEB_SETTINGS)
@ -65,7 +66,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
g_param_spec_int (
"tab-label-size",
"Tab Label Size",
"The desired tab label size",
_("The desired tab label size"),
0, G_MAXINT, 10,
flags));
@ -74,7 +75,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
g_param_spec_boolean (
"close-button",
"Close Button",
"Whether the associated tab has a close button",
_("Whether tabs have close buttons"),
FALSE,
flags));
@ -83,7 +84,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
g_param_spec_boolean (
"middle-click-goto",
"Middle Click Goto",
"Load an uri from the selection via middle click",
_("Load an URL from the selection via middle click"),
FALSE,
flags));

View file

@ -214,7 +214,7 @@ midori_web_view_class_init (MidoriWebViewClass* class)
g_param_spec_object (
"icon",
"Icon",
"The icon of the loaded page",
_("The icon of the currently loaded page"),
GDK_TYPE_PIXBUF,
G_PARAM_READWRITE));
@ -223,7 +223,7 @@ midori_web_view_class_init (MidoriWebViewClass* class)
g_param_spec_string (
"uri",
"Uri",
"The current uri of the loaded page",
_("The URI of the currently loaded page"),
"about:blank",
flags));
@ -232,7 +232,7 @@ midori_web_view_class_init (MidoriWebViewClass* class)
g_param_spec_string (
"title",
"Title",
"The current title of the loaded page",
_("The title of the currently loaded page"),
NULL,
flags));
@ -241,7 +241,7 @@ midori_web_view_class_init (MidoriWebViewClass* class)
g_param_spec_string (
"statusbar-text",
"Statusbar Text",
"The text that is displayed in the statusbar",
_("The text that is displayed in the statusbar"),
"",
flags));
@ -250,7 +250,7 @@ midori_web_view_class_init (MidoriWebViewClass* class)
g_param_spec_object (
"settings",
"Settings",
"The associated settings",
_("The associated settings"),
MIDORI_TYPE_WEB_SETTINGS,
G_PARAM_READWRITE));
@ -469,7 +469,7 @@ webkit_web_view_populate_popup_cb (GtkWidget* web_view,
if (uri)
{
GtkWidget* menuitem = gtk_image_menu_item_new_with_mnemonic (
"Open Link in New _Tab");
_("Open Link in New _Tab"));
GdkScreen* screen = gtk_widget_get_screen (web_view);
GtkIconTheme* icon_theme = gtk_icon_theme_get_for_screen (screen);
if (gtk_icon_theme_has_icon (icon_theme, STOCK_TAB_NEW))
@ -492,7 +492,7 @@ webkit_web_view_populate_popup_cb (GtkWidget* web_view,
if (text && strchr (text, '.') && !strchr (text, ' '))
{
GtkWidget* menuitem = gtk_image_menu_item_new_with_mnemonic (
"Open URL in New _Tab");
_("Open URL in New _Tab"));
GtkWidget* icon = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO,
GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), icon);

View file

@ -296,7 +296,7 @@ static void on_prefs_protocols_combobox_changed(GtkWidget* widget, CPrefs* prefs
GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
{
gchar* dialogTitle = g_strdup_printf("%s Preferences", g_get_application_name());
gchar* dialogTitle = g_strdup_printf(_("%s Preferences"), g_get_application_name());
GtkWidget* dialog = gtk_dialog_new_with_buttons(dialogTitle
, GTK_WINDOW(browser)
, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR
@ -360,41 +360,41 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
gtk_container_add(GTK_CONTAINER(align), __widget);\
FILLED_ADD(align, __left, __right, __top, __bottom)
// Page "General"
PAGE_NEW("General");
FRAME_NEW("Startup");
PAGE_NEW(_("General"));
FRAME_NEW(_("Startup"));
TABLE_NEW(2, 2);
INDENTED_ADD(gtk_label_new("Load on startup"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new(_("Load on startup")), 0, 1, 0, 1);
combobox = gtk_combo_box_new_text();
sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
, "Blank page", "Homepage", "Last open pages", NULL);
, _("Blank page"), _("Homepage"), _("Last open pages"), NULL);
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), config->startup);
g_signal_connect(combobox, "changed"
, G_CALLBACK(on_prefs_loadonstartup_changed), prefs);
FILLED_ADD(combobox, 1, 2, 0, 1);
INDENTED_ADD(gtk_label_new("Homepage"), 0, 1, 1, 2);
INDENTED_ADD(gtk_label_new(_("Homepage")), 0, 1, 1, 2);
entry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(entry), config->homepage);
g_signal_connect(entry, "focus-out-event"
, G_CALLBACK(on_prefs_homepage_focus_out), prefs);
FILLED_ADD(entry, 1, 2, 1, 2);
// TODO: We need something like "use current website"
FRAME_NEW("Downloads");
FRAME_NEW(_("Transfers"));
TABLE_NEW(1, 2);
INDENTED_ADD(gtk_label_new("Download folder"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new(_("Download folder")), 0, 1, 0, 1);
GtkWidget* filebutton = gtk_file_chooser_button_new(
"Choose download folder", GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
_("Choose downloaded files folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
// FIXME: The default should probably be ~/Desktop
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(filebutton)
, g_get_home_dir()); //...
gtk_widget_set_sensitive(filebutton, FALSE); //...
FILLED_ADD(filebutton, 1, 2, 0, 1);
checkbutton = gtk_check_button_new_with_mnemonic
("Show a notification window for finished downloads");
(_("Show a notification window for finished transfers"));
gtk_widget_set_sensitive(checkbutton, FALSE); //...
SPANNED_ADD(checkbutton, 0, 2, 1, 2);
FRAME_NEW("Languages");
FRAME_NEW(_("Languages"));
TABLE_NEW(1, 2);
INDENTED_ADD(gtk_label_new("Preferred languages"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new(_("Preferred languages")), 0, 1, 0, 1);
entry = gtk_entry_new();
// TODO: Make sth like get_browser_languages_default filtering encodings and C out
// TODO: Provide a real ui with real language names (iso-codes)
@ -406,32 +406,32 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
FILLED_ADD(entry, 1, 2, 0, 1);
// Page "Appearance"
PAGE_NEW("Appearance");
FRAME_NEW("Font settings");
PAGE_NEW(_("Appearance"));
FRAME_NEW(_("Font settings"));
TABLE_NEW(5, 2);
INDENTED_ADD(gtk_label_new_with_mnemonic("Default _font"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new_with_mnemonic(_("Default _font")), 0, 1, 0, 1);
gchar* defaultFont = g_strdup_printf("%s %d"
, config->defaultFontFamily, config->defaultFontSize);
button = gtk_font_button_new_with_font(defaultFont);
g_free(defaultFont);
g_signal_connect(button, "font-set", G_CALLBACK(on_prefs_defaultFont_changed), prefs);
FILLED_ADD(button, 1, 2, 0, 1);
INDENTED_ADD(gtk_label_new_with_mnemonic("_Minimum font size"), 0, 1, 1, 2);
INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Minimum font size")), 0, 1, 1, 2);
hbox = gtk_hbox_new(FALSE, 4);
spinbutton = gtk_spin_button_new_with_range(1, G_MAXINT, 1);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), config->minimumFontSize);
g_signal_connect(spinbutton, "value-changed"
, G_CALLBACK(on_prefs_minimumFontSize_changed), prefs);
gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
button = gtk_button_new_with_mnemonic("_Advanced");
button = gtk_button_new_with_mnemonic(_("_Advanced"));
gtk_widget_set_sensitive(button, FALSE); //...
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 4);
FILLED_ADD(hbox, 1, 2, 1, 2);
INDENTED_ADD(gtk_label_new_with_mnemonic("Default _encoding"), 0, 1, 2, 3);
INDENTED_ADD(gtk_label_new_with_mnemonic(_("Default _encoding")), 0, 1, 2, 3);
combobox = gtk_combo_box_new_text();
sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
, "Chinese (BIG5)", "Japanese (SHIFT_JIS)", "Russian (KOI8-R)"
, "Unicode (UTF-8)", "Western (ISO-8859-1)", NULL);
, _("Chinese (BIG5)"), _("Japanese (SHIFT_JIS)"), _("Russian (KOI8-R)")
, _("Unicode (UTF-8)"), _("Western (ISO-8859-1)"), NULL);
if(!strcmp(config->defaultEncoding, "BIG5"))
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), 0);
else if(!strcmp(config->defaultEncoding, "SHIFT_JIS"))
@ -446,95 +446,95 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
g_signal_connect(combobox, "changed"
, G_CALLBACK(on_prefs_defaultEncoding_changed), prefs);
FILLED_ADD(combobox, 1, 2, 2, 3);
button = gtk_button_new_with_label("Advanced settings");
button = gtk_button_new_with_label(_("Advanced settings"));
gtk_widget_set_sensitive(button, FALSE); //...
WIDGET_ADD(button, 1, 2, 2, 3);
FRAME_NEW("Default colors");
FRAME_NEW(_("Default colors"));
TABLE_NEW(2, 4);
SEMI_INDENTED_ADD(gtk_label_new("Text color"), 0, 1, 0, 1);
SEMI_INDENTED_ADD(gtk_label_new(_("Text color")), 0, 1, 0, 1);
colorbutton = gtk_color_button_new();
gtk_widget_set_sensitive(colorbutton, FALSE); //...
WIDGET_ADD(colorbutton, 1, 2, 0, 1);
SEMI_INDENTED_ADD(gtk_label_new("Background color"), 2, 3, 0, 1);
SEMI_INDENTED_ADD(gtk_label_new(_("Background color")), 2, 3, 0, 1);
colorbutton = gtk_color_button_new();
gtk_widget_set_sensitive(colorbutton, FALSE); //...
WIDGET_ADD(colorbutton, 3, 4, 0, 1);
SEMI_INDENTED_ADD(gtk_label_new("Normal link color"), 0, 1, 1, 2);
SEMI_INDENTED_ADD(gtk_label_new(_("Link color")), 0, 1, 1, 2);
colorbutton = gtk_color_button_new();
gtk_widget_set_sensitive(colorbutton, FALSE); //...
WIDGET_ADD(colorbutton, 1, 2, 1, 2);
SEMI_INDENTED_ADD(gtk_label_new("Visited link color"), 2, 3, 1, 2);
SEMI_INDENTED_ADD(gtk_label_new(_("Visited link color")), 2, 3, 1, 2);
colorbutton = gtk_color_button_new();
gtk_widget_set_sensitive(colorbutton, FALSE); //...
WIDGET_ADD(colorbutton, 3, 4, 1, 2);
// Page "Behavior"
PAGE_NEW("Behavior");
FRAME_NEW("Browsing");
PAGE_NEW(_("Behavior"));
FRAME_NEW(_("Browsing"));
TABLE_NEW(3, 2);
INDENTED_ADD(gtk_label_new_with_mnemonic("Open _new pages in"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new_with_mnemonic(_("Open _new pages in")), 0, 1, 0, 1);
combobox = gtk_combo_box_new_text();
sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
, "New tab", "New window", "Current tab", NULL);
, _("New tab"), _("New window"), _("Current tab"), NULL);
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), config->newPages);
g_signal_connect(combobox, "changed", G_CALLBACK(on_prefs_newpages_changed), prefs);
gtk_widget_set_sensitive(combobox, FALSE); //...
FILLED_ADD(combobox, 1, 2, 0, 1);
checkbutton = gtk_check_button_new_with_mnemonic("_Middle click goto");
checkbutton = gtk_check_button_new_with_mnemonic(_("_Middle click opens selection"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->middleClickGoto);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_middleClickGoto_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Open tabs in the _background");
checkbutton = gtk_check_button_new_with_mnemonic(_("Open tabs in the _background"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->openTabsInTheBackground);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_openTabsInTheBackground_toggled), prefs);
SPANNED_ADD(checkbutton, 1, 2, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Open popups in _tabs");
checkbutton = gtk_check_button_new_with_mnemonic(_("Open popups in _tabs"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->openPopupsInTabs);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_openPopupsInTabs_toggled), prefs);
gtk_widget_set_sensitive(checkbutton, FALSE); //...
SPANNED_ADD(checkbutton, 0, 2, 2, 3);
FRAME_NEW("Features");
FRAME_NEW(_("Features"));
TABLE_NEW(4, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Load _images");
checkbutton = gtk_check_button_new_with_mnemonic(_("Load _images"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->autoLoadImages);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_loadImagesAutomatically_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 0, 1);
checkbutton = gtk_check_button_new_with_mnemonic("_Shrink images to fit");
checkbutton = gtk_check_button_new_with_mnemonic(_("_Shrink images to fit"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->autoShrinkImages);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_shrinkImagesToFit_toggled), prefs);
SPANNED_ADD(checkbutton, 1, 2, 0, 1);
checkbutton = gtk_check_button_new_with_mnemonic("Print _backgrounds");
checkbutton = gtk_check_button_new_with_mnemonic(_("Print _backgrounds"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->printBackgrounds);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_printBackgrounds_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic("_Resizable textareas");
checkbutton = gtk_check_button_new_with_mnemonic(_("_Resizable textareas"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->resizableTextAreas);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_resizableTextAreas_toggled), prefs);
SPANNED_ADD(checkbutton, 1, 2, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Enable _scripts");
checkbutton = gtk_check_button_new_with_mnemonic(_("Enable _scripts"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->enableScripts);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_enableJavaScript_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 2, 3);
checkbutton = gtk_check_button_new_with_mnemonic("Enable _plugins");
checkbutton = gtk_check_button_new_with_mnemonic(_("Enable _plugins"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->enablePlugins);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_enablePlugins_toggled), prefs);
SPANNED_ADD(checkbutton, 1, 2, 2, 3);
checkbutton = gtk_check_button_new_with_mnemonic("_User Stylesheet");
checkbutton = gtk_check_button_new_with_mnemonic(_("_User Stylesheet"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->userStylesheet);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_userStylesheet_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 3, 4);
filebutton = gtk_file_chooser_button_new(
"Choose user stylesheet", GTK_FILE_CHOOSER_ACTION_OPEN);
_("Choose user stylesheet"), GTK_FILE_CHOOSER_ACTION_OPEN);
prefs->userStylesheetUri = filebutton;
gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(filebutton), config->userStylesheetUri);
g_signal_connect(filebutton, "file-set"
@ -543,54 +543,54 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
FILLED_ADD(filebutton, 1, 2, 3, 4);
// Page "Interface"
PAGE_NEW("Interface");
FRAME_NEW("Navigationbar");
PAGE_NEW(_("Interface"));
FRAME_NEW(_("Navigationbar"));
TABLE_NEW(3, 2);
INDENTED_ADD(gtk_label_new_with_mnemonic("_Toolbar style"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Toolbar style")), 0, 1, 0, 1);
combobox = gtk_combo_box_new_text();
sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
, "Default", "Icons", "Text", "Both", "Both horizontal", NULL);
, _("Default"), _("Icons"), _("Text"), _("Both"), _("Both horizontal"), NULL);
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), config->toolbarStyle);
g_signal_connect(combobox, "changed"
, G_CALLBACK(on_prefs_toolbarstyle_changed), prefs);
FILLED_ADD(combobox, 1, 2, 0, 1);
checkbutton = gtk_check_button_new_with_mnemonic("Show small _icons");
checkbutton = gtk_check_button_new_with_mnemonic(_("Show small _icons"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarSmall);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_toolbarSmall_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Show web_search");
checkbutton = gtk_check_button_new_with_mnemonic(_("Show Web_search"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarWebSearch);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_toolbarWebSearch_toggled), prefs);
SPANNED_ADD(checkbutton, 1, 2, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Show _New Tab Button");
checkbutton = gtk_check_button_new_with_mnemonic(_("Show _New Tab"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarNewTab);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_toolbarNewTab_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 2, 3);
checkbutton = gtk_check_button_new_with_mnemonic("Show _closed tabs button");
checkbutton = gtk_check_button_new_with_mnemonic(_("Show _Trash"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->toolbarClosedTabs);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_toolbarClosedTabs_toggled), prefs);
SPANNED_ADD(checkbutton, 1, 2, 2, 3);
FRAME_NEW("Miscellaneous");
FRAME_NEW(_("Miscellaneous"));
TABLE_NEW(2, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Close _buttons on tabs");
checkbutton = gtk_check_button_new_with_mnemonic(_("Close _buttons on tabs"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), config->tabClose);
g_signal_connect(checkbutton, "toggled"
, G_CALLBACK(on_prefs_tabClose_toggled), prefs);
INDENTED_ADD(checkbutton, 0, 1, 0, 1);
hbox = gtk_hbox_new(FALSE, 4);
gtk_box_pack_start(GTK_BOX(hbox)
, gtk_label_new_with_mnemonic("Tab Si_ze"), FALSE, FALSE, 4);
, gtk_label_new_with_mnemonic(_("Tab Si_ze")), FALSE, FALSE, 4);
spinbutton = gtk_spin_button_new_with_range(0, 36, 1);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), config->tabSize);
g_signal_connect(spinbutton, "changed"
, G_CALLBACK(on_prefs_tabSize_changed), prefs);
gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
FILLED_ADD(hbox, 1, 2, 0, 1);
INDENTED_ADD(gtk_label_new_with_mnemonic("_Location search engine"), 0, 1, 1, 2);
INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Location search engine")), 0, 1, 1, 2);
entry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(entry), config->locationSearch);
g_signal_connect(entry, "focus-out-event"
@ -598,14 +598,14 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
FILLED_ADD(entry, 1, 2, 1, 2);
// Page "Network"
PAGE_NEW("Network");
FRAME_NEW("Proxy Server");
PAGE_NEW(_("Network"));
FRAME_NEW(_("Proxy Server"));
TABLE_NEW(5, 2);
checkbutton = gtk_check_button_new_with_mnemonic("_Custom proxy server");
checkbutton = gtk_check_button_new_with_mnemonic(_("_Custom proxy server"));
gtk_widget_set_sensitive(checkbutton, FALSE); //...
SPANNED_ADD(checkbutton, 0, 2, 0, 1);
hbox = gtk_hbox_new(FALSE, 4);
INDENTED_ADD(gtk_label_new_with_mnemonic("_Host/ Port"), 0, 1, 1, 2);
INDENTED_ADD(gtk_label_new_with_mnemonic(_("_Host/ Port")), 0, 1, 1, 2);
entry = gtk_entry_new();
gtk_widget_set_sensitive(entry, FALSE); //...
gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 0);
@ -614,61 +614,61 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
FILLED_ADD(hbox, 1, 2, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic
("Proxy requires authentication");
(_("Proxy requires authentication"));
gtk_widget_set_sensitive(checkbutton, FALSE); //...
// TODO: The proxy user and pass need to be indented further
SPANNED_ADD(checkbutton, 0, 2, 2, 3);
INDENTED_ADD(gtk_label_new("Username"), 0, 1, 3, 4);
INDENTED_ADD(gtk_label_new(_("Username")), 0, 1, 3, 4);
entry = gtk_entry_new();
gtk_widget_set_sensitive(entry, FALSE); //...
FILLED_ADD(entry, 1, 2, 3, 4);
INDENTED_ADD(gtk_label_new("Password"), 0, 1, 4, 5);
INDENTED_ADD(gtk_label_new(_("Password")), 0, 1, 4, 5);
entry = gtk_entry_new();
gtk_widget_set_sensitive(entry, FALSE); //...
FILLED_ADD(entry, 1, 2, 4, 5);
FRAME_NEW("Cache");
FRAME_NEW(_("Cache"));
TABLE_NEW(1, 2);
INDENTED_ADD(gtk_label_new("Cache size"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new(_("Cache size")), 0, 1, 0, 1);
hbox = gtk_hbox_new(FALSE, 4);
spinbutton = gtk_spin_button_new_with_range(0, 10000, 10);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), 100/*config->iCacheSize*/);
gtk_widget_set_sensitive(spinbutton, FALSE); //...
gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("MB"), FALSE, FALSE, 0);
button = gtk_button_new_with_label("Clear cache");
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("MB")), FALSE, FALSE, 0);
button = gtk_button_new_with_label(_("Clear cache"));
gtk_widget_set_sensitive(button, FALSE); //...
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 4);
FILLED_ADD(hbox, 1, 2, 0, 1);
// Page "Privacy"
PAGE_NEW("Privacy");
FRAME_NEW("Cookies");
PAGE_NEW(_("Privacy"));
FRAME_NEW(_("Cookies"));
TABLE_NEW(3, 2);
INDENTED_ADD(gtk_label_new("Accept cookies"), 0, 1, 0, 1);
INDENTED_ADD(gtk_label_new(_("Accept cookies")), 0, 1, 0, 1);
combobox = gtk_combo_box_new_text();
sokoke_combo_box_add_strings(GTK_COMBO_BOX(combobox)
, "All cookies", "Session cookies", "None", NULL);
, _("All cookies"), _("Session cookies"), _("None"), NULL);
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), 0); //...
gtk_widget_set_sensitive(combobox, FALSE); //...
FILLED_ADD(combobox, 1, 2, 0, 1);
checkbutton = gtk_check_button_new_with_mnemonic
("Allow cookies from the original website only");
(_("Allow cookies from the original website only"));
gtk_widget_set_sensitive(checkbutton, FALSE); //...
SPANNED_ADD(checkbutton, 0, 2, 1, 2);
INDENTED_ADD(gtk_label_new("Maximum cookie age"), 0, 1, 2, 3);
INDENTED_ADD(gtk_label_new(_("Maximum cookie age")), 0, 1, 2, 3);
hbox = gtk_hbox_new(FALSE, 4);
spinbutton = gtk_spin_button_new_with_range(0, 360, 1);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), 30/*config->iCookieAgeMax*/);
gtk_widget_set_sensitive(spinbutton, FALSE); //...
gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("days"), FALSE, FALSE, 0);
button = gtk_button_new_with_label("View cookies");
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("days")), FALSE, FALSE, 0);
button = gtk_button_new_with_label(_("View cookies"));
gtk_widget_set_sensitive(button, FALSE); //...
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 4);
FILLED_ADD(hbox, 1, 2, 2, 3);
FRAME_NEW("History");
FRAME_NEW(_("History"));
TABLE_NEW(3, 2);
checkbutton = gtk_check_button_new_with_mnemonic("Remember my visited pages");
checkbutton = gtk_check_button_new_with_mnemonic(_("Remember my visited pages"));
gtk_widget_set_sensitive(checkbutton, FALSE); //...
SPANNED_ADD(checkbutton, 0, 1, 0, 1);
hbox = gtk_hbox_new(FALSE, 4);
@ -676,20 +676,20 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), 30/*config->iHistoryAgeMax*/);
gtk_widget_set_sensitive(spinbutton, FALSE); //...
gtk_box_pack_start(GTK_BOX(hbox), spinbutton, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("days"), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("days")), FALSE, FALSE, 0);
SPANNED_ADD(hbox, 1, 2, 0, 1);
checkbutton = gtk_check_button_new_with_mnemonic
("Remember my form inputs");
(_("Remember my form inputs"));
gtk_widget_set_sensitive(checkbutton, FALSE); //...
SPANNED_ADD(checkbutton, 0, 2, 1, 2);
checkbutton = gtk_check_button_new_with_mnemonic
("Remember my downloaded files");
(_("Remember my downloaded files"));
gtk_widget_set_sensitive(checkbutton, FALSE); //...
SPANNED_ADD(checkbutton, 0, 2, 2, 3);
// Page "Programs"
PAGE_NEW("Programs");
FRAME_NEW("External programs");
PAGE_NEW(_("Programs"));
FRAME_NEW(_("External programs"));
TABLE_NEW(3, 2);
GtkWidget* treeview; GtkTreeViewColumn* column;
GtkCellRenderer* renderer_text; GtkCellRenderer* renderer_pixbuf;
@ -700,10 +700,10 @@ GtkWidget* prefs_preferences_dialog_new(MidoriBrowser* browser)
renderer_text = gtk_cell_renderer_text_new();
renderer_pixbuf = gtk_cell_renderer_pixbuf_new();
column = gtk_tree_view_column_new_with_attributes(
"Protocol", renderer_text, "text", PROTOCOLS_COL_NAME, NULL);
_("Protocol"), renderer_text, "text", PROTOCOLS_COL_NAME, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
column = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(column, "Command");
gtk_tree_view_column_set_title(column, _("Command"));
gtk_tree_view_column_pack_start(column, renderer_pixbuf, FALSE);
gtk_tree_view_column_set_cell_data_func(column, renderer_pixbuf
, (GtkTreeCellDataFunc)on_prefs_protocols_render_icon, prefs, NULL);

View file

@ -18,6 +18,7 @@
#include <unistd.h>
#endif
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
void sokoke_combo_box_add_strings(GtkComboBox* combobox
, const gchar* labelFirst, ...)
@ -153,7 +154,7 @@ gpointer sokoke_superuser_warning_new(void)
GtkWidget* hbox = gtk_event_box_new();
gtk_widget_modify_bg(hbox, GTK_STATE_NORMAL
, &hbox->style->bg[GTK_STATE_SELECTED]);
GtkWidget* label = gtk_label_new("Warning: You are using the superuser account!");
GtkWidget* label = gtk_label_new(_("Warning: You are using a superuser account!"));
gtk_misc_set_padding(GTK_MISC(label), 0, 2);
gtk_widget_modify_fg(GTK_WIDGET(label), GTK_STATE_NORMAL
, &GTK_WIDGET(label)->style->fg[GTK_STATE_SELECTED]);
@ -263,7 +264,7 @@ gboolean sokoke_key_file_save_to_file(GKeyFile* keyFile
if(!(fp = fopen(filename, "w")))
{
*error = g_error_new(G_FILE_ERROR, G_FILE_ERROR_ACCES
, "Writing failed.");
, _("Writing failed."));
return FALSE;
}
fputs(data, fp);

View file

@ -18,6 +18,7 @@
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
void update_searchEngine(guint index, GtkWidget* search)
{
@ -78,7 +79,7 @@ void on_webSearch_icon_released(GtkWidget* widget, SexyIconEntryPosition* pos
}
else
{
menuitem = gtk_image_menu_item_new_with_label("Empty");
menuitem = gtk_image_menu_item_new_with_label(_("Empty"));
gtk_widget_set_sensitive(menuitem, FALSE);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
gtk_widget_show(menuitem);
@ -149,7 +150,7 @@ const gchar* STR_NON_NULL(const gchar* string)
static void webSearch_editEngine_dialog_new(gboolean newEngine, CWebSearch* webSearch)
{
GtkWidget* dialog = gtk_dialog_new_with_buttons(
newEngine ? "Add search engine" : "Edit search engine"
newEngine ? _("Add search engine") : _("Edit search engine")
, GTK_WINDOW(webSearch->window)
, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR
, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL
@ -179,7 +180,7 @@ static void webSearch_editEngine_dialog_new(gboolean newEngine, CWebSearch* webS
GtkWidget* hbox = gtk_hbox_new(FALSE, 8);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
GtkWidget* label = gtk_label_new_with_mnemonic("_Name:");
GtkWidget* label = gtk_label_new_with_mnemonic(_("_Name:"));
gtk_size_group_add_widget(sizegroup, label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
GtkWidget* entry_shortName = gtk_entry_new();
@ -195,7 +196,7 @@ static void webSearch_editEngine_dialog_new(gboolean newEngine, CWebSearch* webS
hbox = gtk_hbox_new(FALSE, 8);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
label = gtk_label_new_with_mnemonic("_Description:");
label = gtk_label_new_with_mnemonic(_("_Description:"));
gtk_size_group_add_widget(sizegroup, label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
GtkWidget* entry_description = gtk_entry_new();
@ -209,7 +210,7 @@ static void webSearch_editEngine_dialog_new(gboolean newEngine, CWebSearch* webS
hbox = gtk_hbox_new(FALSE, 8);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
label = gtk_label_new_with_mnemonic("_Url:");
label = gtk_label_new_with_mnemonic(_("_URL:"));
gtk_size_group_add_widget(sizegroup, label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
GtkWidget* entry_url = gtk_entry_new();
@ -223,7 +224,7 @@ static void webSearch_editEngine_dialog_new(gboolean newEngine, CWebSearch* webS
hbox = gtk_hbox_new(FALSE, 8);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
label = gtk_label_new_with_mnemonic("_Icon (name or file):");
label = gtk_label_new_with_mnemonic(_("_Icon (name or file):"));
gtk_size_group_add_widget(sizegroup, label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
GtkWidget* entry_icon = gtk_entry_new();
@ -237,7 +238,7 @@ static void webSearch_editEngine_dialog_new(gboolean newEngine, CWebSearch* webS
hbox = gtk_hbox_new(FALSE, 8);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
label = gtk_label_new_with_mnemonic("_Keyword:");
label = gtk_label_new_with_mnemonic(_("_Keyword:"));
gtk_size_group_add_widget(sizegroup, label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
GtkWidget* entry_keyword = gtk_entry_new();
@ -306,7 +307,7 @@ static void on_webSearch_remove(GtkWidget* widget, CWebSearch* webSearch)
GtkWidget* webSearch_manageSearchEngines_dialog_new(MidoriBrowser* browser)
{
const gchar* dialogTitle = "Manage search engines";
const gchar* dialogTitle = _("Manage search engines");
GtkWidget* dialog = gtk_dialog_new_with_buttons(dialogTitle
, GTK_WINDOW(browser)
, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR