diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-11-21 22:34:54 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-11-21 22:34:54 -0500 |
commit | bdc0d2dc78c6b0275cc12b1013b54834b35e901c (patch) | |
tree | 5d86b9fb0ee95cfe4abc38970b19019e11517dbc | |
parent | 99604267d055045bf066ad0872d8ab270ad4dfdd (diff) |
Use sprintf and gettext to output the DMS version of the location. More translator-friendly.
-rw-r--r-- | lib/noticelist.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php index 43aa2ca1b..21cec528f 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -397,7 +397,12 @@ class NoticeListItem extends Widget $latlon = (!empty($lat) && !empty($lon)) ? $lat.';'.$lon : ''; if (empty($name)) { - $name = $this->decimalDegreesToDMS(abs($lat)) . ($lat>0?'N ':'S ') . $this->decimalDegreesToDMS(abs($lon)) . ($lon>0?'E':'W'); + $latdms = $this->decimalDegreesToDMS(abs($lat)); + $londms = $this->decimalDegreesToDMS(abs($lon)); + $name = sprintf( + _('%1$u°%2$u\'%3$u"%4$s %5$u°%6$u\'%7$u"%8$s'), + $latdms['deg'],$latdms['min'], $latdms['sec'],($lat>0?_('N'):_('S')), + $londms['deg'],$londms['min'], $londms['sec'],($lon>0?_('E'):_('W'))); } $url = $location->getUrl(); @@ -428,7 +433,6 @@ class NoticeListItem extends Widget $min = floor($tempma / 60); $sec = $tempma - ($min*60); - return $deg . '°' . $min . "'" . $sec . "\""; return array("deg"=>$deg,"min"=>$min,"sec"=>$sec); } |