Package: turtleart Version: 98-1 Severity: important Tags: patch l10n *** Please type your report below this line ***
There is 2 problems with localization in the turtleart: 1. it looks for default file messages.mo 2. there are no translation files in the distributions I tried to fix this. (1) is trivial - just call gettext.textdomain() Fix for (2) is mainly borrowed from python-apt. Since you are usind distutils, let's use them deeper. I also had to fix installation paths - I am not 100% sure that the way I do it is the Right one, but with install_data=/usr/share/.... the distutils just cannot be working, so I guess this value is better to leave untouched. Setting it to important because this king of program is supposed to be used by children, which often need a translation. -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (600, 'testing'), (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages turtleart depends on: ii libgtk2.0-bin 2.20.1-1 The programs for the GTK+ graphica ii python 2.6.5-13 interactive high-level object-orie ii python-gconf 2.28.1-1 Python bindings for the GConf conf ii python-gobject 2.21.4+is.2.21.3-1 Python bindings for the GObject li ii python-gst0.10 0.10.19-1 generic media-playing framework (P ii python-gtk2 2.17.0-4 Python bindings for the GTK+ widge ii python-pycurl 7.19.0-3+b1 Python bindings to libcurl ii python-support 1.0.9 automated rebuilding support for P turtleart recommends no packages. turtleart suggests no packages. -- debconf-show failed
diff --git a/debian/control b/debian/control index dccad21..10ecbb4 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: misc Priority: optional Maintainer: Matthew Gallagher <mattv...@gmail.com> Uploaders: Luke Faraone <lfara...@debian.org> -Build-Depends: cdbs, debhelper (>= 7), python, python-support, help2man +Build-Depends: cdbs, debhelper (>= 7), python, python-support, help2man, python-distutils-extra XS-Python-Version: all Standards-Version: 3.9.1 Vcs-Bzr: http://bzr.debian.org/bzr/collab-maint/turtleart diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..e3a2efa --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,13 @@ +TurtleArt/sprites.py +TurtleArt/tablock.py +TurtleArt/tacanvas.py +TurtleArt/taconstants.py +TurtleArt/taexporthtml.py +TurtleArt/tagplay.py +TurtleArt/talogo.py +TurtleArt/tasprite_factory.py +TurtleArt/taturtle.py +TurtleArt/tautils.py +TurtleArt/tawindow.py +TurtleArtActivity.py +turtleart.py diff --git a/setup.cfg b/setup.cfg index fd6521a..4203606 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,2 @@ -[install] -install_data=/usr/share/turtleart -install_scripts=/usr/bin +[build_i18n] +domain=TurtleArt diff --git a/setup.py b/setup.py index e5026ee..50ef65f 100755 --- a/setup.py +++ b/setup.py @@ -9,10 +9,11 @@ if len(sys.argv) > 1 and '--no-sugar' == sys.argv[1]: import glob, os.path, string from distutils.core import setup + from DistUtilsExtra.command import build_i18n, build_extra DATA_FILES = [ - ('icons', glob.glob('icons/*')), - ('images', glob.glob('images/*')), + ('/usr/share/turtleart/icons', glob.glob('icons/*')), + ('/usr/share/turtleart/images', glob.glob('images/*')), ('/usr/share/applications', ['turtleart.desktop']) ] @@ -24,6 +25,8 @@ if len(sys.argv) > 1 and '--no-sugar' == sys.argv[1]: packages = ['TurtleArt'], scripts = ['turtleart'], data_files = DATA_FILES, + cmdclass = {'build_i18n': build_i18n.build_i18n, + 'build': build_extra.build_extra}, ) else: from sugar.activity import bundlebuilder diff --git a/turtleart.py b/turtleart.py index 32eec11..e49213a 100755 --- a/turtleart.py +++ b/turtleart.py @@ -50,7 +50,9 @@ except ImportError, e: argv = sys.argv[:] # Workaround for import behavior of gst in tagplay sys.argv[1:] = [] # Execution of import gst cannot see '--help' or '-h' -from gettext import gettext as _ +import gettext +gettext.textdomain('TurtleArt') +_ = gettext.gettext from TurtleArt.taconstants import OVERLAY_LAYER from TurtleArt.tautils import data_to_string, data_from_string, get_save_name