Loaded the weather module, excellent job. It seems that instead of 'kilometre' it is being spelt 'kilometer'.

Although to be fair I think it is the way that some countries spell it (just not mine), so it may be better introduced as a language module somehow. Or have the option to display "Kilometers, Kilometres, Miles' in the dropdown list. I must admit I don't know enough about php (yet), I might have a nosey to see how easy it would be to adjust things to make that a bit more flexible and submit a patch.

karearea@myserver:./drupal/modules/weather$ grep -R kilometers *

po/weather.pot:msgid "kilometers"
po/weather.pot:msgid "!visibility kilometers"
po/cs.po:msgid "kilometers"
po/cs.po:msgid "!visibility kilometers"
po/de.po:msgid "kilometers"
po/de.po:msgid "!visibility kilometers"
po/hu.po:msgid "kilometers"
po/hu.po:msgid "!visibility kilometers"
po/nl.po:msgid "kilometers"
po/nl.po:msgstr "kilometers"
po/nl.po:msgid "!visibility kilometers"
po/no.po:msgid "kilometers"
po/no.po:msgid "!visibility kilometers"
po/ru.po:msgid "kilometers"
po/ru.po:msgid "!visibility kilometers"
weather.install: 'a:4:{s:11:"temperature";s:7:"celsius";s:9:"windspeed";s:3:"kmh";s:8:"pressure";s:3:"hpa";s:10:"visibility";s:10:"kilometers";}',
weather.install: $result = db_query($sql, 'a:4:{s:11:"temperature";s:7:"celsius";s:9:"windspeed";s:3:"kmh";s:8:"pressure";s:3:"hpa";s:10:"visibility";s:10:"kilometers";}');
weather.install: $result = db_query($sql, 'a:4:{s:11:"temperature";s:7:"celsius";s:9:"windspeed";s:3:"kmh";s:8:"pressure";s:3:"hpa";s:10:"visibility";s:10:"kilometers";}');
weather.install: $result = db_query($sql, 'a:4:{s:11:"temperature";s:7:"celsius";s:9:"windspeed";s:3:"kmh";s:8:"pressure";s:3:"hpa";s:10:"visibility";s:10:"kilometers";}');
weather.module: if (isset($metar['visibility']['kilometers'])) {
weather.module: '#options' => array('kilometers' => t('kilometers'), 'miles' => t('miles')),
weather.module: $config['units'] = 'a:4:{s:11:"temperature";s:7:"celsius";s:9:"windspeed";s:3:"kmh";s:8:"pressure";s:3:"hpa";s:10:"visibility";s:10:"kilometers";}';
weather.module: return t('!visibility kilometers',
weather.module: array('!visibility' => $visibility['kilometers']));
weather_parser.inc: $metar['visibility']['kilometers'] = round($visibility * 1.609344, 1);
weather_parser.inc: $metar['visibility']['kilometers'] = round($matches[1] / 1000, 1);
weather_parser.inc: $metar['visibility']['miles'] = round($metar['visibility']['kilometers'] / 1.609344, 1);
weather_parser.inc: $metar['visibility']['kilometers'] = 10;
weather_parser.inc: $metar['visibility']['miles'] = round($metar['visibility']['kilometers'] / 1.609344, 1);

Comments

toddy’s picture

Assigned:Unassigned» toddy

Hi,

this is quite easy to fix. You just need to submit a .po file for your spelling variant. I think that "kilometer" is American English, while "kilometre" is British English, correct?

Regards,
Tobias

toddy’s picture

Status:Active» Closed (fixed)

Closing the issue for now; feel free to submit a .po file for your language variant.

Regards,
Tobias