Commit 75bdefd7 authored by Gregor Anzelj's avatar Gregor Anzelj Committed by Richard Mansfield

Fix untranslated month names in pieform date element

Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent d7af3fbc
......@@ -56,8 +56,9 @@ function pieform_element_date(Pieform $form, $element) {/*{{{*/
$month = '<select name="' . $name . '_month" id="' . $name . '_month"'
. (!$required && !isset($element['defaultvalue']) ? ' disabled="disabled"' : '')
. ' tabindex="' . $element['tabindex'] . "\">\n";
$monthnames = explode(',', $form->i18n('element', 'date', 'monthnames', $element));
for ($i = 1; $i <= 12; $i++) {
$month .= "\t<option value=\"$i\"" . (($value == $i) ? ' selected="selected"' : '') . '>' . date('M', strtotime("2000-$i-01")) . "</option>\n";
$month .= "\t<option value=\"$i\"" . (($value == $i) ? ' selected="selected"' : '') . '>' . $monthnames[$i-1] . "</option>\n";
}
$month .= "</select>\n";
......@@ -131,34 +132,44 @@ function pieform_element_date_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'or' => 'or',
'monthnames' => 'January,February,March,April,May,June,July,August,September,October,November,December',
'notspecified' => 'Not specified'
),
'de.utf8' => array(
'or' => 'oder',
'monthnames' => 'Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember',
'notspecified' => 'Nicht festgelegt'
),
'fr.utf8' => array(
'or' => 'ou',
'monthnames' => 'janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre',
'notspecified' => 'Non indiqué'
),
'ja.utf8' => array(
'or' => 'or',
'monthnames' => '一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月',
'notspecified' => '指定なし'
),
'es.utf8' => array(
'or' => 'o',
'monthnames' => 'enero,febrero,marzo,abril,mayo,junio,julio,agosto,septiembre,octubre,noviembre,diciembre',
'notspecified' => 'Sin valor'
),
'sl.utf8' => array(
'or' => 'ali',
'monthnames' => 'januar,febuar,marec,april,maj,junij,julij,avgust,september,oktober,november,december',
// standardized set of archaic Slovenian month names
//'monthnames' => 'prosinec,svečan,sušec,mali traven,veliki traven,rožnik,mali srpan,veliki srpan,kimovec,vinotok,listopad,gruden',
'notspecified' => 'Ni določeno'
),
'nl.utf8' => array(
'or' => 'or',
'monthnames' => 'januari,februari,mart,april,mei,juni,juli,augustus,september,october,november,december',
'notspecified' => 'Niet gespecifiëerd'
),
'cs.utf8' => array(
'or' => 'nebo',
'monthnames' => 'leden,únor,březen,duben,květen,červen,červenec,srpen,září,říjen,listopad,prosinec',
'notspecified' => 'Neurčeno'
),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment