[dev] Horde Metar Block
Rick Emery
rick at emery.homelinux.net
Fri Dec 12 13:17:59 PST 2003
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Joel Vandal <jvandal at infoteck.qc.ca>:
>
> > $html .= '<br /><b>' . _('Heading:') . '</b> ' .sprintf(_("%s inches"),
> $v);
>
> That looks like the better option of the lot, BUT: never use single quotes
> with
> gettext strings. They won't be picked up.
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck at horde.org>
> "I'm really... I'm not too fascinated by green food." - Average Joe
OK, I think I've got it. Before I rifle through the script changing every
occurrence, could somebody check the attached diff and verify that I'm on the
right track?
Thanks
--
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
-------------- next part --------------
Index: metar.php
===================================================================
RCS file: /repository/horde/lib/Block/metar.php,v
retrieving revision 1.1
diff -u -r1.1 metar.php
--- metar.php 5 Dec 2003 22:40:14 -0000 1.1
+++ metar.php 12 Dec 2003 21:13:31 -0000
@@ -109,15 +109,15 @@
$metar->setDateTimeFormat("M j, Y", "H:i");
$metar->setMetarSource("http");
$weather = $metar->getWeather($this->_params['location']);
- $html .= sprintf(
- "<table width=100%%><tr><td class=control><b>%s, %s
- (%s)</td></tr></table>",
+ $html .= '<table width=100%%><tr><td class=control><b>' .
+ sprintf(_("%s, %s (%s)"),
$metarLocs['location']['values'][$this->_params['__location']]
[$this->_params['location']],
$this->_params['__location'],
- $this->_params['location']);
- $html .= sprintf("<b>"._("Last Updated:")."</b> %s<p />",
- $weather['update']);
+ $this->_params['location']) .
+ '</td></tr></table>';
+ $html .= '<b>' . _("Last Updated: ") . '</b>' .
+ sprintf(_("%s"), $weather['update']) . '<p />';
// Wind
if (isset($weather['wind'])) {
More information about the dev
mailing list