diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rwxr-xr-x | autogen.sh | 1 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | editor/.gitignore | 1 | ||||
-rw-r--r-- | editor/Makefile.am | 4 | ||||
-rw-r--r-- | editor/ca.desrt.dconf-editor.gschema.xml | 2 | ||||
-rw-r--r-- | editor/config.vapi | 1 | ||||
-rw-r--r-- | editor/dconf-editor.desktop.in.in (renamed from editor/dconf-editor.desktop.in) | 4 | ||||
-rw-r--r-- | editor/dconf-editor.vala | 5 | ||||
-rw-r--r-- | po/.gitignore | 5 | ||||
-rw-r--r-- | po/POTFILES.in | 9 | ||||
-rw-r--r-- | po/POTFILES.skip | 3 |
12 files changed, 42 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index affb327..677194f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ include Makefile.gtester ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -SUBDIRS = shm gvdb common engine service gdbus gsettings dbus-1 client bin docs tests +SUBDIRS = shm gvdb common engine service gdbus gsettings dbus-1 client bin docs tests po if ENABLE_EDITOR SUBDIRS += editor @@ -21,6 +21,7 @@ else fi mkdir -p m4 aux +intltoolize --force gtkdocize --docdir docs --flavour no-tmpl aclocal${automake_suffix} ${ACLOCAL_FLAGS} autoheader diff --git a/configure.ac b/configure.ac index c1e9fa3..f82571c 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,14 @@ if test "x$enable_gcov" == "xyes"; then LDFLAGS="$LDFLAGS -lgcov" fi +dnl Gettext support +GETTEXT_PACKAGE=dconf +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used]) + +AM_GLIB_GNU_GETTEXT +IT_PROG_INTLTOOL([0.50.0]) + AC_CONFIG_FILES([ common/Makefile shm/Makefile @@ -79,9 +87,10 @@ AC_CONFIG_FILES([ dbus-1/Makefile bin/Makefile editor/Makefile - editor/dconf-editor.desktop + editor/dconf-editor.desktop.in tests/Makefile docs/Makefile + po/Makefile.in Makefile ]) AC_OUTPUT diff --git a/editor/.gitignore b/editor/.gitignore index 5660400..5f339b3 100644 --- a/editor/.gitignore +++ b/editor/.gitignore @@ -2,4 +2,5 @@ *.stamp dconf-editor dconf-editor.desktop +dconf-editor.desktop.in ca.desrt.dconf-editor.gschema.valid diff --git a/editor/Makefile.am b/editor/Makefile.am index 02ed174..76f3335 100644 --- a/editor/Makefile.am +++ b/editor/Makefile.am @@ -19,7 +19,8 @@ dconf_editor_CFLAGS = \ $(libxml_CFLAGS) \ -DPKGDATADIR=\"$(pkgdatadir)\" \ -DVERSION=\"$(VERSION)\" \ - -DGETTEXT_PACKAGE=\"dconf-editor\" \ + -DLOCALEDIR=\"$(localedir)\" \ + -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"\ -w dconf_editor_SOURCES = \ @@ -32,6 +33,7 @@ dconf_editor_SOURCES = \ desktopdir = $(datadir)/applications desktop_in_files = dconf-editor.desktop.in.in desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ gsettings_SCHEMAS = ca.desrt.dconf-editor.gschema.xml @GSETTINGS_RULES@ diff --git a/editor/ca.desrt.dconf-editor.gschema.xml b/editor/ca.desrt.dconf-editor.gschema.xml index 90a3248..b44ad13 100644 --- a/editor/ca.desrt.dconf-editor.gschema.xml +++ b/editor/ca.desrt.dconf-editor.gschema.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<schemalist> +<schemalist gettext-domain='dconf'> <schema id="ca.desrt.dconf-editor.Settings" path="/ca/desrt/dconf-editor/"> <key name="width" type="i"> <default>800</default> diff --git a/editor/config.vapi b/editor/config.vapi index f697a31..b114ca3 100644 --- a/editor/config.vapi +++ b/editor/config.vapi @@ -3,5 +3,6 @@ namespace Config { public const string PKGDATADIR; public const string GETTEXT_PACKAGE; + public const string LOCALEDIR; public const string VERSION; } diff --git a/editor/dconf-editor.desktop.in b/editor/dconf-editor.desktop.in.in index 446911c..2daff06 100644 --- a/editor/dconf-editor.desktop.in +++ b/editor/dconf-editor.desktop.in.in @@ -1,6 +1,6 @@ [Desktop Entry] -Name=dconf Editor -Comment=Directly edit your entire configuration database +_Name=dconf Editor +_Comment=Directly edit your entire configuration database Exec=dconf-editor Terminal=false Type=Application diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala index f4849e4..0a114fd 100644 --- a/editor/dconf-editor.vala +++ b/editor/dconf-editor.vala @@ -355,6 +355,11 @@ class ConfigurationEditor : Gtk.Application public static int main(string[] args) { + Intl.setlocale (LocaleCategory.ALL, ""); + Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR); + Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); + Intl.textdomain (Config.GETTEXT_PACKAGE); + var app = new ConfigurationEditor(); return app.run(args); } diff --git a/po/.gitignore b/po/.gitignore new file mode 100644 index 0000000..6a0fe87 --- /dev/null +++ b/po/.gitignore @@ -0,0 +1,5 @@ +/Makefile.in.in +/POTFILES +/stamp-it +/dconf.pot +/*.gmo diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..97575e3 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,9 @@ +editor/dconf-editor.desktop.in +editor/dconf-editor.vala +editor/dconf-model.vala +editor/dconf-schema.vala +editor/dconf-view.vala +[type: gettext/glade] editor/dconf-editor.ui +[type: gettext/glade] editor/dconf-editor-menu.ui +[type: gettext/glade] editor/dconf-editor-menu.ui +[type: gettext/gsettings] editor/ca.desrt.dconf-editor.gschema.xml diff --git a/po/POTFILES.skip b/po/POTFILES.skip new file mode 100644 index 0000000..19d8dce --- /dev/null +++ b/po/POTFILES.skip @@ -0,0 +1,3 @@ +editor/dconf-editor.c +editor/dconf-editor.desktop.in.in +editor/dconf-view.c |