CVS: phpweather/output pw_text_cs.php,NONE,1.1 pw_text_nl.php,NONE,1....
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-09-27 20:24:48
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv20949/output Added Files: pw_text_cs.php pw_text_nl.php Log Message: Added Dutch and Czech translations and updated the AUTHORS file with Bas Elshof <ba...@el...>, Václav Ríkal <va...@ph...> and Radoslava Fedáková <mor...@po...>. --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by pw_text to produce Czech * output. * * @author Václav Øíkal <va...@ph...> * @author Ondrej Jombík <ne...@po...> * @author Radoslava Fedáková <mor...@po...> * @link http://vac.ath.cx/ * @link http://www.nepto.sk/ Nepto.SK - homepage * @link http://www.platon.sk/ Platon software development group * * @version pw_text_cs.php,v 1.0 2002/09/22 21:13:40 gimpster Exp */ /* ViM 6.0 indentation used */ class pw_text_cs extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to pw_text(). */ function pw_text_cs($weather, $input = array()) { $this->strings['charset'] = 'ISO-8859-2'; $this->strings['no_data'] = 'Lituji, nejsou dostupné ¾ádné informace pro %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á zpráva leti¹tì %s%s%s.'; $this->strings['minutes'] = ' minutami'; $this->strings['time_format'] = 'Zpráva byla sestavena pøed %s, v %s%s%s UTC.'; $this->strings['time_minutes'] = 'a %s%s%s minutami'; $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ávì teï'; $this->strings['meters_per_second'] = ' metrù za sekundu'; $this->strings['miles_per_hour'] = ' mil za hodinu'; $this->strings['meter'] = ' metrù'; $this->strings['meters'] = ' metry'; $this->strings['feet'] = ' stop'; $this->strings['kilometers'] = ' kilometrù'; $this->strings['miles'] = ' mil'; $this->strings['and'] = ' a '; $this->strings['plus'] = ' plus '; $this->strings['with'] = ' s '; $this->strings['wind_blowing'] = 'Rychlost vìtru byla '; $this->strings['wind_with_gusts'] = ' se silnými nárazy od '; $this->strings['wind_from'] = ' z '; $this->strings['wind_variable'] = ' z %srùzných%s smìrù'; $this->strings['wind_varying'] = ', promìnlivý vítr od %s%s%s (%s%s°%s) a %s%s%s (%s%s°%s)'; $this->strings['wind_calm'] = 'Bylo %sbezvìtøí%s'; $this->strings['wind_dir'] = array('severu', 'severu/severovýchodu', 'severovýchodu', 'východu/severovýchodu', 'východu', 'východu/jihovýchodu', 'jihovýchodu', 'jihu/jihovýchodu', 'jihu', 'jihu/jihozápadu', 'jihozápadu', 'západu/jihozá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' => 'jihovýchod', 'J' => 'jih', 'JZ' => 'jihozápad', 'Z' => 'západ', 'SZ' => 'severozápad'); $this->strings['temperature'] = 'Teplota byla '; $this->strings['dew_point'] = ' a rosný bod byl '; $this->strings['altimeter'] = 'Atmosférický tlak byl '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Relativní vlhkost vzduchu byla '; $this->strings['feelslike'] = 'Teplota sa zdála být '; $this->strings['cloud_group_beg'] = 'Bylo '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Obloha byla %sjasná%s.'; $this->strings['cloud_height'] = ' se základnou mrakù ve vý¹ce '; $this->strings['cloud_overcast'] = ' obloha byla %szata¾ená%s od vý¹ky '; $this->strings['cloud_vertical_visibility'] = '%svertikální viditelnost%s byla '; $this->strings['cloud_condition'] = array('SKC' => 'jasno', 'CLR' => 'jasno', 'FEW' => 'skorojasno', /*'niekoµko',*/ 'SCT' => 'polojasno', 'BKN' => 'oblaèno', 'OVC' => 'zata¾eno'); $this->strings['cumulonimbus'] = ' cumulonimbus'; $this->strings['towering_cumulus'] = ' kupovitá oblaènost'; /*tyèíci se nahromadìné - to je pøece blbost*/ $this->strings['cavok'] = ' ¾ádná oblaènost pod %s ani ¾ádná kupovitá oblaènost'; $this->strings['currently'] = 'Aktuální poèasí: '; $this->strings['weather'] = array(/* Intensity */ '-' => ' slabý ', ' ' => ' støední ', '+' => ' silný ', /* Proximity */ 'VC' => ' v blízkosti', /* Descriptor */ 'PR' => ' pøevá¾nì pokrývající leti¹tì', 'BC' => ' pásy', 'MI' => ' pøízemní', 'DR' => ' nízko zvíøený', 'BL' => ' zvíøený', 'SH' => ' pøehánky', 'TS' => ' bouøka', 'FZ' => ' námrzající', /* Precipitation */ 'DZ' => ' mrholení', 'RA' => ' dé¹»', /* ' da¾divo', */ 'SN' => ' sníh', 'SG' => ' zrnitý sníh', 'IC' => ' ledové krystalky', 'PL' => ' zmrzlý dé¹»', 'GR' => ' kroupy', 'GS' => ' slabé krupobití', 'UP' => ' neznámé', /* Obscuration */ 'BR' => ' kouømo', 'FG' => ' mlha', 'FU' => ' kouø', 'VA' => ' vulkanický popel', 'DU' => ' pra¹no', 'SA' => ' písek', /* píseèné */ 'HZ' => ' zákal', 'PY' => ' mrholení s malými kapkami', /* Other */ 'PO' => ' píseèné víry', 'SQ' => ' húlava', 'FC' => ' prùtr¾ mraèen', 'SS' => ' pra¹ná/píseèná bouøe'); $this->strings['visibility'] = 'Celková viditenost byla '; $this->strings['visibility_greater_than'] = 'vìt¹í ne¾ '; $this->strings['visibility_less_than'] = 'men¹í ne¾ '; $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'] = ' metr za sekundu'; break; case 2: case 3: case 4: $this->strings['meters_per_second'] = ' metrù za sekundu'; break; default: if ($meters_per_second - floor($meters_per_second) > 0) $this->strings['meters_per_second'] = ' metru za sekundu'; break; } } if (! empty($miles_per_hour)) { switch ($miles_per_hour) { case 1: $this->strings['miles_per_hour'] = ' míle za hodinu'; break; case 2: case 3: case 4: $this->strings['miles_per_hour'] = ' mil za hodinu'; break; } } /* * Z/ZO grammar handling * ze severu, z jihu, ze západu, z východu */ 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 ', ' ze ', $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 ', ' ze ', $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(' byla ', ' nebyla ', $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 minutou'; } } else { if ($minutes_old < 5) { /* we must remove word 'pøed', because we wanted string: * 'Report bol zostavený prave teraz, ...' */ $this->strings['time_format'] = str_replace(' pøed ', ' ', $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(' bylo ', ' byly ', $this->strings['currently']); if ($weather[0]['precipitation'] == 'RA') { $this->strings['weather']['-'] = ' slabého '; $this->strings['weather'][' '] = ' støedního '; $this->strings['weather']['+'] = ' hustého '; $this->strings['weather']['RA'] = ' de¹tì'; } } elseif ($weather[0]['precipitation'] == 'RA' || $weather[0]['obscuration'] == 'HZ') { $this->strings['currently'] = str_replace(' bylo ', ' byl ', $this->strings['currently']); } return parent::print_pretty_weather($weather); } } /* NOTES: ------ Metars to test: +----+------+---------------------------------------------------------------------------------+ | cc | icao | metar | +----+------+---------------------------------------------------------------------------------+ | FI | EFKK | EFKK 281950Z 18008KT 150V220 9999 -SHRA FEW012 SCT016 BKN020 BKN075 12/12 Q0998 | | KH | VDPP | VDPP 281030Z 23008KT 9000 FEW015 FEW025CB SCT300 33/26 Q1008 CB:S/NW/E | +----+------+---------------------------------------------------------------------------------+ Why is there backslash instead of slash in Airport name? cc=DJ&icao=HDAM Problematic metars: 201530Z VABB 24012KT 5000 FU FEW018 SCT025 28/22 Q1004 NOSIG MWCR 2820000Z 12016KT 9999 HZ FEW016 BKN200 32/25 Q1015 NOSIG CYZT 281900Z 10019G26KT 20SM VCSH FEW025 BKN050 OVC110 13/09 A2956 RMK SC1SC6AC2 SLP009 */ ?> --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by pw_text to produce Dutch * output. * * @author Bas Elshof <ba...@el...> * @link http://www.elshof.de/ My homepage. * @version pw_text_nl.php,v 1.3 2002/09/26 21:13:40 gimpster Exp */ /* ViM 6.0 indentation used */ class pw_text_nl extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to pw_text(). */ function pw_text_nl($weather, $input = array()) { $this->strings['charset'] = 'ISO-8859-1'; $this->strings['no_data'] = 'Sorry! Er is geen informatie beschikbaar voor %s%s%s.'; $this->strings['list_sentences_and'] = ' en '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', en '; $this->strings['location'] = 'Dit is het bericht voor %s%s%s.'; $this->strings['minutes'] = ' minuten'; $this->strings['time_format'] = 'Dit bericht werd %s geleden gemaakt, om %s%s%s UTC.'; $this->strings['time_minutes'] = 'en %s%s%s minuten'; $this->strings['time_one_hour'] = '%seen%s uur %s'; $this->strings['time_several_hours'] = '%s%s%s uur %s'; $this->strings['time_a_moment'] = 'een moment'; $this->strings['meters_per_second'] = ' meter per seconde'; $this->strings['miles_per_hour'] = ' meil per uur'; $this->strings['meter'] = ' meter'; $this->strings['meters'] = ' meter'; $this->strings['feet'] = ' voet'; $this->strings['kilometers'] = ' kilometer'; $this->strings['miles'] = ' meil'; $this->strings['and'] = ' en '; $this->strings['plus'] = ' plus '; $this->strings['with'] = ' met '; $this->strings['wind_blowing'] = 'De wind waaide met een snelheid van '; $this->strings['wind_with_gusts'] = ' met rukwinden tot '; $this->strings['wind_from'] = ' uit het '; $this->strings['wind_variable'] = ' uit %sverschillende%s richtingen.'; $this->strings['wind_varying'] = ', varierend tussen het %s%s%s (%s%s°%s) en het %s%s%s (%s%s°%s)'; $this->strings['wind_calm'] = 'De wind was %rustig%s'; $this->strings['wind_dir'] = array( 'noorden', 'noord/noordoosten', 'noordoosten', 'oost/noordoosten', 'oosten', 'oost/zuidoosten', 'zuidoosten', 'zuid/zuidoosten', 'zuiden', 'zuid/zuidwesten', 'zuidwesten', 'west/zuidwesten', 'westen', 'west/noordwesten', 'noordwesten', 'noord/noordwesten', 'noorden'); $this->strings['wind_dir_short'] = array( 'N', 'NNO', 'NO', 'ONO', 'O', 'OZO', 'ZO', 'ZZO', 'Z', 'ZZW', 'ZW', 'WZW', 'W', 'WNW', 'NW', 'NNW', 'N'); $this->strings['wind_dir_short_long'] = array( 'N' => 'noord', 'NE' => 'noordoost', 'E' => 'oost', 'SE' => 'zuidoost', 'S' => 'zuid', 'SW' => 'zuidwest', 'W' => 'west', 'NW' => 'noordwest' ); $this->strings['temperature'] = 'De temperatuur was '; $this->strings['dew_point'] = ', met het dauwpunt bij '; $this->strings['altimeter'] = 'De atmosferische druk was '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'De relative luchtvochtigheid was '; $this->strings['feelslike'] = 'De gevoelstemperatuur was '; $this->strings['cloud_group_beg'] = 'Er was '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'De lucht was %sklaar%s.'; $this->strings['cloud_height'] = ' bewolking op een hoogte van '; $this->strings['cloud_overcast'] = 'De lucht was %sbewolkt%s vanaf een hoogte van '; $this->strings['cloud_vertical_visibility'] = 'het %svertikale zicht%s was '; $this->strings['cloud_condition'] = array( 'SKC' => 'klaar', 'CLR' => 'klaar', 'FEW' => 'sporadische', 'SCT' => 'verspreide', 'BKN' => 'gebroken', 'OVC' => 'bewolkt'); $this->strings['cumulonimbus'] = ' cumulonimbus'; $this->strings['towering_cumulus'] = ' stapelwolken'; $this->strings['cavok'] = ' geen wolken beneden %s en geen cumulonimbus wolken'; $this->strings['currently'] = 'Momentaan '; $this->strings['weather'] = array( '-' => ' lichte', ' ' => ' matige ', '+' => ' zware ', 'VC' => ' in de omgeving', 'PR' => ' gedeeltelijk', 'BC' => ' banken', 'MI' => ' laaghangende', 'DR' => ' laag opwaaiende', 'BL' => ' hoog opwaaiende', 'SH' => ' buien', 'TS' => ' onweer', 'FZ' => ' aanvriezende', 'DZ' => ' motregen', 'RA' => ' regen', 'SN' => ' sneeuw', 'SG' => ' motsneeuw', 'IC' => ' ijsnaalden', 'PL' => ' ijsregen', /* 'PE' => ' ijsregen', change in the METAR code for ice pellets from "PE" to "PL." Observers will be directed to code ice pellets as "PE" prior to 00:00 coordinated universal time November 5, 1998, and "PL" thereafter. */ 'GR' => ' hagel', 'GS' => ' korrelhagel', 'UP' => ' onbekend', 'BR' => ' nevel', 'FG' => ' mist', 'FU' => ' rook', 'VA' => ' vulkanische as', 'DU' => ' verspreid stof', 'SA' => ' zand', 'HZ' => ' heiigheid', 'PY' => ' opstuivend water', 'PO' => ' goed ontwikkelde stof- of zandhoosjes', 'SQ' => ' squalls', 'FC' => ' slurf of lichte wind- of waterhoos', 'SS' => ' zandstorm', 'DS' => ' stofstorm'); /* added according to several infos on the www */ $this->strings['visibility'] = 'Het algemene zicht was '; $this->strings['visibility_greater_than'] = 'meer dan '; $this->strings['visibility_less_than'] = 'minder dan '; $this->strings['visibility_to'] = ' tot de '; $this->strings['runway_upward_tendency'] = ' met een %ssteigende%s tendens'; $this->strings['runway_downward_tendency'] = ' met een %svallende%s tendens'; $this->strings['runway_no_tendency'] = ' met %sgeen waarneembare%s tendens'; $this->strings['runway_between'] = 'tussen '; $this->strings['runway_left'] = ' links'; $this->strings['runway_central'] = ' centraal'; $this->strings['runway_right'] = ' rechts'; $this->strings['runway_visibility'] = 'Het zicht was '; $this->strings['runway_for_runway'] = ' voor de start- landingsbaan '; /* We run the parent constructor */ $this->pw_text($weather, $input); } } ?> |