-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On May 3, 2007, at 10:40 AM, Stephen J. Turnbull wrote:
Barry Warsaw writes:
The problem is that
_("some string" " and more of it")
is not the same as
_("some string" + " and more of it")
Are you worried about translators? The gettext functions themselves will just see the result of the operation. The extraction tools like xgettext do fail, however.
Yep, sorry, it is the extraction tools I'm worried about.
Teaching Python-based extraction tools about it isn't hard, just make sure that you slurp in the whole argument, and eval it. If what you get isn't a string, throw an exception. xgettext will be harder, since apparently does not do it, nor does it even know enough to error or warn on syntax it doesn't handle within gettext()'s argument.
IMO, this is a problem. We can make the Python extraction tool work,
but we should still be very careful about breaking 3rd party tools
like xgettext, since other projects may be using such tools.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRjoBI3EjvBPtnXfVAQLg0AP/Y1ncqie1NgzRFzuZpnZapMs/+oo+5BCK 1MYqsJwucnDJnOqrUcU34Vq3SB7X7VsSDv3TuoTNnheinX6senorIFQKRAj4abKT f2Y63t6BT97mSOAITFZvVSj0YSG+zkD/HMGeDj4dOJFLj1tYxgKpVprlhMbELzG1 AIKe+wsYjcs= =+oFV -----END PGP SIGNATURE-----