[mousetrap/gnome3-wip: 173/240] Fixed a few small issues



commit 6cd94d45e7d72aa1e8729dadd28484a2b53cea9a
Author: Kevin Brown <kevin kevinbrown in>
Date:   Thu Jun 26 08:27:55 2014 -0400

    Fixed a few small issues
    
    The POT file isn't needed, and the commands to generate the POT
    have been restored.  The comment in the `Makefile.am` prevented it
    from being correctly compiled, so that has been removed (though a
    better way to uninstall MouseTrap is in the works).  The check for
    the OpenCV module `cv` isn't actually needed because it maps to
    `cv2.cv`.

 Makefile.am    |    1 -
 bin/mt-gen-pot |   52 +++++++++++++++++----------------------------
 configure.ac   |   13 -----------
 mousetrap.pot  |   64 --------------------------------------------------------
 4 files changed, 20 insertions(+), 110 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4f1bd79..ea3bf9e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,6 @@ install-exec-local:
        $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
 
 uninstall-local:
-       #FIXME: THIS IS NOT VERY NICE
        rm -rf $(DESTDIR)$(libdir)/python*/site-packages/*mousetrap*
 
 clean-local:
diff --git a/bin/mt-gen-pot b/bin/mt-gen-pot
index 489870b..affd5d9 100755
--- a/bin/mt-gen-pot
+++ b/bin/mt-gen-pot
@@ -1,36 +1,24 @@
 #!/usr/bin/env bash
 source "$(dirname "$0")/mt-define-mousetrap-home"
 
-(
-    POT_FILE="$MOUSETRAP_HOME/mousetrap.pot"
-    echo "Generating $POT_FILE"
-    cd "$MOUSETRAP_HOME"
-    VERSION="$(cat VERSION)"
-    xgettext \
-        --language=Python \
-        --keyword=_ \
-        --output="$POT_FILE" \
-        --from-code=UTF-8 \
-        --sort-by-file \
-        --copyright-holder="Flavio Percoco <flaper src gnome org>" \
-        --package-name=mousetrap \
-        --package-version="$VERSION" \
-        --msgid-bugs-address="https://bugzilla.gnome.org/browse.cgi?product=mousetrap"; \
-        --width=90 \
-        `find src -name "*.py" | sort`
-)
+(cd "$MOUSETRAP_HOME" ; xgettext \
+    --language=Python \
+    --keyword=_ \
+    --output=src/mousetrap/locale/en/LC_MESSAGES/mousetrap.po \
+    --from-code=UTF-8 \
+    --sort-by-file \
+    --copyright-holder="REMOVE" \
+    --package-name="MouseTrap" \
+    --package-version="master" \
+    
--msgid-bugs-address="http://bugzilla.gnome.org/enter_bug.cgi?product=mousetrap&keywords=I18N+L10N&component=i18n";
 \
+    `find src -name "*.py" | sort`)
 
-(
-    PO_FILE="$MOUSETRAP_HOME/src/mousetrap/locale/en/LC_MESSAGES/mousetrap.po"
-    echo "Generating $PO_FILE"
-    cd "$MOUSETRAP_HOME"
-    VERSION="$(cat VERSION)"
-    xgettext \
-        --language=Python \
-        --keyword=_ \
-        --output="$PO_FILE" \
-        --from-code=UTF-8 \
-        --sort-by-file \
-        --omit-header \
-        `find src -name "*.py" | sort`
-)
+(cd "$MOUSETRAP_HOME" ; sed -i \
+    -e "1,2d" \
+    -e "3s/PACKAGE/MouseTrap/" \
+    -e '14c "Last-Translator: MouseTrap team\\n"' \
+    -e "15s/LANGUAGE/English/" \
+    -e "15s/LL/en/" \
+    -e '16c "Language: en\\n"' \
+    -e "18s/CHARSET/UTF-8/" \
+    src/mousetrap/locale/en/LC_MESSAGES/mousetrap.po)
diff --git a/configure.ac b/configure.ac
index 3f87150..d70f419 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,6 @@ AC_PROG_INSTALL
 
 AM_PATH_PYTHON([2.7])
 
-AM_CHECK_PYMOD(cv,,,[AC_MSG_ERROR(Could not find python module cv)])
 AM_CHECK_PYMOD(cv2,,,[AC_MSG_ERROR(Could not find python module cv2)])
 AM_CHECK_PYMOD(gi.repository,,,[AC_MSG_ERROR(Could not find python module gi.repository)])
 AM_CHECK_PYMOD(Xlib,,,[AC_MSG_ERROR(Could not find python module Xlib)])
@@ -23,15 +22,3 @@ AC_CONFIG_FILES([
 Makefile
 ])
 AC_OUTPUT
-
-###############################################################################
-# Don't include src/mousetrap/app/mousetrap.in in AC_OUTPUT.  It will be
-# processed by make (see src/mousetrap/app/Makefile.am), not by autoconf or
-# automake. For more information read
-# http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables
-#
-# Other files may require this same "fix" (e.g., i18n.py, environment.py,
-# mousetrap.desktop).
-#
-#   - Stoney Jackson, dr stoney gmail com, 10/10/2013
-###############################################################################


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]