[dev] Horde Metar Block

Rick Emery rick at emery.homelinux.net
Sat Dec 13 05:54:48 PST 2003


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Rick Emery <rick at emery.homelinux.net>:
>
> > I'm not following this. Do you mean that the following is OK?
> >
> > $html .= sprintf(_("<br /><b>Heading:</b> %s inches"), $v);
>
> No, only if it was sprintf(_("The <b>heading</b> is at %s inches"), $v). See
> the difference? In your case you can separate "Heading:" and "%s inches"
> because only the words order in sentences might change but not in tabular
> data.

I think I get it. Complete sentences are alright, but header and value (in
tabular format) should be seperated out.

> > For that matter, is the sprintf necessary? Could I say:
> >
> > $html .= _("<br /><b>Heading:</b> $v inches");
>
> No, this wouldn't work, you *have to* use placeholders (%s, %d etc).

I don't understand this; if I don't use sprintf() or printf(), I'm not sure why
I'd need placeholders. But I don't need to understand it, as long as the code
is acceptable :-).

I'll send a patch in a seperate message.

Thanks!

>
> Jan.
>
> --
> http://www.horde.org - The Horde Project
> http://www.ammma.de - discover your knowledge
> http://www.tip4all.de - Deine private Tippgemeinschaft

--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
 with your eyes turned skyward, for there you have been, and there
 you will always long to return"
                                              -- Leonardo Da Vinci



More information about the dev mailing list