CVS: phpweather/output pw_text.php,1.11,1.12 pw_text_da.php,1.4,1.5 p...
Brought to you by:
iridium
From: Max H. <ir...@us...> - 2002-05-16 19:44:27
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv3089 Modified Files: pw_text.php pw_text_da.php pw_text_en.php pw_text_hu.php pw_text_no.php Log Message: Combined windchill and heatindex into one 'feels like' - sorry translators. I think this is a better solution Index: pw_text.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- pw_text.php 15 May 2002 22:23:26 -0000 1.11 +++ pw_text.php 16 May 2002 19:44:20 -0000 1.12 @@ -804,6 +804,17 @@ $this->properties['mark_end'] . ' °F') . '.'; return $output; } + + function print_pretty_feelslike($feelslike) { + extract($feelslike); + $output = $this->strings['feelslike'] . + $this->pref_units($this->properties['mark_begin'] . $feelslike_c . + $this->properties['mark_end'] . ' °C', + $this->properties['mark_begin'] . $feelslike_f . + $this->properties['mark_end'] . ' °F') . '.'; + return $output; + } + function print_pretty_clouds($clouds) { if (empty($clouds[0]) || $clouds[0]['condition'] == 'CLR' || @@ -1042,22 +1053,23 @@ $output['temperature'] = $this->print_pretty_temperature($temperature); } - /********************************* - * Windchill * - *********************************/ - if (!in_array('windchill', $this->properties['exclude']) && - !empty($windchill)) { - $output['windchill'] = $this->print_pretty_windchill($windchill); - } - + /**************************** - * Heatindex * + * Feelslike * ****************************/ if (!in_array('heatindex', $this->properties['exclude']) && !empty($heatindex)) { - $output['heatindex'] = $this->print_pretty_heatindex($heatindex); + $heatindex['feelslike_c'] = $heatindex['heatindex_c']; + $heatindex['feelslike_f'] = $heatindex['heatindex_f']; + $output['feelslike'] = $this->print_pretty_feelslike($heatindex); + } elseif (!in_array('windchill', $this->properties['exclude']) && + !empty($windchill)) { + $windchill['feelslike_c'] = $windchill['heatindex_c']; + $windchill['feelslike_f'] = $windchill['heatindex_f']; + $output['feelslike'] = $this->print_pretty_feelslike($windchill); } - + + /**************************** * Altimeter (pressure) * ****************************/ Index: pw_text_da.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_da.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_text_da.php 12 May 2002 15:08:24 -0000 1.4 +++ pw_text_da.php 16 May 2002 19:44:20 -0000 1.5 @@ -96,8 +96,7 @@ $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Den relative luftfugtigheden var '; - $this->strings['windchill'] = 'Temperaturen, inklusiv afkølingsfaktoren, var '; - $this->strings['heatindex'] = 'The heat index was '; + $this->strings['feelslike'] = 'The Temperature feels like '; $this->strings['cloud_group_beg'] = 'Der var '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Himlen var %sskyfri%s.'; Index: pw_text_en.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_en.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_text_en.php 12 May 2002 15:08:24 -0000 1.4 +++ pw_text_en.php 16 May 2002 19:44:20 -0000 1.5 @@ -98,8 +98,7 @@ $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'The relative humidity was '; - $this->strings['windchill'] = 'The temperature including windchill was '; - $this->strings['heatindex'] = 'The heat index was '; + $this->strings['feelslike'] = 'The temperature feels like '; $this->strings['cloud_group_beg'] = 'There were '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'The sky was %sclear%s.'; Index: pw_text_hu.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_hu.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- pw_text_hu.php 12 May 2002 15:08:24 -0000 1.8 +++ pw_text_hu.php 16 May 2002 19:44:20 -0000 1.9 @@ -106,8 +106,7 @@ $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'A relatív páratartalom '; - $this->strings['windchill'] = 'A hõérzet '; - $this->strings['heatindex'] = 'The heat index was '; + $this->strings['feelslike'] = 'The temperature feels like '; $this->strings['cloud_group_beg'] = 'Az égbolton'; $this->strings['cloud_group_end'] = ' magasságban.'; $this->strings['cloud_clear'] = 'Az égbolt %sfelhõtlen%s volt.'; Index: pw_text_no.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_no.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_text_no.php 12 May 2002 15:08:24 -0000 1.4 +++ pw_text_no.php 16 May 2002 19:44:21 -0000 1.5 @@ -97,8 +97,7 @@ $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Den relative fuktigheten var '; - $this->strings['windchill'] = 'Temperaturen, med vindfaktor, var '; - $this->strings['heatindex'] = 'The heat index was '; + $this->strings['feelslike'] = 'The temperature feels like '; $this->strings['cloud_group_beg'] = 'Det var '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Himmelen var %sclear%s.'; |