[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] Bug#680630: [gettext] msgmerge: merges distinct src co

From: Bastien Montagne
Subject: Re: [bug-gettext] Bug#680630: [gettext] msgmerge: merges distinct src comment lines (fwd)
Date: Thu, 12 Jul 2012 16:32:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4


On 12/07/2012 15:58, Chusslove Illich wrote:
[: Santiago Vila :]
[...] in the manual:
   `-w NUMBER'
So, it says that long strings will be split, but it does not say that
short lines will be merged.
But this is precisely the intended behavior, so at best, the manual could be
updated to reflect this. Or even that is not necessary, since it is implied
by the fact that strings are always rewrapped. But I think this is beside
the point. This option, and any other controllable wrapping behavior,
relates only to message fields (msgid, msgstr...) -- this is what is meant
by "strings".

As for comments, the behavior is as follows: comments under sole control of
Gettext tools are always rewrapped, and other comments are not. Thus: source
references and flags are rewrapped, but extracted comments and translator
comments are not. (Excluding previous field comments, which are treated like
strings.) I see no problem in this behavior.

In fact, sometimes it serves to expose abuse of PO elements, such as in this

   #: source/blender/nodes/shader/nodes/node_shader_tex_coord.c:40
   #: bpy.types.Image.mapping:'REFLECTION'
   #: bpy.types.MaterialVolume.reflection
   #: bpy.types.RenderLayer.use_pass_reflection
   #: bpy.types.RenderPass.type:'REFLECTION'

Only the first line here is source reference, and only that line should be
source reference comment. These other lines should have been put into
extracted comments:

   #. bpy.types.Image.mapping:'REFLECTION'
   #. bpy.types.MaterialVolume.reflection
   #. bpy.types.RenderLayer.use_pass_reflection
   #. bpy.types.RenderPass.type:'REFLECTION'
   #: source/blender/nodes/shader/nodes/node_shader_tex_coord.c:40

and then their wrapping would have been kept as is.

It does not make much sense to me to always rewrap source comments - imho, it’s much more clear and easy to read with one source per line (and POEdit seems to think the same, because it always revert that rewrapping on saving)… But if you say it’s working as expected, then I’ll live with it (and keep on using my little hack to get rid of this behavior ;) ). Unless I may kindly suggest a small option to disable that rewrapping ? :)

PS: In our context (Blender translation), lines like “bpy.types.Image.mapping:'REFLECTION'” are source lines exactly as "standard" ones, inasmuch they allow us to point to one usage of the given msgid… Actually, many of our msgids only have that kind of source, without any relation to their actual location in code.

Best regards (and thanks for the gettext tools, btw!),

reply via email to

[Prev in Thread] Current Thread [Next in Thread]