Am 29.02.2012 00:55, schrieb Pedro Romano:
> However the 'babel.messages.extract' module 'extract_from_dir',
> 'extract_from_file' and 'extract' methods are coded to expect that a
> processed file will only contain messages for itself and when the
> location for the messages is generated it will obviously refer to the
> '.ts' file for all messages instead of the original source files for
> which I actually have the location information but have no way to pass
> up from my extractor.
>
> Would this functionality be interesting to be included in Babel? If so
> I would like to eventually contribute patches for it. Any suggestions
> on the best way to integrated it with the current code?
Sounds like a sensible use case - though I didn't have time to check the code.
Can you outline your changes? If these are ok, you can work on a full-blown
patch :-)
fs
If you own your .ts, or better if you're the one producing this .ts
file, can I point you to an all gettext approach?
http://blog.ufsoft.org/2012/01/23/using-gettext-in-compiled-qt-ui-files-with-pyside
That's what I'm using on my own Qt project(PyQt or PySide).
If you don't own, or do not create that .ts file yourself, yet, you
need to use it, take a look at the Glade extractor in babel's svn contrib:
http://svn.edgewall.org/repos/babel/contrib/glade/babelglade/extract.py
You could create a similar extractor, parsing the filename, line
number and string to translate, and feed that to babel instead of
letting babel parse that .ts file itself, leading to all translatable
strings pointing to the same file.
Just some ideas.
Regards,
Pedro Algarvio.
Hello there Pedro.
http://blog.ufsoft.org/2012/01/23/using-gettext-in-compiled-qt-ui-files-with-pyside
http://svn.edgewall.org/repos/babel/contrib/glade/babelglade/extract.py
Just some ideas.
Regards,
Pedro Algarvio.
--
You received this message because you are subscribed to the Google Groups "Python Babel" group.
To post to this group, send email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-babel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/python-babel?hl=en.