Commit 05ec7802 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Get pieforms strings from Mahara language packs


Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent efd7ed76
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2009 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage lang
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2009 Catalyst IT Ltd http://catalyst.net.nz
*
*/
defined('INTERNAL') || die();
$string['element.bytes.bytes'] = 'Bytes';
$string['element.bytes.kilobytes'] = 'Kilobytes';
$string['element.bytes.megabytes'] = 'Megabytes';
$string['element.bytes.gigabytes'] = 'Gigabytes';
$string['element.bytes.invalidvalue'] = 'Value must be a number';
$string['element.calendar.invalidvalue'] = 'Invalid date/time specified';
$string['element.date.or'] = 'or';
$string['element.date.monthnames'] = 'January,February,March,April,May,June,July,August,September,October,November,December';
$string['element.date.notspecified'] = 'Not specified';
$string['element.expiry.days'] = 'Days';
$string['element.expiry.weeks'] = 'Weeks';
$string['element.expiry.months'] = 'Months';
$string['element.expiry.years'] = 'Years';
$string['element.expiry.noenddate'] = 'No end date';
$string['rule.before.before'] = 'This can not be after the field "%s"';
$string['rule.email.email'] = 'E-mail address is invalid';
$string['rule.integer.integer'] = 'The field must be an integer';
$string['rule.maxlength.maxlength'] = 'This field must be at most %d characters long';
$string['rule.minlength.minlength'] = 'This field must be at least %d characters long';
$string['rule.minvalue.minvalue'] = 'This value can not be smaller than %d';
$string['rule.regex.regex'] = 'This field is not in valid form';
$string['rule.required.required'] = 'This field is required';
$string['rule.validateoptions.validateoptions'] = 'The option "%s" is invalid';
$string['rule.maxvalue.maxvalue'] = 'This value can not be larger than %d';
......@@ -1182,23 +1182,8 @@ EOF;
return $this->data['rulei18n'][$key];
}
// Fall back to the default string
$this->include_plugin($plugin, $pluginname);
$function = 'pieform_' . $plugin . '_' . $pluginname . '_i18n';
if (function_exists($function)) {
$strings = $function();
if (isset($strings[$this->data['language']][$key])) {
return $strings[$this->data['language']][$key];
}
// If all else fails, try to get the string in the default language.
if (isset($strings[$this->defaults['language']][$key])) {
return $strings[$this->defaults['language']][$key];
}
return '[[' . $key . '/' . $this->data['language'] . ']]';
}
return get_raw_string($plugin . '.' . $pluginname . '.' . $key, 'pieforms');
// We don't recognise this string
return '[[' . $key . ']]';
}/*}}}*/
/**
......
......@@ -122,75 +122,6 @@ function pieform_element_bytes_in($units) {/*{{{*/
};
}/*}}}*/
function pieform_element_bytes_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'bytes' => 'Bytes',
'kilobytes' => 'Kilobytes',
'megabytes' => 'Megabytes',
'gigabytes' => 'Gigabytes',
'invalidvalue' => 'Value must be a number',
),
'de.utf8' => array(
'bytes' => 'Bytes',
'kilobytes' => 'Kilobytes',
'megabytes' => 'Megabytes',
'gigabytes' => 'Gigabytes',
'invalidvalue' => 'Wert muss eine Zahl sein',
),
'fr.utf8' => array(
'bytes' => 'Octets',
'kilobytes' => 'Kilooctets',
'megabytes' => 'Mégaoctets',
'gigabytes' => 'Gigaoctets',
'invalidvalue' => 'Valeur doit être un nombre',
),
'ja.utf8' => array(
'bytes' => 'B',
'kilobytes' => 'KB',
'megabytes' => 'MB',
'gigabytes' => 'GB',
'invalidvalue' => '値は数値にしてください',
),
'es.utf8' => array(
'bytes' => 'Bytes',
'kilobytes' => 'Kilobytes',
'megabytes' => 'Megabytes',
'gigabytes' => 'Gigabytes',
'invalidvalue' => 'El valor debe ser un número',
),
'sl.utf8' => array(
'bytes' => 'B',
'kilobytes' => 'kB',
'megabytes' => 'MB',
'gigabytes' => 'GB',
'invalidvalue' => 'Vrednost mora biti število',
),
'nl.utf8' => array(
'bytes' => 'Bytes',
'kilobytes' => 'Kilobytes',
'megabytes' => 'Megabytes',
'gigabytes' => 'Gigabytes',
'invalidvalue' => 'Waarde moet een getal zijn',
),
'cs.utf8' => array(
'bytes' => 'B',
'kilobytes' => 'kB',
'megabytes' => 'MB',
'gigabytes' => 'GB',
'invalidvalue' => 'Hodnota musí být číselná',
),
'da.utf8' => array(
'bytes' => 'Bytes',
'kilobytes' => 'Kilobytes',
'megabytes' => 'Megabytes',
'gigabytes' => 'Gigabytes',
'invalidvalue' => 'Værdi skal være et tal',
),
);
}/*}}}*/
function pieform_element_bytes_get_bytes_units() {/*{{{*/
return array('bytes', 'kilobytes', 'megabytes', 'gigabytes');
}/*}}}*/
......
......@@ -146,41 +146,3 @@ function pieform_element_calendar_get_value(Pieform $form, $element) {/*{{{*/
return null;
}/*}}}*/
/**
* i18n for calendar
*/
function pieform_element_calendar_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'invalidvalue' => 'Invalid date/time specified'
),
'de.utf8' => array(
'invalidvalue' => 'Datum/Zeit sind falsch festgelegt'
),
'fr.utf8' => array(
'invalidvalue' => 'Date/Heure indiquée invalide'
),
'ja.utf8' => array(
'invalidvalue' => '無効な日付/時間が指定されました'
),
'es.utf8' => array(
'invalidvalue' => 'Fecha/hora indicada inválida'
),
'sl.utf8' => array(
'invalidvalue' => 'Datum/čas ni določen pravilno'
),
'nl.utf8' => array(
'invalidvalue' => 'Ongeldige tijd/datum opgegeven'
),
'cs.utf8' => array(
'invalidvalue' => 'Neplatný datum/čas'
),
'da.utf8' => array(
'invalidvalue' => 'Forkert angivelse af dato/klokkeslæt'
),
);
}/*}}}*/
?>
......@@ -128,58 +128,6 @@ function pieform_element_date_get_value(Pieform $form, $element) {/*{{{*/
return null;
}/*}}}*/
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'
),
'da.utf8' => array(
'or' => 'eller',
'monthnames' => 'januar,februar,marts,april,maj,juni,juli,august,september,oktober,november,december',
'notspecified' => 'Ikke angivet'
),
);
}/*}}}*/
/** helper: used when rendering the element, to get the value for it */
function pieform_element_date_get_timeperiod_value($timeperiod, $min, $max, $element, Pieform $form) {/*{{{*/
......
......@@ -123,75 +123,6 @@ function pieform_element_expiry_get_value(Pieform $form, $element) {/*{{{*/
return $number * pieform_element_expiry_seconds_in($unit);
}/*}}}*/
function pieform_element_expiry_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'days' => 'Days',
'weeks' => 'Weeks',
'months' => 'Months',
'years' => 'Years',
'noenddate' => 'No end date'
),
'de.utf8' => array(
'days' => 'Tage',
'weeks' => 'Wochen',
'months' => 'Monate',
'years' => 'Jahre',
'noenddate' => 'kein Endedatum'
),
'fr.utf8' => array(
'days' => 'Jours',
'weeks' => 'Semaines',
'months' => 'Mois',
'years' => 'Années',
'noenddate' => 'Pas de date de fin'
),
'ja.utf8' => array(
'days' => '日',
'weeks' => '週',
'months' => '月',
'years' => '年',
'noenddate' => '終了日なし'
),
'es.utf8' => array(
'days' => 'Días',
'weeks' => 'Semanas',
'months' => 'Meses',
'years' => 'Años',
'noenddate' => 'Sin fecha de finalización'
),
'sl.utf8' => array(
'days' => 'dni',
'weeks' => 'tednov',
'months' => 'mesecev',
'years' => 'let',
'noenddate' => 'ni zaključnega datuma'
),
'nl.utf8' => array(
'days' => 'Dagen',
'weeks' => 'Weken',
'months' => 'Maanden',
'years' => 'Jaren',
'noenddate' => 'Geen einddatum'
),
'cs.utf8' => array(
'days' => 'dnů',
'weeks' => 'týdnů',
'months' => 'měsíců',
'years' => 'roků',
'noenddate' => 'nikdy'
),
'da.utf8' => array(
'days' => 'Dage',
'weeks' => 'Uger',
'months' => 'Måneder',
'years' => 'År',
'noenddate' => 'Ingen slutdato'
),
);
}/*}}}*/
function pieform_element_expire_get_expiry_units() {/*{{{*/
return array('days', 'weeks', 'months', 'years', 'noenddate');
}/*}}}*/
......
......@@ -42,37 +42,3 @@ function pieform_rule_before(Pieform $form, $value, $element, $otherelement) {/*
return sprintf($form->i18n('rule', 'before', 'before', $element), $otherelement['title']);
}
}/*}}}*/
function pieform_rule_before_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'before' => 'This can not be after the field "%s"'
),
'de.utf8' => array(
'before' => 'Dies kann nicht nach dem Feld "%s" sein'
),
'fr.utf8' => array(
'before' => 'Ceci ne peut pas être placé après le champ "%s"'
),
'ja.utf8' => array(
'before' => 'フィールド「 %s 」の後に設定することはできません'
),
'es.utf8' => array(
'before' => 'No puede ser posterior al campo "%s"'
),
'sl.utf8' => array(
'before' => 'To ne sme biti za poljem "%s"'
),
'nl.utf8' => array(
'before' => 'Dit kan niet na het veld "%s" zijn'
),
'cs.utf8' => array(
'before' => 'Zadaná hodnota nemůže být větší než v poli "%s"'
),
'da.utf8' => array(
'before' => 'Denne kan ikke være efter feltet "%s"'
),
);
}/*}}}*/
?>
......@@ -42,37 +42,3 @@ function pieform_rule_email(Pieform $form, $value, $element) {/*{{{*/
}
}/*}}}*/
function pieform_rule_email_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'email' => 'E-mail address is invalid'
),
'de.utf8' => array(
'email' => 'Die E-Mail Addresse ist ungültig'
),
'fr.utf8' => array(
'email' => 'Cette adresse de courriel n\'est pas valide'
),
'ja.utf8' => array(
'email' => 'メールアドレスが有効ではありません'
),
'es.utf8' => array(
'email' => 'Dirección de correo errónea'
),
'sl.utf8' => array(
'email' => 'Epoštni naslov je neveljaven'
),
'nl.utf8' => array(
'email' => 'E-mailadres is ongeldig'
),
'cs.utf8' => array(
'email' => 'Neplatná e-mailová adresa'
),
'da.utf8' => array(
'email' => 'E-mail adressen er invalid'
),
);
}/*}}}*/
?>
......@@ -39,38 +39,3 @@ function pieform_rule_integer(Pieform $form, $value, $element) {/*{{{*/
}
}/*}}}*/
function pieform_rule_integer_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'integer' => 'The field must be an integer'
),
'de.utf8' => array(
'integer' => 'Das Feld muss eine Zahl sein'
),
'fr.utf8' => array(
'integer' => 'Ce champ doit être un nombre entier'
),
'ja.utf8' => array(
'integer' => 'フィールドは整数にしてください'
),
'es.utf8' => array(
'integer' => 'Este campo debe ser un número entero'
),
'sl.utf8' => array(
'integer' => 'Vrednost polja mora biti število'
),
'nl.utf8' => array(
'integer' => 'Dit veld moet een geheel getal (integer) zijn'
),
'cs.utf8' => array(
'integer' => 'Musíte zadat celé číslo'
),
'da.utf8' => array(
'integer' => 'Dette felt skal være et heltal'
),
);
}/*}}}*/
?>
......@@ -39,37 +39,3 @@ function pieform_rule_maxlength(Pieform $form, $value, $element, $maxlength) {/*
}
}/*}}}*/
function pieform_rule_maxlength_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'maxlength' => 'This field must be at most %d characters long'
),
'de.utf8' => array(
'maxlength' => 'Das Feld darf höchstens %d Zeichen lang sein'
),
'fr.utf8' => array(
'maxlength' => 'Ce champ ne peut pas contenir plus de %d signes'
),
'ja.utf8' => array(
'maxlength' => 'このフィールドは、最大半角 %d 文字にしてください'
),
'es.utf8' => array(
'maxlength' => 'Este campo tiene que tener como máximo %d caracteres'
),
'sl.utf8' => array(
'maxlength' => 'To polje mora biti dolgo največ %d znakov'
),
'nl.utf8' => array(
'maxlength' => 'Dit veld moet minstens %d tekens lang zijn'
),
'cs.utf8' => array(
'maxlength' => 'Můžete zadat nejvýše %d znaků'
),
'da.utf8' => array(
'maxlength' => 'Dette felt må højest være %d karakterer lang'
),
);
}/*}}}*/
?>
......@@ -39,34 +39,3 @@ function pieform_rule_maxvalue(Pieform $form, $value, $element, $maxvalue) {/*{{
}
}/*}}}*/
function pieform_rule_maxvalue_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'maxvalue' => 'This value can not be larger than %d'
),
'de.utf8' => array(
'maxvalue' => 'Dieser Wert kann nicht größer als %d sein'
),
'fr.utf8' => array(
'maxvalue' => 'Cette valeur ne peut pas supérieure à %d'
),
'ja.utf8' => array(
'maxvalue' => 'この値は %d 以下にしてください'
),
'es.utf8' => array(
'maxvalue' => 'Este valor no puede ser superior a %d'
),
'sl.utf8' => array(
'maxvalue' => 'Ta vrednost ne sme biti večja od %d'
),
'nl.utf8' => array(
'maxvalue' => 'Deze waarde kan niet groter zijn dan %d'
),
'cs.utf8' => array(
'maxvalue' => 'Hodnota nemůže být větší než %d'
),
);
}/*}}}*/
?>
......@@ -39,34 +39,3 @@ function pieform_rule_minlength(Pieform $form, $value, $element, $minlength) {/*
}
}/*}}}*/
function pieform_rule_minlength_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'minlength' => 'This field must be at least %d characters long',
),
'de.utf8' => array(
'minlength' => 'Das Feld muss zumindest %d Zeichen lang sein',
),
'fr.utf8' => array(
'minlength' => 'Ce champ doit contenir au moins %d caractères',
),
'es.utf8' => array(
'minlength' => 'Este campo debe tener como mínimo %d caracteres',
),
'sl.utf8' => array(
'minlength' => 'To polje mora biti dolgo vsaj %d znakov',
),
'nl.utf8' => array(
'minlength' => 'Dit veld moet minstens %d tekens lang zijn',
),
'cs.utf8' => array(
'minlength' => 'Musíte zadat nejméně %d znaků',
),
'da.utf8' => array(
'minlength' => 'Dette felt skal mindst være %d karakterer lang',
),
);
}/*}}}*/
?>
......@@ -39,37 +39,3 @@ function pieform_rule_minvalue(Pieform $form, $value, $element, $minvalue) {/*{{
}
}/*}}}*/
function pieform_rule_minvalue_i18n() {/*{{{*/
return array(
'en.utf8' => array(
'minvalue' => 'This value can not be smaller than %d'
),
'de.utf8' => array(
'minvalue' => 'Dieser Wert kann nicht kleiner als %d sein'
),
'fr.utf8' => array(
'minvalue' => 'Cette valeur ne peut pas être inférieure à %d'
),
'ja.utf8' => array(
'minvalue' => 'この値は %d 以下にすることはできません'
),
'es.utf8' => array(
'minvalue' => 'Este valor no puede ser inferior a %d'
),
'sl.utf8' => array(
'minvalue' => 'Ta vrednost ne sme biti manjša od %d'
),
'nl.utf8' => array(
'minvalue' => 'Deze waarde kan niet kleiner zijn dan %d'
</