dogtail-devel [Bug 328652] Autotranslation of gedit-test-utf8-procedural-api.py fails with gedit-2.13



Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=328652
 dogtail | Framework | Ver: CVS HEAD





------- Comment #6 from Dave Malcolm  2006-01-27 02:37 UTC -------
Unfortunatly there looks to be a regression here :-(

I just tested CVS HEAD on my Fedora rawhide box.  A judicious "print moFile"
statement in GettextTranslationDb __init__ shows that it's loading the moFile
for every single language, not just the one under test (and it does it for
every package in the dependenct chain, so it's a lot of mo files...)  

LANG=ja_JP.UTF-8 ./gedit-test-utf8-procedural-api.py
Creating logfile at
/tmp/dogtail/logs/gedit-test-utf8-procedural-api_20060126-212739 ...
Detecting distribution: Red Hat/Fedora/derived distribution
/usr/share/locale/af/LC_MESSAGES/gedit.mo
/usr/share/locale/am/LC_MESSAGES/gedit.mo
[   lots of mo files snipped   ]
/usr/share/locale/mn/LC_MESSAGES/GConf2.mo
/usr/share/locale/ms/LC_MESSAGES/GConf2.mo
/usr/share/locale/nb/LC_MESSAGES/GConf2.mo
/usr/share/locale/ne/LC_MESSAGES/GConf2.mo
Traceback (most recent call last):
  File "./gedit-test-utf8-procedural-api.py", line 18, in ?
    dogtail.i18n.loadTranslationsFromPackageMoFiles('gedit')
  File
"/home/boston/dmalcolm/coding/dogtail/pristine-from-cvs/dogtail/dogtail/i18n.py",
line 199, in loadTranslationsFromPackageMoFiles
    load(packageName, getDependencies)
  File
"/home/boston/dmalcolm/coding/dogtail/pristine-from-cvs/dogtail/dogtail/i18n.py",
line 180, in load
    translationDbs.append(GettextTranslationDb(moFile))
  File
"/home/boston/dmalcolm/coding/dogtail/pristine-from-cvs/dogtail/dogtail/i18n.py",
line 49, in __init__
    self.__gnutranslations = gettext.GNUTranslations(open(moFile))
  File "/usr/lib/python2.4/gettext.py", line 177, in __init__
    self._parse(fp)
  File "/usr/lib/python2.4/gettext.py", line 301, in _parse
    plural = v[1].split('plural=')[1]
IndexError: list index out of range

This fatal error is isolatable to a simple reproducer:
Python 2.4.2 (#1, Dec 17 2005, 13:02:22)
[GCC 4.1.0 20051214 (Red Hat 4.1.0-0.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gettext
>>> gettext.GNUTranslations(open("/usr/share/locale/ne/LC_MESSAGES/GConf2.mo"))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/gettext.py", line 177, in __init__
    self._parse(fp)
  File "/usr/lib/python2.4/gettext.py", line 301, in _parse
    plural = v[1].split('plural=')[1]
IndexError: list index out of range

Do you want me to file separate bugs for:
(i) the multilanguage loading thing?
(ii) the mo file that can't be loaded?

It may be that various translation files are broken (e.g. the specific one
above), and that's causing the problem, but if so the loading of excessive
numbers of language files is more likely to trigger that bug.

Grrrr :-(


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the QA contact for the bug.
You are watching the assignee for the bug.



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