[Kolab-devel] thomas: server/kolab-webadmin/kolab-webadmin/php/admin/locale/de/LC_MESSAGES messages.po, 1.23, 1.24

Bernhard Herzog bh at intevation.de
Wed Feb 21 13:57:23 CET 2007


On Wednesday 21 February 2007 13:15, Gunnar Wrobel wrote:
> Bernhard Herzog <bh at intevation.de> writes:
> > This looks suspiciously like one message split into several translated
> > strings.  Shouldn't this be fixed in the source so that it's only one
> > translated string?
>
> This is the corresponding template:
>
> http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/kolab-webadmin/kolab-weba
>dmin/php/admin/templates/systemaliasnagscreen.tpl?rev=1.2&content-type=text/
>vnd.viewcvs-markup
> 
> What would be necessary to fix it?

I have no idea how this should be done in php or whether it can be done easily 
at all in php, but if it were Python code, I'd probably use something along 
these lines:

   template = """If you have not yet created an account for this,
<a %(attrs1)s>please do so</a> and then go <a %(attrs2)s>here</a>
to set up forwarding of mail to administrative email addresses."""
   print gettext(template) % dict(attrs1='href="..." target="_blank"',
                                  attrs2='href="..."')


That is, move the links out of the string to be translated so that we get a 
string that contains at least whole sentences to be translated with minimal 
markup that is not going to change if the link target change.

  Bernhard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/devel/attachments/20070221/abb2f031/attachment.sig>


More information about the devel mailing list