Merge lp://staging/~mblayman/entertainer/sh-to-py into lp://staging/entertainer

Proposed by Matt Layman
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~mblayman/entertainer/sh-to-py
Merge into: lp://staging/entertainer
To merge this branch: bzr merge lp://staging/~mblayman/entertainer/sh-to-py
Reviewer Review Type Date Requested Status
Paul Hummer Approve
Review via email: mp+2443@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Matt Layman (mblayman) wrote :

Hi guys,

I've rewritten the shell scripts in python and put it in a module to boot. I did this because I'm trying to fix a bug that wants us to remove mo files (and we should) so that we have a clean source tarball. Since the mo file creation is now in python, it was very easy to add the mo creation to the setup.py file (without using subprocess.call to call some shell scripts or trying to invoke make). It is still possible to call `make mo` which will make all the mo files for all the languages we support. I also removed the locale directory because we were just going to get a bunch of lintian errors about empty directories as soon as we took the old mo files out.

If Paul hears from Barry Warsaw about pythongettext status, it should be pretty easy to add that module to replace some of the call commands I have in this code. But since we don't know yet, I figured that the call commands were appropriate.

I looked into using disutils-extra's build_i18n command, but it didn't handle glade files so I had to rule out that option.

This module is pretty straight forward. Hopefully it makes sense to all of you. I'm sure I'll hear about it in any code reviews.

Oh, as a bonus, this also eliminates the stupid pytools directory that I had to create a while ago (a problem of my own doing). Now the entire tools directory is python so I was able to simplify `make lint` a little.

Revision history for this message
Matt Layman (mblayman) wrote :
Download full text (14.3 KiB)

=== modified file 'Makefile'
--- Makefile 2008-12-11 03:57:07 +0000
+++ Makefile 2008-12-19 05:56:12 +0000
@@ -21,23 +21,22 @@
 DOCS_CLEAN=rm -rf docs entertainer-docs.tar.gz
 DOCS_TAR=${DOCS_DIR}; tar -czf entertainer-docs.tar.gz docs

-TRANS_DIR=cd tools/translations
-TRANSLATE=./generate_new_pot.sh
-UPDATE=./update.sh
+TOOLS_DIR=cd tools
+TRANSLATE= ${PYTHON} translations_generator.py

 check: test lint

 lint:
- ${LINT} ${LINT_FLAGS} entertainer* tools/pytools/* setup.py
+ ${LINT} ${LINT_FLAGS} entertainer* tools/*.py setup.py

 test:
  ${TEST}

 mo: pot
- ${TRANS_DIR};${UPDATE}
+ ${TOOLS_DIR};${TRANSLATE} po mo

 pot:
- ${TRANS_DIR};${TRANSLATE}
+ ${TOOLS_DIR};${TRANSLATE} pot

 tags:
  ${CTAGS} ${CTAGS_FLAGS} entertainerlib

=== removed directory 'locale'
=== removed directory 'locale/da'
=== removed directory 'locale/da/LC_MESSAGES'
=== removed file 'locale/da/LC_MESSAGES/entertainer.mo'
Binary files locale/da/LC_MESSAGES/entertainer.mo 2008-10-04 18:04:03 +0000 and locale/da/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/de'
=== removed directory 'locale/de/LC_MESSAGES'
=== removed file 'locale/de/LC_MESSAGES/entertainer.mo'
Binary files locale/de/LC_MESSAGES/entertainer.mo 2008-10-04 18:04:03 +0000 and locale/de/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/en_GB'
=== removed directory 'locale/en_GB/LC_MESSAGES'
=== removed file 'locale/en_GB/LC_MESSAGES/entertainer.mo'
Binary files locale/en_GB/LC_MESSAGES/entertainer.mo 2008-10-04 18:04:03 +0000 and locale/en_GB/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/es_ES'
=== removed directory 'locale/es_ES/LC_MESSAGES'
=== removed file 'locale/es_ES/LC_MESSAGES/entertainer.mo'
Binary files locale/es_ES/LC_MESSAGES/entertainer.mo 2008-10-04 18:04:03 +0000 and locale/es_ES/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/fi'
=== removed directory 'locale/fi/LC_MESSAGES'
=== removed file 'locale/fi/LC_MESSAGES/entertainer.mo'
Binary files locale/fi/LC_MESSAGES/entertainer.mo 2008-10-04 18:04:03 +0000 and locale/fi/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/fr'
=== removed directory 'locale/fr/LC_MESSAGES'
=== removed file 'locale/fr/LC_MESSAGES/entertainer.mo'
Binary files locale/fr/LC_MESSAGES/entertainer.mo 2008-12-02 12:20:35 +0000 and locale/fr/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/fr_FR'
=== removed directory 'locale/fr_FR/LC_MESSAGES'
=== removed file 'locale/fr_FR/LC_MESSAGES/entertainer.mo'
Binary files locale/fr_FR/LC_MESSAGES/entertainer.mo 2008-10-04 21:48:20 +0000 and locale/fr_FR/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/gl'
=== removed directory 'locale/gl/LC_MESSAGES'
=== removed file 'locale/gl/LC_MESSAGES/entertainer.mo'
Binary files locale/gl/LC_MESSAGES/entertainer.mo 2008-10-04 18:04:03 +0000 and locale/gl/LC_MESSAGES/entertainer.mo 1970-01-01 00:00:00 +0000 differ
=== removed directory 'locale/he'
=== removed directory 'locale/he/LC_MESSAGES'
=== remo...

Revision history for this message
Paul Hummer (rockstar) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt-

  I'm happy with these changes. Thanks for taking care of this.

 vote approve

Cheers,
Paul
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkldsTUACgkQHE2KxYYv8I/fWgCgoyNoWI8MzGE2fBSv/Pb1QOs5
FT8AnjtRGLfG/b9YCb0LT1TZ0dza+gR6
=vVYb
-----END PGP SIGNATURE-----

review: Approve
Revision history for this message
Paul Hummer (rockstar) wrote :

After merging your other branch, this one now conflicts. I'll merge
when that conflict is fixed.

Cheers,
Paul

Revision history for this message
Matt Layman (mblayman) wrote :

Conflict resolved and the bug in the movie screen is fixed (I deleted the extra "k").

322. By Matt Layman

Merged from trunk and resolved conflict. I also fixed the bug in the movie screen.

Subscribers

People subscribed via source and target branches