List Info

Thread: i18dude improvements




i18dude improvements
country flaguser name
United States
2007-12-04 16:03:22
Hi,

i18ndude is cool, but I'd like to use it with my eggs using
several
distutils extensions,
instead of a console script. (like pylons does i think)

so i can call for example:

python setup.py i18n-merge

Furthermore, I think there's a missing feature that is going
to be helpfull
for plone 3
(if it's not already beeing develop in some branch  ):

compiling .mo files found in the egg. (This can be done for
example with
po_lib).

Since we need  to implement them this week, i can work over
a i18ndude
branch to propose
a patch to add these features if you think they worth it,


Regards

Tarek

-- 
View this message in context: http://www.nabble.com/i18dude-improvemen
ts-tf4946000s6748.html#a14160585
Sent from the Internationalization mailing list archive at
Nabble.com.


------------------------------------------------------------
-------------
SF.Net email is sponsored by: The Future of Linux Business
White Paper
from Novell.  From the desktop to the data center, Linux is
going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

Re: i18dude improvements
country flaguser name
Germany
2007-12-06 16:06:51
Hi.

Tarek Ziadé wrote:
> i18ndude is cool

Thx 

> but I'd like to use it with my eggs using several
> distutils extensions,
> instead of a console script. (like pylons does i think)
> 
> so i can call for example:
> 
> python setup.py i18n-merge

I'm not quite sure if this is a good match. Guessing the
po/pot files
combinations inside a package seems to involve quite some
automagic
work. I think I prefer explicit over implicit here.

My second problem with this, is that it involves making
i18ndude
available in some way to distutils (not sure how that works
exactly,
though). You cannot do that globally as noted in the other
mail, as
i18ndude needs to run in a sandbox to not interfere with
other projects.

I would prefer this to be done as a separate extension
package to
i18ndude at this point I guess.

> Furthermore, I think there's a missing feature that is
going to be helpfull
> for plone 3
> (if it's not already beeing develop in some branch  ):
> 
> compiling .mo files found in the egg. (This can be done
for example with
> po_lib).

See http://dev.pl
one.org/plone/ticket/7157. I consider it a bug that
only po files inside products are compiled automatically to
mo files in
Plone 3. Po files inside packages should also be compiled
automatically.
The code that does this currently lives in PTS and might
move down to
zope.i18n at one point. The actual compilation uses my
python-gettext
package to be cross platform compatible.

For i18ndude I don't quite see this as a missing feature as
you can just
easily compile those files yourself with the offical gettext
binaries
(in this case 'msgfmt'). Writing a simple script to iterate
over all
files inside a folder and calling 'msgfmt foo.po -o foo.mo
--no-hash'
seems to be the easier way of doing this. The --no-hash is
not needed
but will save a bit of space, as the hash table inside mo
files isn't
used by the Python Gettext implementation.

Hanno


------------------------------------------------------------
-------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://
sourceforge.net/services/buy/index.php
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n
Re: i18dude improvements
country flaguser name
United States
2007-12-07 03:31:51

Hanno Schlichting-2 wrote:
> 
> Hi.
> 
> Tarek Ziadé wrote:
>> i18ndude is cool
> 
> Thx 
> 
>> but I'd like to use it with my eggs using several
>> distutils extensions,
>> instead of a console script. (like pylons does i
think)
>> 
>> so i can call for example:
>> 
>> python setup.py i18n-merge
> 
> I'm not quite sure if this is a good match. Guessing
the po/pot files
> combinations inside a package seems to involve quite
some automagic
> work. I think I prefer explicit over implicit here.
> 

I didn't look in deep how this works, so I guess you mean
i18ndude
cannot work on an isolated package.


Hanno Schlichting-2 wrote:
> 
> My second problem with this, is that it involves making
i18ndude
> available in some way to distutils (not sure how that
works exactly,
> though). 
> 

it is a simple entry point that can be added to extends
commands.
It is very neat to write tools that runs over eggs (QA,
tests, etc, ..)
see:
http://tarekziade.wordpress
.com/2007/09/30/extending-setuptools-adding-a-new-command/




Hanno Schlichting-2 wrote:
> 
> You cannot do that globally as noted in the other mail,
as
> i18ndude needs to run in a sandbox to not interfere
with other projects.
> 
> 
> I would prefer this to be done as a separate extension
package to
> i18ndude at this point I guess.
> 

ok


Hanno Schlichting-2 wrote:
> 
> 
>> Furthermore, I think there's a missing feature that
is going to be
>> helpfull
>> for plone 3
>> (if it's not already beeing develop in some branch
 ):
>> 
>> compiling .mo files found in the egg. (This can be
done for example with
>> po_lib).
> 
> See http://dev.pl
one.org/plone/ticket/7157. I consider it a bug that
> only po files inside products are compiled
automatically to mo files in
> Plone 3. Po files inside packages should also be
compiled automatically.
> The code that does this currently lives in PTS and
might move down to
> zope.i18n at one point. The actual compilation uses my
python-gettext
> package to be cross platform compatible.
> 
> For i18ndude I don't quite see this as a missing
feature as you can just
> easily compile those files yourself with the offical
gettext binaries
> (in this case 'msgfmt'). Writing a simple script to
iterate over all
> files inside a folder and calling 'msgfmt foo.po -o
foo.mo --no-hash'
> seems to be the easier way of doing this. The --no-hash
is not needed
> but will save a bit of space, as the hash table inside
mo files isn't
> used by the Python Gettext implementation.
> 

Ok, thats extactly why I am asking all that:
I was thinking about writing a small product based on msgfmt
calls and maybe
on i18ndude, so package po would be compiled on the fly like
what is done
with PTS.

So i guess we'll wait for that fix and write a small one in
the meantime 

Thanks

Tarek
-- 
View this message in context: http://www.nabble.com/i18dude-improvemen
ts-tf4946000s6748.html#a14209527
Sent from the Internationalization mailing list archive at
Nabble.com.


------------------------------------------------------------
-------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://
sourceforge.net/services/buy/index.php
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n
[1-3]

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