Re: confusing string in divifund



Le jeudi 26 juillet 2007, à 17:03 +0100, Simos Xenitellis a écrit :
> This is a good example to try to suggest here how it should be tackled,
> then document on live.gnome.org for developers to reference.
> Please be constructive on the following:
> 
> 
> Let's assume that we have the following message and we want to make it
> possible to translate in different languages, including languages that
> follow a different order from "subject verb object".
> 
> "From your budget and the amount you've already spent, you will need to
> have saved %s by the date %s"
> 
> In this case we can use "positional arguments" as described in 
> http://www.gnu.org/software/gettext/manual/gettext.html#c_002dformat
> 
> The above message is then converted in the source code to 
> 
> "From your budget and the amount you've already spent, you will need to
> have saved %1$s by the date %2$s"
> 
> Another example is 
> from
> "You run for %d minutes along the %s route with team %s."
> to
> "You run for %1$d minutes along the %2$s route with team %3$s."
> 
> Sometimes it is good to break messages in smaller parts. However, in
> this example it is better to leave as a single message, due to the
> sentence structure.
> 
> 
> How does that look like?

Hrm.
I used to put this (%1$s stuff) in some strings, and one day I wondered:
but, isn't it enough if translators do this themselves in their
translations? I'd think it is, and that it's not critical that the
string in the code has this.

(although I agree that having this in the original string make it easier
for translators to know about this feature)

Vincent

-- 
Les gens heureux ne sont pas pressés.


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