[RFC][PATCH] minimal i18n support: default _() pass-through function; 'make pot' will create PO template

Lukáš Lalinský lalinsky at gmail.com
Tue May 8 17:18:27 BST 2007


Hi,

On Ut, 2007-05-08 at 18:44 +0300, Alexander Belchenko wrote:
> The subject says all.
> This is very minimal background to start working on
> preparing bzrlib string resources to translations.
> 
> With this patch bzrlib can use _() without any errors,
> (but and without using translations in runtime)
> and we able to upload POT file in Rosetta.
> 
> Now I convert only short help to translatable form,
> as example.

Just a couple of things I've noticed... 

POT files are usually not versioned, since they are auto-generated. And
you even include pygettext in the patch, so generating the file doesn't
require any additional dependencies.

Another things is that the _() function shouldn't applied to static
strings, like _basic_help in this example. The GNU gettext manual
recommends to use gettext_noop() or N_() to mark these strings for
translations, and then use gettext() or _() at run-time [1]. In this
simple patch it doesn't matter, but I think it would be confusing to use
_() for both cases later.

(I haven't read completely the previous threads, so if it is intentional
just ignore this e-mail, please.)

[1]
http://www.gnu.org/software/gettext/manual/html_node/Special-cases.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
	=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
	=?ISO-8859-1?Q?_spr=E1vy?=
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070508/aaee010c/attachment.pgp 


More information about the bazaar mailing list