Hanno Schlichting, on 2008-02-08:
> Maurits van Rees wrote:
>> dpico, on 2008-02-07:
>>> I must complain, to whom this may concern, that
it's not a good idea that
>>> i18ndude displays the (long) help text if there
was an error. That makes
>>> difficult to realize that there was error text
somewhere. A short "enter
>>> i18ndude help if you don't know what you are
doing" would be enough.
>>
>> Good idea. Hanno, if you read this: do you mind if
I tackle this? I
>> see some spots in script.py where we can output a
specific error
>> message instead of the complete usage.
>
> More specific error messages are most welcome
Done:
http:
//dev.plone.org/collective/changeset/59046
>> BTW, current i18ndude trunk gives me an error when
syncing files, and
>> a test fails, caused by this recent change:
>>
>> http:
//dev.plone.org/collective/changeset/58402
>>
>> It fails at the first msgid when calling
"normalize(id)". Tested with
>> the rebuild_i18n script in
Products.eXtremeManagement.
>
> I'll try to reproduce this and write back.
>
> Hanno
I pinged Simon (sm in #plone) on irc tonight about this. He
would
take a look. The error I get is:
$ i18ndude sync --pot i18n/eXtremeManagement.pot
i18n/eXtremeManagement-*.po
Traceback (most recent call last):
File "/home/maurits/dude/bin/i18ndude", line 7,
in ?
sys.exit(
File
"/home/maurits/svn/i18ndude/src/i18ndude/script.py"
;, line 515, in main
fun()
File
"/home/maurits/svn/i18ndude/src/i18ndude/script.py"
;, line 347, in sync
writer.write(msgstrToComment=False, sync=True)
File
"/home/maurits/svn/i18ndude/src/i18ndude/catalog.py&quo
t;, line 457, in write
self._write_messages(sort=sort,
msgstrToComment=msgstrToComment, sync=sync)
File
"/home/maurits/svn/i18ndude/src/i18ndude/catalog.py&quo
t;, line 487, in _write_messages
self._print_entry(f, id, entry,
msgstrToComment=msgstrToComment, sync=sync)
File
"/home/maurits/svn/i18ndude/src/i18ndude/catalog.py&quo
t;, line 553, in _print_entry
self._printToFile(f, 'msgid %s' % normalize(id))
File
"/home/maurits/svn/i18ndude/src/i18ndude/pygettext.py&q
uot;, line 247, in normalize
s = '"' + escape(s) + '"'
File
"/home/maurits/svn/i18ndude/src/i18ndude/pygettext.py&q
uot;, line 233, in escape
s[i] = escapes[ord(s[i])]
IndexError: list index out of range
In fact, a very simple call to normalize like this already
fails, so
normalize does not look like a good function to use:
(dude)maurits hobb:~/svn/i18ndude $ python2.4
>>> from i18ndude.pygettext import normalize
>>> normalize('a')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/home/maurits/svn/i18ndude/src/i18ndude/pygettext.py&q
uot;, line 247, in normalize
s = '"' + escape(s) + '"'
File
"/home/maurits/svn/i18ndude/src/i18ndude/pygettext.py&q
uot;, line 233, in escape
s[i] = escapes[ord(s[i])]
IndexError: list index out of range
--
Maurits van Rees | http://maurits.vanrees.or
g/
Work | http://zestsoftware.nl/
"This is your day, don't let them take it away."
[Barlow Girl]
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
a>
_______________________________________________
Plone-i18n mailing list
Plone-i18n lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n
a>
|