Add internationalization support for translation files in distro.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 3 Nov 2016 13:35:04 +0000 (15:35 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 3 Nov 2016 13:51:28 +0000 (15:51 +0200)
.gitignore
configure.ac
debian/control
debian/lxhotkey-data.install [new file with mode: 0644]
plugins/Makefile.am

index f920765..293be2c 100644 (file)
@@ -19,6 +19,7 @@ missing
 stamp-*
 po/Makefile.in.in
 po/POTFILES
+po/LINGUAS
 .deps/
 .libs/
 .dirstamp
@@ -31,3 +32,4 @@ lxhotkey
 *.tar.xz
 man/lxhotkey.1
 *.desktop
+*.gmo
index bc011f7..5655bf4 100644 (file)
@@ -30,6 +30,14 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
 
 AM_GLIB_GNU_GETTEXT
 
+# Generate po/LINGUAS for available PO files
+rm -f $srcdir/po/LINGUAS
+for po_file in `ls $srcdir/po/*.po | sort`;
+do
+    lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
+    echo $lang >> $srcdir/po/LINGUAS
+done
+
 # Handle --enable-debug option
 AC_ARG_ENABLE(debug,
     [AC_HELP_STRING([--enable-debug],
index 940d4d4..774ed01 100644 (file)
@@ -52,6 +52,7 @@ Description: LXHotkey keyboard shortcuts configurator (development files)
 Package: lxhotkey-gtk
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}, lxhotkey-core
+Recommends: lxhotkey-data
 Provides: lxhotkey-gui
 Description: LXHotkey keyboard shortcuts configurator (GTK+ GUI plugin)
  LXHotkey is an universal application for the Lightweight X11 Desktop
@@ -59,3 +60,13 @@ Description: LXHotkey keyboard shortcuts configurator (GTK+ GUI plugin)
  for Window Manager actions, including ones to start applications.
  .
  This package contains a GTK+ 2.0 GUI plugin.
+
+Package: lxhotkey-data
+Architecture: all
+Depends: ${misc:Depends}
+Description: LXHotkey keyboard shortcuts configurator (data files)
+ LXHotkey is an universal application for the Lightweight X11 Desktop
+ Environment (LXDE) which allows view and change global keyboard shortcuts
+ for Window Manager actions, including ones to start applications.
+ .
+ This package contains internationalization files.
diff --git a/debian/lxhotkey-data.install b/debian/lxhotkey-data.install
new file mode 100644 (file)
index 0000000..2568e1f
--- /dev/null
@@ -0,0 +1 @@
+usr/share/locale/
index f1203de..315a631 100644 (file)
@@ -36,10 +36,12 @@ endif
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST= \
+EXTRA_DIST = \
        gtk/lxhotkey-gtk.desktop.in gtk/lxhotkey-gtk.desktop \
        gtk/edit.h
 
+DISTCLEANFILES = gtk/lxhotkey-gtk.desktop
+
 install-exec-hook:
        rm -f $(DESTDIR)$(pkglibdir)/*.la