List Info

Thread: i18ndude does nothing




i18ndude does nothing
country flaguser name
United States
2008-02-06 17:47:17
Hi. 

I'm trying to create a .pot file from a couple of .pt files
using i18ndude.
I'm using the following command: 

  i18ndude rebuild-pot --pot name.pot --create prova
file1.pt file2.pt 

It doesn't work. The program outputs the help text and exits
with no file
generated whatsoever. Exactly as if I write i18ndude and
press return. 

I'm using version 3.0b3 and I am trying different
parameters, directories,
.pt files and even computers. No result. 

Can anyone give me a hint on this? Any help will be greatly
appreciated. 
TIA 
David
-- 
View this message in context: http://www.nabble.com/i18ndude-does-not
hing-tp15324471s6748p15324471.html
Sent from the Internationalization mailing list archive at
Nabble.com.


------------------------------------------------------------
-------------
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/
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

Re: i18ndude does nothing
country flaguser name
Netherlands
2008-02-07 04:27:31
dpico, on 2008-02-06:
>
> Hi. 
>
> I'm trying to create a .pot file from a couple of .pt
files using i18ndude.
> I'm using the following command: 
>
>   i18ndude rebuild-pot --pot name.pot --create prova
file1.pt file2.pt 

Looks okay.

> It doesn't work. The program outputs the help text and
exits with no file
> generated whatsoever. Exactly as if I write i18ndude
and press return. 
>
> I'm using version 3.0b3 and I am trying different
parameters, directories,
> .pt files and even computers. No result. 
>
> Can anyone give me a hint on this? Any help will be
greatly appreciated. 
> TIA 
> David

Does i18ndude say anything before printing the usage
information?  I
suspect you may see a line like this:

  No entries for domain "prova".

Things I can think of:

- There really are no translations for the prova domain in
those two
  files.

- I usually tell i18ndude to search for translations in the
current
  directory and all subdirectories:

  i18ndude rebuild-pot --pot name.pot --create prova .

  Note the dot at the end instead of the pt file names. 
Might help.

-- 
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/
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

Re: i18ndude does nothing
country flaguser name
United States
2008-02-07 09:36:38


Maurits van Rees-3 wrote:
> 
> dpico, on 2008-02-06:
>>
>> Hi. 
>>
>> I'm trying to create a .pot file from a couple of
.pt files using
>> i18ndude.
>> I'm using the following command: 
>>
>>   i18ndude rebuild-pot --pot name.pot --create
prova file1.pt file2.pt 
> 
> Looks okay.
> 
>> It doesn't work. The program outputs the help text
and exits with no file
>> generated whatsoever. Exactly as if I write
i18ndude and press return. 
>>
>> I'm using version 3.0b3 and I am trying different
parameters,
>> directories,
>> .pt files and even computers. No result. 
>>
>> Can anyone give me a hint on this? Any help will be
greatly appreciated. 
>> TIA 
>> David
> 
> Does i18ndude say anything before printing the usage
information?  I
> suspect you may see a line like this:
> 
>   No entries for domain "prova".
> 
> Things I can think of:
> 
> - There really are no translations for the prova domain
in those two
>   files.
> 
> - I usually tell i18ndude to search for translations in
the current
>   directory and all subdirectories:
> 
>   i18ndude rebuild-pot --pot name.pot --create prova .
> 
>   Note the dot at the end instead of the pt file names.
 Might help.
> 
> 

Thanks so much, Maurits!
I'm a bit embarrased and feeling stupid. I did have an error
message "No
entries for domain "prova"" that I haven't
seen. My .pt files specified a
different name for the domain. 

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.

Thanks again.
David
-- 
View this message in context: http://www.nabble.com/i18ndude-does-not
hing-tp15324471s6748p15336334.html
Sent from the Internationalization mailing list archive at
Nabble.com.


------------------------------------------------------------
-------------
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/
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

Re: i18ndude does nothing
country flaguser name
Netherlands
2008-02-07 16:53:11
dpico, on 2008-02-07:
> Maurits van Rees-3 wrote:
>> Does i18ndude say anything before printing the
usage information?  I
>> suspect you may see a line like this:
>> 
>>   No entries for domain "prova".
(...)
> 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.


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.

-- 
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/
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

Re: i18ndude does nothing
country flaguser name
United States
2008-02-07 23:39:49
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 

> 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


------------------------------------------------------------
-------------
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/
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

Re: i18ndude does nothing
country flaguser name
Netherlands
2008-02-19 16:58:32
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)mauritshobb:~/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/
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )