From ccf200f97d67716f5cab683f6c035bf9a089a542 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Mon, 30 Mar 2009 17:41:35 +0800 Subject: Localize desktop files and gconf schemas file. --- autogen.sh | 1 + bus/Makefile.am | 7 +-- bus/ibus.desktop | 13 ------ bus/ibus.desktop.in | 13 ++++++ configure.ac | 1 + data/Makefile.am | 7 +-- data/ibus.schemas | 96 ---------------------------------------- data/ibus.schemas.in | 105 ++++++++++++++++++++++++++++++++++++++++++++ setup/Makefile.am | 4 +- setup/ibus-setup.desktop | 11 ----- setup/ibus-setup.desktop.in | 11 +++++ 11 files changed, 142 insertions(+), 127 deletions(-) delete mode 100644 bus/ibus.desktop create mode 100644 bus/ibus.desktop.in delete mode 100644 data/ibus.schemas create mode 100644 data/ibus.schemas.in delete mode 100644 setup/ibus-setup.desktop create mode 100644 setup/ibus-setup.desktop.in diff --git a/autogen.sh b/autogen.sh index addc0bd..5dfa50c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,6 +3,7 @@ set -e set -x autopoint --force || exit 1 +intltoolize --copy --force || exit 1 libtoolize --automake --copy --force || exit 1 gtkdocize --copy || exit 1 #--flavour=no-tmpl aclocal -I m4 --force || exit 1 diff --git a/bus/Makefile.am b/bus/Makefile.am index 1b57a07..c9244f3 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -47,10 +47,11 @@ xdgautostart_DATA = \ ibus.desktop \ $(NULL) xdgautostartdir = $(sysconfdir)/xdg/autostart -desktop_DATA = \ - ibus.desktop \ - $(NULL) + desktopdir = $(datadir)/applications +desktop_in_files = ibus.desktop.in +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ noinst_PROGRAMS = $(TESTS) bin_PROGRAMS = ibus-daemon diff --git a/bus/ibus.desktop b/bus/ibus.desktop deleted file mode 100644 index 6336dfd..0000000 --- a/bus/ibus.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=IBus -GenericName=IBus input method framework -Comment=IBus input method framework -Exec=ibus-daemon --xim -Icon=ibus -Terminal=false -Type=Application -X-GNOME-Autostart-Phase=Panel -X-GNOME-AutoRestart=false -X-GNOME-Autostart-Notify=true -X-KDE-autostart-after=panel diff --git a/bus/ibus.desktop.in b/bus/ibus.desktop.in new file mode 100644 index 0000000..6336dfd --- /dev/null +++ b/bus/ibus.desktop.in @@ -0,0 +1,13 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=IBus +GenericName=IBus input method framework +Comment=IBus input method framework +Exec=ibus-daemon --xim +Icon=ibus +Terminal=false +Type=Application +X-GNOME-Autostart-Phase=Panel +X-GNOME-AutoRestart=false +X-GNOME-Autostart-Notify=true +X-KDE-autostart-after=panel diff --git a/configure.ac b/configure.ac index 263b83f..614932e 100644 --- a/configure.ac +++ b/configure.ac @@ -115,6 +115,7 @@ AC_PATH_PROG(GCONFTOOL, gconftool-2, no) if test x"$GCONFTOOL" = xno; then AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) fi +IT_PROG_INTLTOOL([0.40.0]) AM_GCONF_SOURCE_2 diff --git a/data/Makefile.am b/data/Makefile.am index 2200245..68e52ec 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -23,10 +23,11 @@ SUBDIRS = \ icons \ $(NULL) -schemas_DATA = \ - ibus.schemas \ - $(NULL) + schemasdir = $(GCONF_SCHEMA_FILE_DIR) +schemas_in_files = ibus.schemas +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) +@INTLTOOL_SCHEMAS_RULE@ install-data-local: if GCONF_SCHEMAS_INSTALL diff --git a/data/ibus.schemas b/data/ibus.schemas deleted file mode 100644 index 9cfbb47..0000000 --- a/data/ibus.schemas +++ /dev/null @@ -1,96 +0,0 @@ - - - - - /schemas/desktop/ibus/general/preload_engines - /desktop/ibus/general/preload_engines - ibus - list - string - - Preload Engines - Preload Engines during ibus starts up - - - - /schemas/desktop/ibus/general/hotkey/trigger - /desktop/ibus/general/hotkey/trigger - ibus - list - string - [Control+space] - - Trigger Hotkey - Trigger hotkey for enable or disable input context - - - - /schemas/desktop/ibus/general/hotkey/next_engine - /desktop/ibus/general/hotkey/next_engine - ibus - list - string - [] - - Next Engine Hotkey - Next engine hotkey for switch to next input method engine - - - - /schemas/desktop/ibus/general/hotkey/prev_engine - /desktop/ibus/general/hotkey/prev_engine - ibus - list - string - [] - - Prev Engine Hotkey - Prev engine hotkey for switch to previous input method engine - - - - /schemas/desktop/ibus/panel/show - /desktop/ibus/panel/show - ibus - int - 1 - - Auto Hide - The behavior of language panel. 0 = Always hide, 1 = Auto hide, 2 = Always show - - - - /schemas/desktop/ibus/panel/lookup_table_orientation - /desktop/ibus/panel/lookup_table_orientation - ibus - int - 0 - - Orientation of Lookup Table - Orientation of Lookup Table. 0 = Horizontal, 1 = Vertical - - - - /schemas/desktop/ibus/panel/use_custom_font - /desktop/ibus/panel/use_custom_font - ibus - bool - false - - Use Custom Font - Use custom font name for language panel - - - - /schemas/desktop/ibus/panel/custom_font - /desktop/ibus/panel/custom_font - ibus - string - Sans 10 - - Custom Font - Custom font name for language panel - - - - diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in new file mode 100644 index 0000000..0eb9676 --- /dev/null +++ b/data/ibus.schemas.in @@ -0,0 +1,105 @@ + + + + + /schemas/desktop/ibus/general/preload_engines + /desktop/ibus/general/preload_engines + ibus + list + string + + Preload Engines + Preload Engines during ibus starts up + + + + /schemas/desktop/ibus/general/hotkey/trigger + /desktop/ibus/general/hotkey/trigger + ibus + list + string + + [Control+space] + Trigger Hotkey + Trigger hotkey for enable or disable input context + + + [Zenkaku_Hankaku] + + + [Hangul,Alt+space] + + + + /schemas/desktop/ibus/general/hotkey/next_engine + /desktop/ibus/general/hotkey/next_engine + ibus + list + string + [] + + Next Engine Hotkey + Next engine hotkey for switch to next input method engine + + + + /schemas/desktop/ibus/general/hotkey/prev_engine + /desktop/ibus/general/hotkey/prev_engine + ibus + list + string + [] + + Prev Engine Hotkey + Prev engine hotkey for switch to previous input method engine + + + + /schemas/desktop/ibus/panel/show + /desktop/ibus/panel/show + ibus + int + 1 + + Auto Hide + The behavior of language panel. 0 = Always hide, 1 = Auto hide, 2 = Always show + + + + /schemas/desktop/ibus/panel/lookup_table_orientation + /desktop/ibus/panel/lookup_table_orientation + ibus + int + + 0 + Orientation of Lookup Table + Orientation of Lookup Table. 0 = Horizontal, 1 = Vertical + + + 1 + + + + /schemas/desktop/ibus/panel/use_custom_font + /desktop/ibus/panel/use_custom_font + ibus + bool + false + + Use Custom Font + Use custom font name for language panel + + + + /schemas/desktop/ibus/panel/custom_font + /desktop/ibus/panel/custom_font + ibus + string + Sans 10 + + Custom Font + Custom font name for language panel + + + + diff --git a/setup/Makefile.am b/setup/Makefile.am index 65cfdab..93781ea 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -34,8 +34,10 @@ ibussetup_DATA = \ bin_SCRIPTS = ibus-setup ibussetupdir = $(pkgdatadir)/setup -desktop_DATA = ibus-setup.desktop desktopdir = $(datadir)/applications +desktop_in_files = ibus-setup.desktop.in +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ CLEANFILES = \ *.pyc \ diff --git a/setup/ibus-setup.desktop b/setup/ibus-setup.desktop deleted file mode 100644 index 673a830..0000000 --- a/setup/ibus-setup.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=IBus Preferences -GenericName=IBus Preferences -Comment=Setup utility for IBus -Exec=ibus-setup -Icon=ibus-setup -Terminal=false -Type=Application -StartupNotify=true -Categories=Settings; diff --git a/setup/ibus-setup.desktop.in b/setup/ibus-setup.desktop.in new file mode 100644 index 0000000..673a830 --- /dev/null +++ b/setup/ibus-setup.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=IBus Preferences +GenericName=IBus Preferences +Comment=Setup utility for IBus +Exec=ibus-setup +Icon=ibus-setup +Terminal=false +Type=Application +StartupNotify=true +Categories=Settings; -- cgit