speechd-discuss
[Top][All Lists]
Advanced

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

[PATCH 2/2] mark say.c messages for translation


From: Tomas Cerha
Subject: [PATCH 2/2] mark say.c messages for translation
Date: Mon, 06 Dec 2010 11:17:00 +0100

Hello Andrei,

I can see the problem with strings that should not be translated also at other 
places:

  - the list of priorities
  - default connection name ('main')
  - default application name ('spd-say')
  - the mailing list address in "Please report bugs to ..." (it is better to 
keep such
    strings away from translations, if we decide to change it, it will not 
invalidate
    the translations and it will also minimize the risk of the translator 
making a typo
    in the address).  I'm afraid the address is not valid already now.
  - I'd also recommend keeping the copyright years out of translations for the 
same
    reason (Copyright update should not invalidate the translations).

Andrei Kholodnyi wrote:
> I'm curious how do you want to split this:
> +    printf(_("Set SSML mode on (default: off)\n"));
> like
> +    printf(_("Set )); printf("SSML "); printf(_("mode")); printf("on
> ("); printf(_("default: )); printf("off)\n");

As William already pointed out, this is not necessary in this case, but in 
general, if 
you need something like this, it is not possible to simply split the sentence 
this way. 
  It may not be possible to construct a sensible sentence in another language 
with the 
same word order as in English.  Also, the translator would see the separate 
parts of the 
sentence as separate translation items and would have no idea that these pieces 
of text 
are supposed to make a sentence together.

The simplest solution might be to add comments for translators and stress, that 
'SSML', 
'on' and 'off' shall not be translated (only 'SSML really applies in this case).

Another option is using string formatting to insert the untranslated strings 
and still 
allow the translator to organize the sentence and punctuation appropriately:

     printf(_("Set the connection name used to estabilish\n"));
     printf("                                ");
     printf(_("(default: %s)\n"), "main");

I also kept the indentation away from the translation, since we don't want to 
invalidate 
the translation if we ever decide to change the indentation.

The copyright year and mailing list address might be protected in a simillar 
way:

     printf(_("Copyright (C) %s Brailcom, o.p.s.\n"
           "This is free software; you can redistribute it and/or modify it\n"
           "under the terms of the GNU General Public License as published by\n"
           "the Free Software Foundation; either version 2, or (at your 
option)\n"
           "any later version. Please see COPYING for more details.\n\n"
            "Please report bugs to %s\n\n"), "2003", "<speechd at 
bugs.freebsoft.org>"
           );




reply via email to

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