CVS: phpweather/output pw_text.php,1.19,1.20 pw_text_es.php,1.4,1.5
Brought to you by:
iridium
|
From: Martin G. <gim...@us...> - 2003-09-02 17:57:31
|
Update of /cvsroot/phpweather/phpweather/output
In directory sc8-pr-cvs1:/tmp/cvs-serv3734
Modified Files:
pw_text.php pw_text_es.php
Log Message:
Patches from Pablo Alcaraz (pabloa) that update the Spanish
translation and fixes a bug with the visibility display.
Index: pw_text.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- pw_text.php 14 Jun 2003 23:37:09 -0000 1.19
+++ pw_text.php 2 Sep 2003 17:57:20 -0000 1.20
@@ -13,7 +13,7 @@
* just translating the strings.
*
* @author Martin Geisler <gim...@gi...>
- * @version $Id$
+ * @version pw_text.php,v 1.17 2003/03/05 19:53:24 gimpster Exp
*/
class pw_text extends pw_output {
@@ -496,7 +496,7 @@
return;
}
}
-
+
/**
* Function used to parse a runway-group.
*
@@ -607,13 +607,12 @@
}
if (empty($dir)) {
- $output = $prefix .
+ $output = $prefix .
$this->pref_units($this->properties['mark_begin'] . $metric .
$this->properties['mark_end'] . $me_unit,
$this->properties['mark_begin'] . $imperial .
$this->properties['mark_end'] . $im_unit);
} else {
-
$output = $prefix .
$this->pref_units($this->properties['mark_begin'] . $metric .
$this->properties['mark_end'] . $me_unit,
@@ -624,6 +623,7 @@
$this->strings['wind_dir_short_long'][$dir] .
$this->properties['mark_end'];
}
+
return $output;
}
@@ -633,11 +633,11 @@
$location,
$this->properties['mark_end']);
}
-
+
function print_pretty_time($time) {
- $minutes_old = (int) ((time() - $time)/60);
- if ($minutes_old >= 60) {
- $hours = (int) ((time() - $time)/3600);
+ $minutes_old = round((time() - $time)/60);
+ if ($minutes_old > 60) {
+ $hours = round((time() - $time)/3600);
$minutes = $minutes_old % 60;
if ($minutes < 1) {
$minutes = '';
@@ -756,9 +756,9 @@
$this->pref_units($this->properties['mark_begin'] . $dew_c .
$this->properties['mark_end'] . ' °C',
$this->properties['mark_begin'] . $dew_f .
- $this->properties['mark_end'] . ' °F');
+ $this->properties['mark_end'] . ' °F') . '.';
}
- return $output . '.';
+ return $output;
}
function print_pretty_altimeter($altimeter) {
@@ -854,19 +854,21 @@
function print_pretty_visibility($visibility) {
$output[0] = $this->parse_visibility_group($visibility[0]);
-
+
if (!empty($visibility[1])) {
- $output[1] = $this->parse_visibility_group($visibility[1]);
+ if( $visibility[1]['meter'] != $visibility[0]['meter']) {
+ $output[1] = $this->parse_visibility_group($visibility[1]);
+ }
} else {
$output[1] = '';
}
-
+
if (!empty($visibility[2])) {
$output[2] = $this->parse_visibility_group($visibility[2]);
} else {
$output[2] = '';
}
-
+
return $this->strings['visibility'] .
$this->list_sentences($output[0], $output[1], $output[2]) . '.';
}
Index: pw_text_es.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_es.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- pw_text_es.php 28 Aug 2002 21:13:40 -0000 1.4
+++ pw_text_es.php 2 Sep 2003 17:57:21 -0000 1.5
@@ -6,9 +6,9 @@
* Provides all the strings needed by pw_text to produce Spanish
* output.
*
- * @author Jesús Peñas <jp...@ed...>
+ * @author Jess Peas <jp...@ed...>
* @link http://www.educaplus.org/ My homepage.
- * @version $Id$
+ * @version pw_text_es.php,v 1.4 2002/08/28 21:13:40 gimpster Exp
*/
class pw_text_es extends pw_text {
@@ -23,7 +23,7 @@
$this->strings['list_sentences_and'] = ' y ';
$this->strings['list_sentences_comma'] = ', ';
$this->strings['list_sentences_final_and'] = ', y ';
- $this->strings['location'] = 'Informe meteorológico para %s%s%s.';
+ $this->strings['location'] = 'Informe meteorológico para %s%s%s.';
$this->strings['minutes'] = ' minutos';
$this->strings['time_format'] = ' El informe se hizo hace %s, a las %s%s%s UTC.';
$this->strings['time_minutes'] = 'y %s%s%s minutos';
@@ -35,16 +35,16 @@
$this->strings['meter'] = ' metros';
$this->strings['meters'] = ' metros';
$this->strings['feet'] = ' pies';
- $this->strings['kilometers'] = ' kilómetros';
+ $this->strings['kilometers'] = ' kilómetros';
$this->strings['miles'] = ' millas';
$this->strings['and'] = ' y ';
- $this->strings['plus'] = ' además de ';
+ $this->strings['plus'] = ' ademá de ';
$this->strings['with'] = ' con ';
$this->strings['wind_blowing'] = ' El viento soplaba a una velocidad de ';
- $this->strings['wind_with_gusts'] = ' con ráfagas de ';
+ $this->strings['wind_with_gusts'] = ' con ráagas de ';
$this->strings['wind_from'] = ' del ';
- $this->strings['wind_variable'] = ' con %sdirección variable%s';
- $this->strings['wind_varying'] = ', variando entre %s%s%s (%s%sº%s) y %s%s%s (%s%sº%s)';
+ $this->strings['wind_variable'] = ' con %sdirección variable%s';
+ $this->strings['wind_varying'] = ', variando entre %s%s%s (%s%s%s) y %s%s%s (%s%s%s)';
$this->strings['wind_calm'] = ' El aire estaba en %scalma%s';
$this->strings['wind_dir'] = array(
'norte',
@@ -93,12 +93,12 @@
'NW' => 'noroeste'
);
$this->strings['temperature'] = ' La temperatura era ';
- $this->strings['dew_point'] = ', con un punto de rocío de ';
- $this->strings['altimeter'] = ' La presión atmosférica era ';
+ $this->strings['dew_point'] = ', con un punto de rocío de ';
+ $this->strings['altimeter'] = ' La presión atmosférica era ';
$this->strings['hPa'] = ' hPa';
$this->strings['inHg'] = ' inHg';
- $this->strings['rel_humidity'] = ' Había una humedad relativa del ';
- $this->strings['feelslike'] = ' La sensación térmica era de ';
+ $this->strings['rel_humidity'] = ' Había una humedad relativa del ';
+ $this->strings['feelslike'] = ' La sensación térmica era de ';
$this->strings['cloud_group_beg'] = ' En cuanto a la nubosidad, ';
$this->strings['cloud_group_end'] = '.';
$this->strings['cloud_clear'] = ' El cielo estaba %sdespejado%s.';
@@ -115,8 +115,8 @@
'OVC' => 'nublado');
$this->strings['cumulonimbus'] = ' tipo cumulonimbos';
//towering_cumulus son nubes de desarrollo vertical (cumulus congestus)
- $this->strings['towering_cumulus'] = ' tipo cúmulos';
- $this->strings['cavok'] = ' sin nubes por debajo de %s y sin presencia de cumulonimbos';
+ $this->strings['towering_cumulus'] = ' tipo cúmulos';
+ $this->strings['cavok'] = ' sin nubes por debajo de %s y sin presencia de cumulusnimbos';
$this->strings['currently'] = ' Actualmente ';
$this->strings['weather'] =
array(
@@ -132,28 +132,28 @@
'SH' => ' chubascos,',
'TS' => ' tormenta',
'FZ' => ' helada',
- 'DZ' => ' llovizna',
+ 'DZ' => ' garúa',
'RA' => ' lluvia',
'SN' => ' nieve',
'SG' => ' cinarra',
'IC' => ' cristales de hielo',
'PL' => ' hielo granulado',
'GR' => ' granizo',
- 'GS' => ' granizo pequeño',
+ 'GS' => ' granizo pequeño',
'UP' => ' desconocido',
'BR' => ' neblina',
'FG' => ' niebla',
'FU' => ' humo',
- 'VA' => ' ceniza volcánica',
+ 'VA' => ' ceniza volc�ica',
'DU' => ' polvareda',
'SA' => ' arena',
'HZ' => ' calima',
- 'PY' => ' rocío',
- 'PO' => ' probable aparición de remolinos de polvo o arena',
+ 'PY' => ' rocío',
+ 'PO' => ' probable aparición de remolinos de polvo o arena',
'SQ' => ' turbonadas',
'FC' => ' trombas/tornados/huracanes',
'SS' => ' tempestad de arena o polvo');
- $this->strings['visibility'] = ' En este momento la visibilidad global era ';
+ $this->strings['visibility'] = ' En aquel momento la visibilidad global era ';
$this->strings['visibility_greater_than'] = 'mayor de ';
$this->strings['visibility_less_than'] = 'menor de ';
$this->strings['visibility_to'] = ' de ';
@@ -245,4 +245,4 @@
}
-?>
\ No newline at end of file
+?>
|