CVS: phpweather/output pw_text_da.php,1.7,1.8 pw_text_en.php,1.7,1.8 ...
Brought to you by:
iridium
|
From: Martin G. <gim...@us...> - 2002-08-28 21:13:42
|
Update of /cvsroot/phpweather/phpweather/output
In directory usw-pr-cvs1:/tmp/cvs-serv968
Modified Files:
pw_text_da.php pw_text_en.php pw_text_es.php pw_text_hu.php
pw_text_no.php pw_text_sk.php
Log Message:
Fixing comments and reindenting code.
Index: pw_text_da.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_da.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- pw_text_da.php 17 May 2002 16:21:49 -0000 1.7
+++ pw_text_da.php 28 Aug 2002 21:13:40 -0000 1.8
@@ -3,7 +3,8 @@
require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php');
/**
- * Provides all the strings needed by locale_common to produce Danish output.
+ * Provides all the strings needed by pw_text to produce Danish
+ * output.
*
* @author Martin Geisler <gim...@gi...>
* @version $Id$
@@ -13,7 +14,7 @@
/**
* This constructor provides all the strings used.
*
- * @param array This is just passed on to locale_common()
+ * @param array This is just passed on to pw_text().
*/
function pw_text_da($weather, $input = array()) {
$this->strings['charset'] = 'ISO-8859-1';
Index: pw_text_en.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_en.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- pw_text_en.php 16 May 2002 20:35:53 -0000 1.7
+++ pw_text_en.php 28 Aug 2002 21:13:40 -0000 1.8
@@ -15,7 +15,7 @@
/**
* This constructor provides all the strings used.
*
- * @param array This is just passed on to locale_common()
+ * @param array This is just passed on to pw_text().
*/
function pw_text_en($weather, $input = array()) {
$this->strings['charset'] = 'ISO-8859-1';
Index: pw_text_es.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_es.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- pw_text_es.php 20 Jun 2002 11:17:35 -0000 1.3
+++ pw_text_es.php 28 Aug 2002 21:13:40 -0000 1.4
@@ -15,7 +15,7 @@
/**
* This constructor provides all the strings used.
*
- * @param array This is just passed on to locale_common()
+ * @param array This is just passed on to pw_text().
*/
function pw_text_es($weather, $input = array()) {
$this->strings['charset'] = 'ISO-8859-1';
Index: pw_text_hu.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_hu.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- pw_text_hu.php 16 May 2002 20:02:35 -0000 1.11
+++ pw_text_hu.php 28 Aug 2002 21:13:40 -0000 1.12
@@ -3,9 +3,9 @@
require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php');
/**
- * Provides all the strings needed by locale_common to produce
+ * Provides all the strings needed by pw_text to produce
* Hungarian output.
- * A magyar szövegû idõjárásjelentéshez a locale_common innen
+ * A magyar szövegû idõjárásjelentéshez a pw_text innen
* veszi a sztringeket.
*
* @author Mihály Gyulai
@@ -17,8 +17,8 @@
/**
* This constructor provides all the strings used.
*
- * @param array This is just passed on to locale_common()
- * Ezt a paramétert átadjuk locale_common() -nak.
+ * @param array This is just passed on to pw_text().
+ * Ezt a paramétert átadjuk pw_text() -nak.
*/
function pw_text_hu($weather, $input = array()) {
$this->strings['charset'] = 'ISO-8859-2';
Index: pw_text_no.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_no.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- pw_text_no.php 12 Aug 2002 23:00:10 -0000 1.7
+++ pw_text_no.php 28 Aug 2002 21:13:40 -0000 1.8
@@ -3,18 +3,18 @@
require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php');
/**
- * Provides all the strings needed by locale_common to produce
+ * Provides all the strings needed by pw_text to produce
* Norwegian output.
*
* @author Sven-Erik Andersen <sve...@an...>
- * @version locale_no.php,v 1.3 2001/11/22 02:33:00 sven-erik Exp $
+ * @version $Id$
*/
class pw_text_no extends pw_text {
/**
* This constructor provides all the strings used.
*
- * @param array This is just passed on to locale_common()
+ * @param array This is just passed on to pw_text().
*/
function pw_text_no($weather, $input = array()) {
$this->strings['charset'] = 'ISO-8859-1';
Index: pw_text_sk.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_sk.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- pw_text_sk.php 14 Jul 2002 22:52:29 -0000 1.1
+++ pw_text_sk.php 28 Aug 2002 21:13:40 -0000 1.2
@@ -17,284 +17,280 @@
class pw_text_sk extends pw_text
{
- /**
- * This constructor provides all the strings used.
- *
- * @param array This is just passed on to locale_common()
- */
- function pw_text_sk($weather, $input = array())
- {
- $this->strings['charset'] = 'ISO-8859-2';
- $this->strings['no_data'] = '¥utujem, momentálne nie sú dostupné ¾iadne informácie pre %s%s%s.';
- $this->strings['list_sentences_and'] = ' a ';
- $this->strings['list_sentences_comma'] = ', ';
- $this->strings['list_sentences_final_and'] = ' a ';
- $this->strings['location'] = 'Toto je meterologický report pre %s%s%s.';
- $this->strings['minutes'] = ' minútami';
- $this->strings['time_format'] = 'Report bol zostavený pred %s, o %s%s%s UTC.';
- $this->strings['time_minutes'] = 'a %s%s%s minútami';
- $this->strings['time_one_hour'] = '%sjednou%s hodinou %s';
- $this->strings['time_several_hours'] = '%s%s%s hodinami %s';
- $this->strings['time_a_moment'] = 'práve teraz';
- $this->strings['meters_per_second'] = ' metrov za sekundu';
- $this->strings['miles_per_hour'] = ' míµ za hodinu';
- $this->strings['meter'] = ' metrov';
- $this->strings['meters'] = ' metre';
- $this->strings['feet'] = ' stôp';
- $this->strings['kilometers'] = ' kilometrov';
- $this->strings['miles'] = ' míl';
- $this->strings['and'] = ' a ';
- $this->strings['plus'] = ' plus ';
- $this->strings['with'] = ' s ';
- $this->strings['wind_blowing'] = 'Rýchlos» vetra bola ';
- $this->strings['wind_with_gusts'] = ' so silným závanom od ';
- $this->strings['wind_from'] = ' z ';
- $this->strings['wind_variable'] = ' z %srôznych%s smerov';
- $this->strings['wind_varying'] = ', meniaca sa medzi smerom z %s%s%s (%s%s°%s) a %s%s%s (%s%s°%s)';
- $this->strings['wind_calm'] = 'Vietor bol %spokojný%s';
- $this->strings['wind_dir'] = array(
- 'severu',
- 'severu/severovýchodu',
- 'severovýchodu',
- 'východu/severovýchodu',
- 'východu',
- 'východu/juhovýchodu',
- 'juhovýchodu',
- 'juhu/juhovýchodu',
- 'juhu',
- 'juhu/juhozápadu',
- 'juhozápadu',
- 'západu/juhozápadu',
- 'západu',
- 'západu/severozápadu',
- 'severozápadu',
- 'severu/severozápadu',
- 'severu');
- $this->strings['wind_dir_short'] = array(
- 'S',
- 'SSV',
- 'SV',
- 'VSV',
- 'V',
- 'VJV',
- 'JV',
- 'JJV',
- 'J',
- 'JJZ',
- 'JZ',
- 'ZJZ',
- 'Z',
- 'ZSZ',
- 'SZ',
- 'SSZ',
- 'S');
- $this->strings['wind_dir_short_long'] = array(
- 'S' => 'sever',
- 'SV' => 'severovýchod',
- 'V' => 'východ',
- 'JV' => 'juhovýchod',
- 'J' => 'juh',
- 'JZ' => 'juhozápad',
- 'Z' => 'západ',
- 'SZ' => 'severozápad'
- );
- $this->strings['temperature'] = 'Teplota bola ';
- $this->strings['dew_point'] = ' s rosným bodom ';
- $this->strings['altimeter'] = 'Atmosférický tlak bol ';
- $this->strings['hPa'] = ' hPa';
- $this->strings['inHg'] = ' inHg';
- $this->strings['rel_humidity'] = 'Relatívna vlhkos» vzduchu bola ';
- $this->strings['feelslike'] = 'Teplota sa zdala by» ';
- $this->strings['cloud_group_beg'] = 'Na oblohe boli ';
- $this->strings['cloud_group_end'] = '.';
- $this->strings['cloud_clear'] = 'Obloha bola %sjasná%s.';
- $this->strings['cloud_height'] = ' oblaky vo vý¹ke ';
- $this->strings['cloud_overcast'] = ' obloha bola %szamraèená%s od vý¹ky ';
- $this->strings['cloud_vertical_visibility'] = '%svertikálna viditeµnos»%s bola ';
- $this->strings['cloud_condition'] =
- array(
- 'SKC' => 'priehµadné',
- 'CLR' => 'jasné',
- 'FEW' => 'niektoré', /*'niekoµko',*/
- 'SCT' => 'rozptýlené',
- 'BKN' => 'zatiahnuté',
- 'OVC' => 'zamraèené');
- $this->strings['cumulonimbus'] = ' cumulonimbus';
- $this->strings['towering_cumulus'] = ' týèiace sa nahromadené';
- $this->strings['cavok'] = ' ¾iadne oblaky pod %s a ani ¾iadne iné nahromadené oblaky';
- $this->strings['currently'] = 'Aktuálnym poèasím bolo ';
- $this->strings['weather'] =
- array(
- /* Intensity */
- '-' => ' riedky ',
- ' ' => ' stredný ',
- '+' => ' hustý ',
- /* Proximity */
- 'VC' => ' v priµahlých oblastiach',
- /* Descriptor */
- 'PR' => ' èiastoèný',
- 'BC' => ' areály',
- 'MI' => ' plytký',
- 'DR' => ' slabé prúdenie vzduchu',
- 'BL' => ' veterno',
- 'SH' => ' prehánky',
- 'TS' => ' búrka s bleskami',
- 'FZ' => ' mrznutie',
- /* Precipitation */
- 'DZ' => ' mrholenie s veµkými kvapkami',
- 'RA' => ' dá¾ï', /* ' da¾divo', */
- 'SN' => ' sne¾enie',
- 'SG' => ' zrnité sne¾enie',
- 'IC' => ' µadové kry¹táliky',
- 'PL' => ' µadovec',
- 'GR' => ' krupobytie',
- 'GS' => ' slabé krupobytie',
- 'UP' => ' neznáme',
- /* Obscuration */
- 'BR' => ' hmlový opar nad vodami',
- 'FG' => ' hmlisto',
- 'FU' => ' dymno',
- 'VA' => ' sopeèný popol',
- 'DU' => ' popra¹ok',
- 'SA' => ' piesoèno', /* piesoèné */
- 'HZ' => ' opar nad pohorím',
- 'PY' => ' mrholenie s malými kvapôèkami',
- /* Other */
- 'PO' => ' piesoèné výry',
- 'SQ' => ' prudký závan vetra',
- 'FC' => ' prietr¾ mraèien',
- 'SS' => ' pra¹ná priesoèná búrka');
- $this->strings['visibility'] = 'Celková viditeµnos» bola ';
- $this->strings['visibility_greater_than'] = 'väè¹ia ako ';
- $this->strings['visibility_less_than'] = 'men¹ia ako ';
- $this->strings['visibility_to'] = ' do ';
- /* this is left untranslated, because I have no metar,
- that use this text
- -- Nepto [14/07/2002] */
- $this->strings['runway_upward_tendency'] = ' with an %supward%s tendency';
- $this->strings['runway_downward_tendency'] = ' with a %sdownward%s tendency';
- $this->strings['runway_no_tendency'] = ' with %sno distinct%s tendency';
- $this->strings['runway_between'] = 'between ';
- $this->strings['runway_left'] = ' left';
- $this->strings['runway_central'] = ' central';
- $this->strings['runway_right'] = ' right';
- $this->strings['runway_visibility'] = 'Viditeµnos» bola ';
- $this->strings['runway_for_runway'] = ' for runway ';
+ /**
+ * This constructor provides all the strings used.
+ *
+ * @param array This is just passed on to pw_text().
+ */
+ function pw_text_sk($weather, $input = array())
+ {
+ $this->strings['charset'] = 'ISO-8859-2';
+ $this->strings['no_data'] = '¥utujem, momentálne nie sú dostupné ¾iadne informácie pre %s%s%s.';
+ $this->strings['list_sentences_and'] = ' a ';
+ $this->strings['list_sentences_comma'] = ', ';
+ $this->strings['list_sentences_final_and'] = ' a ';
+ $this->strings['location'] = 'Toto je meterologický report pre %s%s%s.';
+ $this->strings['minutes'] = ' minútami';
+ $this->strings['time_format'] = 'Report bol zostavený pred %s, o %s%s%s UTC.';
+ $this->strings['time_minutes'] = 'a %s%s%s minútami';
+ $this->strings['time_one_hour'] = '%sjednou%s hodinou %s';
+ $this->strings['time_several_hours'] = '%s%s%s hodinami %s';
+ $this->strings['time_a_moment'] = 'práve teraz';
+ $this->strings['meters_per_second'] = ' metrov za sekundu';
+ $this->strings['miles_per_hour'] = ' míµ za hodinu';
+ $this->strings['meter'] = ' metrov';
+ $this->strings['meters'] = ' metre';
+ $this->strings['feet'] = ' stôp';
+ $this->strings['kilometers'] = ' kilometrov';
+ $this->strings['miles'] = ' míl';
+ $this->strings['and'] = ' a ';
+ $this->strings['plus'] = ' plus ';
+ $this->strings['with'] = ' s ';
+ $this->strings['wind_blowing'] = 'Rýchlos» vetra bola ';
+ $this->strings['wind_with_gusts'] = ' so silným závanom od ';
+ $this->strings['wind_from'] = ' z ';
+ $this->strings['wind_variable'] = ' z %srôznych%s smerov';
+ $this->strings['wind_varying'] = ', meniaca sa medzi smerom z %s%s%s (%s%s°%s) a %s%s%s (%s%s°%s)';
+ $this->strings['wind_calm'] = 'Vietor bol %spokojný%s';
+ $this->strings['wind_dir'] =
+ array('severu',
+ 'severu/severovýchodu',
+ 'severovýchodu',
+ 'východu/severovýchodu',
+ 'východu',
+ 'východu/juhovýchodu',
+ 'juhovýchodu',
+ 'juhu/juhovýchodu',
+ 'juhu',
+ 'juhu/juhozápadu',
+ 'juhozápadu',
+ 'západu/juhozápadu',
+ 'západu',
+ 'západu/severozápadu',
+ 'severozápadu',
+ 'severu/severozápadu',
+ 'severu');
+ $this->strings['wind_dir_short'] =
+ array('S',
+ 'SSV',
+ 'SV',
+ 'VSV',
+ 'V',
+ 'VJV',
+ 'JV',
+ 'JJV',
+ 'J',
+ 'JJZ',
+ 'JZ',
+ 'ZJZ',
+ 'Z',
+ 'ZSZ',
+ 'SZ',
+ 'SSZ',
+ 'S');
+ $this->strings['wind_dir_short_long'] =
+ array('S' => 'sever',
+ 'SV' => 'severovýchod',
+ 'V' => 'východ',
+ 'JV' => 'juhovýchod',
+ 'J' => 'juh',
+ 'JZ' => 'juhozápad',
+ 'Z' => 'západ',
+ 'SZ' => 'severozápad');
+ $this->strings['temperature'] = 'Teplota bola ';
+ $this->strings['dew_point'] = ' s rosným bodom ';
+ $this->strings['altimeter'] = 'Atmosférický tlak bol ';
+ $this->strings['hPa'] = ' hPa';
+ $this->strings['inHg'] = ' inHg';
+ $this->strings['rel_humidity'] = 'Relatívna vlhkos» vzduchu bola ';
+ $this->strings['feelslike'] = 'Teplota sa zdala by» ';
+ $this->strings['cloud_group_beg'] = 'Na oblohe boli ';
+ $this->strings['cloud_group_end'] = '.';
+ $this->strings['cloud_clear'] = 'Obloha bola %sjasná%s.';
+ $this->strings['cloud_height'] = ' oblaky vo vý¹ke ';
+ $this->strings['cloud_overcast'] = ' obloha bola %szamraèená%s od vý¹ky ';
+ $this->strings['cloud_vertical_visibility'] = '%svertikálna viditeµnos»%s bola ';
+ $this->strings['cloud_condition'] =
+ array('SKC' => 'priehµadné',
+ 'CLR' => 'jasné',
+ 'FEW' => 'niektoré', /*'niekoµko',*/
+ 'SCT' => 'rozptýlené',
+ 'BKN' => 'zatiahnuté',
+ 'OVC' => 'zamraèené');
+ $this->strings['cumulonimbus'] = ' cumulonimbus';
+ $this->strings['towering_cumulus'] = ' týèiace sa nahromadené';
+ $this->strings['cavok'] = ' ¾iadne oblaky pod %s a ani ¾iadne iné nahromadené oblaky';
+ $this->strings['currently'] = 'Aktuálnym poèasím bolo ';
+ $this->strings['weather'] =
+ array(/* Intensity */
+ '-' => ' riedky ',
+ ' ' => ' stredný ',
+ '+' => ' hustý ',
+ /* Proximity */
+ 'VC' => ' v priµahlých oblastiach',
+ /* Descriptor */
+ 'PR' => ' èiastoèný',
+ 'BC' => ' areály',
+ 'MI' => ' plytký',
+ 'DR' => ' slabé prúdenie vzduchu',
+ 'BL' => ' veterno',
+ 'SH' => ' prehánky',
+ 'TS' => ' búrka s bleskami',
+ 'FZ' => ' mrznutie',
+ /* Precipitation */
+ 'DZ' => ' mrholenie s veµkými kvapkami',
+ 'RA' => ' dá¾ï', /* ' da¾divo', */
+ 'SN' => ' sne¾enie',
+ 'SG' => ' zrnité sne¾enie',
+ 'IC' => ' µadové kry¹táliky',
+ 'PL' => ' µadovec',
+ 'GR' => ' krupobytie',
+ 'GS' => ' slabé krupobytie',
+ 'UP' => ' neznáme',
+ /* Obscuration */
+ 'BR' => ' hmlový opar nad vodami',
+ 'FG' => ' hmlisto',
+ 'FU' => ' dymno',
+ 'VA' => ' sopeèný popol',
+ 'DU' => ' popra¹ok',
+ 'SA' => ' piesoèno', /* piesoèné */
+ 'HZ' => ' opar nad pohorím',
+ 'PY' => ' mrholenie s malými kvapôèkami',
+ /* Other */
+ 'PO' => ' piesoèné výry',
+ 'SQ' => ' prudký závan vetra',
+ 'FC' => ' prietr¾ mraèien',
+ 'SS' => ' pra¹ná priesoèná búrka');
+ $this->strings['visibility'] = 'Celková viditeµnos» bola ';
+ $this->strings['visibility_greater_than'] = 'väè¹ia ako ';
+ $this->strings['visibility_less_than'] = 'men¹ia ako ';
+ $this->strings['visibility_to'] = ' do ';
+ /* this is left untranslated, because I have no metar, that use
+ * this text -- Nepto [14/07/2002] */
+ $this->strings['runway_upward_tendency'] = ' with an %supward%s tendency';
+ $this->strings['runway_downward_tendency'] = ' with a %sdownward%s tendency';
+ $this->strings['runway_no_tendency'] = ' with %sno distinct%s tendency';
+ $this->strings['runway_between'] = 'between ';
+ $this->strings['runway_left'] = ' left';
+ $this->strings['runway_central'] = ' central';
+ $this->strings['runway_right'] = ' right';
+ $this->strings['runway_visibility'] = 'Viditeµnos» bola ';
+ $this->strings['runway_for_runway'] = ' for runway ';
+
+ /* We run the parent constructor */
+ $this->pw_text($weather, $input);
+ }
+
+ function print_pretty_wind($wind)
+ {
+ extract($wind);
+
+ if (! empty($meters_per_second)) {
+ switch ($meters_per_second) {
+ case 1:
+ $this->strings['meters_per_second'] = ' meter za sekundu';
+ break;
+ case 2:
+ case 3:
+ case 4:
+ $this->strings['meters_per_second'] = ' metre za sekundu';
+ break;
+ default:
+ if ($meters_per_second - floor($meters_per_second) > 0)
+ $this->strings['meters_per_second'] = ' metra za sekundu';
+ break;
+ }
+ }
+ if (! empty($miles_per_hour)) {
+ switch ($miles_per_hour) {
+ case 1:
+ $this->strings['miles_per_hour'] = ' míµa za hodinu';
+ break;
+ case 2:
+ case 3:
+ case 4:
+ $this->strings['miles_per_hour'] = ' míle za hodinu';
+ break;
+ }
+ }
+
+ /*
+ * Z/ZO grammar handling
+ * zo severu, z juhu, zo zapadu, z vychodu
+ */
+ if (isset($deg)) {
+ if ($deg == 'VRB') {
+ } else {
+ $idx = intval(round($deg / 22.5));
+ if ($idx <= 2 || $idx >= 11) {
+ $this->strings['wind_from'] =
+ str_replace(' z ', ' zo ', $this->strings['wind_from']);
+ }
+ }
+ }
+
+ if (isset($var_beg)) {
+ $idx = intval(round($var_beg / 22.5));
+ if ($idx <= 2 || $idx >= 11) {
+ $this->strings['wind_varying'] =
+ str_replace(' z ', ' zo ', $this->strings['wind_varying']);
+ }
+ }
+
+ return parent::print_pretty_wind($wind);
+ }
+
+ function parse_cloud_group($cloud_group)
+ {
+ extract($cloud_group);
+
+ if (isset($condition) && $condition == 'CAVOK') {
+ $this->strings['cloud_group_beg'] =
+ str_replace(' boli ', ' neboli ', $this->strings['cloud_group_beg']);
+ }
+
+ return parent::parse_cloud_group($cloud_group);
+ }
+
+ function print_pretty_time($time)
+ {
+ $minutes_old = round((time() - $time)/60);
+ if ($minutes_old > 60) {
+ $minutes = $minutes_old % 60;
+ if ($minutes == 1) {
+ $this->strings['time_minutes'] = 'a %s%s%s minútou';
+ }
+ } else {
+ if ($minutes_old < 5) {
+ /* we must remove word 'pred', because we wanted string:
+ * 'Report bol zostavený prave teraz, ...' */
+ $this->strings['time_format'] =
+ str_replace(' pred ', ' ', $this->strings['time_format']);
+ }
+ }
+
+ return parent::print_pretty_time($time);
+ }
+
+ function print_pretty_weather($weather)
+ {
+ if ($weather[0]['descriptor'] == 'SH') {
+ $this->strings['currently'] = str_replace(' bolo ', ' boli ',
+ $this->strings['currently']);
+ if ($weather[0]['precipitation'] == 'RA') {
+ $this->strings['weather']['-'] = ' riedkeho ';
+ $this->strings['weather'][' '] = ' stredného ';
+ $this->strings['weather']['+'] = ' hustého ';
+ $this->strings['weather']['RA'] = ' da¾ïa';
+ }
+ } elseif ($weather[0]['precipitation'] == 'RA'
+ || $weather[0]['obscuration'] == 'HZ') {
+ $this->strings['currently'] = str_replace(' bolo ', ' bol ',
+ $this->strings['currently']);
+ }
- /* We run the parent constructor */
- $this->pw_text($weather, $input);
- }
-
- function print_pretty_wind($wind)
- {
- extract($wind);
-
- if (! empty($meters_per_second)) {
- switch ($meters_per_second) {
- case 1:
- $this->strings['meters_per_second'] = ' meter za sekundu';
- break;
- case 2:
- case 3:
- case 4:
- $this->strings['meters_per_second'] = ' metre za sekundu';
- break;
- default:
- if ($meters_per_second - floor($meters_per_second) > 0)
- $this->strings['meters_per_second'] = ' metra za sekundu';
- break;
- }
- }
- if (! empty($miles_per_hour)) {
- switch ($miles_per_hour) {
- case 1:
- $this->strings['miles_per_hour'] = ' míµa za hodinu';
- break;
- case 2:
- case 3:
- case 4:
- $this->strings['miles_per_hour'] = ' míle za hodinu';
- break;
- }
- }
-
- /*
- * Z/ZO grammar handling
- * zo severu, z juhu, zo zapadu, z vychodu
- */
- if (isset($deg)) {
- if ($deg == 'VRB') {
- } else {
- $idx = intval(round($deg / 22.5));
- if ($idx <= 2 || $idx >= 11) {
- $this->strings['wind_from'] =
- str_replace(' z ', ' zo ', $this->strings['wind_from']);
- }
- }
- }
-
- if (isset($var_beg)) {
- $idx = intval(round($var_beg / 22.5));
- if ($idx <= 2 || $idx >= 11) {
- $this->strings['wind_varying'] =
- str_replace(' z ', ' zo ', $this->strings['wind_varying']);
- }
- }
-
- return parent::print_pretty_wind($wind);
- }
-
- function parse_cloud_group($cloud_group)
- {
- extract($cloud_group);
-
- if (isset($condition) && $condition == 'CAVOK') {
- $this->strings['cloud_group_beg'] =
- str_replace(' boli ', ' neboli ', $this->strings['cloud_group_beg']);
- }
-
- return parent::parse_cloud_group($cloud_group);
- }
-
- function print_pretty_time($time)
- {
- $minutes_old = round((time() - $time)/60);
- if ($minutes_old > 60) {
- $minutes = $minutes_old % 60;
- if ($minutes == 1) {
- $this->strings['time_minutes'] = 'a %s%s%s minútou';
- }
- } else {
- if ($minutes_old < 5) {
- /* we must remove word 'pred', because we wanted string:
- 'Report bol zostavený prave teraz, ...' */
- $this->strings['time_format'] = str_replace(' pred ', ' ',
- $this->strings['time_format']);
- }
- }
-
- return parent::print_pretty_time($time);
- }
-
- function print_pretty_weather($weather)
- {
- if ($weather[0]['descriptor'] == 'SH') {
- $this->strings['currently'] = str_replace(' bolo ', ' boli ',
- $this->strings['currently']);
- if ($weather[0]['precipitation'] == 'RA') {
- $this->strings['weather']['-'] = ' riedkeho ';
- $this->strings['weather'][' '] = ' stredného ';
- $this->strings['weather']['+'] = ' hustého ';
- $this->strings['weather']['RA'] = ' da¾ïa';
- }
- } elseif ($weather[0]['precipitation'] == 'RA'
- || $weather[0]['obscuration'] == 'HZ') {
- $this->strings['currently'] = str_replace(' bolo ', ' bol ',
- $this->strings['currently']);
- }
-
- return parent::print_pretty_weather($weather);
- }
+ return parent::print_pretty_weather($weather);
+ }
}
/*
|