summaryrefslogtreecommitdiff
path: root/extensions/ParserFunctions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ParserFunctions')
-rw-r--r--extensions/ParserFunctions/.gitreview5
-rw-r--r--extensions/ParserFunctions/Expr.php47
-rw-r--r--extensions/ParserFunctions/ParserFunctions.i18n.magic.php256
-rw-r--r--extensions/ParserFunctions/ParserFunctions.i18n.php301
-rw-r--r--extensions/ParserFunctions/ParserFunctions.php14
-rw-r--r--extensions/ParserFunctions/ParserFunctions_body.php12
-rw-r--r--extensions/ParserFunctions/exprTests.txt39
-rw-r--r--extensions/ParserFunctions/funcsParserTests.txt21
-rw-r--r--extensions/ParserFunctions/testExpr.php38
9 files changed, 513 insertions, 220 deletions
diff --git a/extensions/ParserFunctions/.gitreview b/extensions/ParserFunctions/.gitreview
deleted file mode 100644
index decb9867..00000000
--- a/extensions/ParserFunctions/.gitreview
+++ /dev/null
@@ -1,5 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=mediawiki/extensions/ParserFunctions.git
-defaultbranch=master
diff --git a/extensions/ParserFunctions/Expr.php b/extensions/ParserFunctions/Expr.php
index 8597f1f7..f40158e8 100644
--- a/extensions/ParserFunctions/Expr.php
+++ b/extensions/ParserFunctions/Expr.php
@@ -45,6 +45,8 @@ define( 'EXPR_TRUNC', 33 );
define( 'EXPR_CEIL', 34 );
define( 'EXPR_POW', 35 );
define( 'EXPR_PI', 36 );
+define( 'EXPR_FMOD', 37 );
+define( 'EXPR_SQRT' , 38 );
class ExprError extends MWException {
/**
@@ -52,6 +54,12 @@ class ExprError extends MWException {
* @param $parameter string
*/
public function __construct( $msg, $parameter = '' ) {
+ // Give grep a chance to find the usages:
+ // pfunc_expr_stack_exhausted, pfunc_expr_unexpected_number, pfunc_expr_preg_match_failure,
+ // pfunc_expr_unrecognised_word, pfunc_expr_unexpected_operator, pfunc_expr_missing_operand,
+ // pfunc_expr_unexpected_closing_bracket, pfunc_expr_unrecognised_punctuation,
+ // pfunc_expr_unclosed_bracket, pfunc_expr_division_by_zero, pfunc_expr_invalid_argument,
+ // pfunc_expr_invalid_argument_ln, pfunc_expr_unknown_error, pfunc_expr_not_a_number
$msg = wfMessage( "pfunc_expr_$msg", $parameter )->inContentLanguage()->escaped();
$this->message = '<strong class="error">' . $msg . '</strong>';
}
@@ -77,10 +85,12 @@ class ExprParser {
EXPR_TRUNC => 9,
EXPR_CEIL => 9,
EXPR_NOT => 9,
+ EXPR_SQRT => 9,
EXPR_POW => 8,
EXPR_TIMES => 7,
EXPR_DIVIDE => 7,
EXPR_MOD => 7,
+ EXPR_FMOD => 7,
EXPR_PLUS => 6,
EXPR_MINUS => 6,
EXPR_ROUND => 5,
@@ -104,6 +114,7 @@ class ExprParser {
EXPR_TIMES => '*',
EXPR_DIVIDE => '/',
EXPR_MOD => 'mod',
+ EXPR_FMOD => 'fmod',
EXPR_PLUS => '+',
EXPR_MINUS => '-',
EXPR_ROUND => 'round',
@@ -130,11 +141,12 @@ class ExprParser {
EXPR_CEIL => 'ceil',
EXPR_POW => '^',
EXPR_PI => 'pi',
+ EXPR_SQRT => 'sqrt',
);
-
var $words = array(
'mod' => EXPR_MOD,
+ 'fmod' => EXPR_FMOD,
'and' => EXPR_AND,
'or' => EXPR_OR,
'not' => EXPR_NOT,
@@ -154,6 +166,7 @@ class ExprParser {
'floor' => EXPR_FLOOR,
'ceil' => EXPR_CEIL,
'pi' => EXPR_PI,
+ 'sqrt' => EXPR_SQRT,
);
/**
@@ -177,6 +190,7 @@ class ExprParser {
$p = 0;
$end = strlen( $expr );
$expecting = 'expression';
+ $name = '';
while ( $p < $end ) {
if ( count( $operands ) > $this->maxStackSize || count( $operators ) > $this->maxStackSize ) {
@@ -254,6 +268,7 @@ class ExprParser {
case EXPR_FLOOR:
case EXPR_TRUNC:
case EXPR_CEIL:
+ case EXPR_SQRT:
if ( $expecting != 'expression' ) {
throw new ExprError( 'unexpected_operator', $word );
}
@@ -412,7 +427,7 @@ class ExprParser {
}
$right = array_pop( $stack );
$left = array_pop( $stack );
- if ( $right == 0 ) {
+ if ( !$right ) {
throw new ExprError( 'division_by_zero', $this->names[$op] );
}
$stack[] = $left / $right;
@@ -421,13 +436,24 @@ class ExprParser {
if ( count( $stack ) < 2 ) {
throw new ExprError( 'missing_operand', $this->names[$op] );
}
- $right = array_pop( $stack );
- $left = array_pop( $stack );
- if ( $right == 0 ) {
+ $right = (int)array_pop( $stack );
+ $left = (int)array_pop( $stack );
+ if ( !$right ) {
throw new ExprError( 'division_by_zero', $this->names[$op] );
}
$stack[] = $left % $right;
break;
+ case EXPR_FMOD:
+ if ( count( $stack ) < 2 ) {
+ throw new ExprError( 'missing_operand', $this->names[$op] );
+ }
+ $right = (double)array_pop( $stack );
+ $left = (double)array_pop( $stack );
+ if ( !$right ) {
+ throw new ExprError( 'division_by_zero', $this->names[$op] );
+ }
+ $stack[] = fmod( $left, $right );
+ break;
case EXPR_PLUS:
if ( count( $stack ) < 2 ) {
throw new ExprError( 'missing_operand', $this->names[$op] );
@@ -634,6 +660,17 @@ class ExprParser {
throw new ExprError( 'division_by_zero', $this->names[$op] );
}
break;
+ case EXPR_SQRT:
+ if ( count( $stack ) < 1 ) {
+ throw new ExprError( 'missing_operand', $this->names[$op] );
+ }
+ $arg = array_pop( $stack );
+ $result = sqrt( $arg );
+ if ( is_nan( $result ) ) {
+ throw new ExprError( 'not_a_number', $this->names[$op] );
+ }
+ $stack[] = $result;
+ break;
default:
// Should be impossible to reach here.
throw new ExprError( 'unknown_error' );
diff --git a/extensions/ParserFunctions/ParserFunctions.i18n.magic.php b/extensions/ParserFunctions/ParserFunctions.i18n.magic.php
index 640dd7aa..1a37cf9e 100644
--- a/extensions/ParserFunctions/ParserFunctions.i18n.magic.php
+++ b/extensions/ParserFunctions/ParserFunctions.i18n.magic.php
@@ -1,9 +1,9 @@
<?php
-
-$magicWords = array();
-
/**
- * English
+ * Internationalisation file for extension ParserFunctions.
+ *
+ * @file
+ * @ingroup Extensions
*/
$magicWords = array();
@@ -79,6 +79,14 @@ $magicWords['arz'] = array(
'explode' => array( 0, 'انفجار', 'explode' ),
);
+/** South Azerbaijani (تورکجه) */
+$magicWords['azb'] = array(
+ 'ifeq' => array( 0, 'ایربیر' ),
+ 'ifexpr' => array( 0, 'ایرحساب' ),
+ 'iferror' => array( 0, 'ایریالنیش' ),
+ 'ifexist' => array( 0, 'ایراولسا' ),
+);
+
/** Breton (brezhoneg) */
$magicWords['br'] = array(
'time' => array( 0, 'amzer' ),
@@ -88,8 +96,8 @@ $magicWords['br'] = array(
/** Chechen (нохчийн) */
$magicWords['ce'] = array(
- 'time' => array( 0, 'хан', 'time' ),
- 'replace' => array( 0, 'хийцарна', 'замена', 'replace' ),
+ 'time' => array( 0, 'хан' ),
+ 'replace' => array( 0, 'хийцарна', 'замена' ),
);
/** Czech (česky) */
@@ -109,7 +117,7 @@ $magicWords['de'] = array(
'default' => array( 0, '#standard' ),
'count' => array( 0, 'zähle' ),
'replace' => array( 0, 'ersetze' ),
- 'urldecode' => array( 0, 'dekodiereurl', 'dekodiere_url' ),
+ 'urldecode' => array( 0, 'URLDEKODIERT:' ),
);
/** Esperanto (Esperanto) */
@@ -120,10 +128,12 @@ $magicWords['eo'] = array(
'ifexpr' => array( 0, 'seespr', 'seeksprimo' ),
'iferror' => array( 0, 'seeraras' ),
'switch' => array( 0, 'ŝaltu', 'ŝalti', 'sxaltu', 'sxalti' ),
- 'default' => array( 0, '#defaŭlte', '#defauxlte' ),
+ 'default' => array( 0, '#apriore', '#defaŭlte', '#defauxlte' ),
'ifexist' => array( 0, 'seekzistas' ),
'time' => array( 0, 'tempo' ),
'timel' => array( 0, 'tempoo' ),
+ 'len' => array( 0, 'lungo' ),
+ 'replace' => array( 0, 'anstataŭigi' ),
);
/** Spanish (español) */
@@ -132,6 +142,7 @@ $magicWords['es'] = array(
'ifexpr' => array( 0, 'siexpr' ),
'iferror' => array( 0, 'sierror' ),
'switch' => array( 0, 'según' ),
+ 'default' => array( 0, '#predeterminado' ),
'ifexist' => array( 0, 'siexiste' ),
'time' => array( 0, 'tiempo' ),
'len' => array( 0, 'long', 'longitud' ),
@@ -165,18 +176,19 @@ $magicWords['fa'] = array(
/** Hebrew (עברית) */
$magicWords['he'] = array(
- 'expr' => array( 0, 'חשב', 'expr' ),
- 'if' => array( 0, 'תנאי', 'if' ),
- 'ifeq' => array( 0, 'שווה', 'ifeq' ),
- 'ifexpr' => array( 0, 'חשב תנאי', 'ifexpr' ),
- 'iferror' => array( 0, 'תנאי שגיאה', 'iferror' ),
- 'switch' => array( 0, 'בחר', 'switch' ),
- 'default' => array( 0, '#ברירת מחדל', '#default' ),
- 'ifexist' => array( 0, 'קיים', 'ifexist' ),
- 'time' => array( 0, 'זמן', 'time' ),
- 'timel' => array( 0, 'זמןמ', 'timel' ),
- 'rel2abs' => array( 0, 'יחסי למוחלט', 'rel2abs' ),
- 'titleparts' => array( 0, 'חלק בכותרת', 'titleparts' ),
+ 'expr' => array( 0, 'חשב' ),
+ 'if' => array( 0, 'תנאי' ),
+ 'ifeq' => array( 0, 'שווה' ),
+ 'ifexpr' => array( 0, 'חשב תנאי' ),
+ 'iferror' => array( 0, 'תנאי שגיאה' ),
+ 'switch' => array( 0, 'בחר' ),
+ 'default' => array( 0, '#ברירת מחדל' ),
+ 'ifexist' => array( 0, 'קיים' ),
+ 'time' => array( 0, 'זמן' ),
+ 'timel' => array( 0, 'זמןמ' ),
+ 'rel2abs' => array( 0, 'יחסי למוחלט' ),
+ 'titleparts' => array( 0, 'חלק בכותרת' ),
+ 'count' => array( 0, 'מספר' ),
);
/** Hungarian (magyar) */
@@ -218,7 +230,16 @@ $magicWords['ig'] = array(
/** Italian (italiano) */
$magicWords['it'] = array(
- 'ifexist' => array( 0, 'ifexist' ),
+ 'expr' => array( 0, 'espr' ),
+ 'if' => array( 0, 'se' ),
+ 'ifeq' => array( 0, 'seeq' ),
+ 'ifexpr' => array( 0, 'seespr' ),
+ 'iferror' => array( 0, 'seerrore' ),
+ 'ifexist' => array( 0, 'seesiste' ),
+ 'time' => array( 0, 'tempo' ),
+ 'titleparts' => array( 0, 'patititolo' ),
+ 'count' => array( 0, 'conto' ),
+ 'replace' => array( 0, 'sostituisci' ),
);
/** Japanese (日本語) */
@@ -256,12 +277,15 @@ $magicWords['ko'] = array(
'default' => array( 0, '#기본값' ),
'ifexist' => array( 0, '만약존재' ),
'time' => array( 0, '시간' ),
- 'timel' => array( 0, '지역시간' ),
+ 'timel' => array( 0, '현지시간' ),
+ 'rel2abs' => array( 0, '상대를절대로' ),
+ 'titleparts' => array( 0, '제목부분' ),
'len' => array( 0, '길이' ),
'pos' => array( 0, '위치' ),
'rpos' => array( 0, '오른위치' ),
+ 'sub' => array( 0, '자르기' ),
'count' => array( 0, '개수' ),
- 'replace' => array( 0, '교체' ),
+ 'replace' => array( 0, '바꾸기', '교체' ),
'explode' => array( 0, '분리' ),
'urldecode' => array( 0, '주소디코딩:' ),
);
@@ -271,6 +295,12 @@ $magicWords['ku-latn'] = array(
'len' => array( 0, '#ziman' ),
);
+/** Cornish (kernowek) */
+$magicWords['kw'] = array(
+ 'if' => array( 0, 'mar' ),
+ 'time' => array( 0, 'termyn' ),
+);
+
/** Ladino (Ladino) */
$magicWords['lad'] = array(
'switch' => array( 0, 'asegún', 'según', 'switch' ),
@@ -318,7 +348,7 @@ $magicWords['ml'] = array(
'ifexpr' => array( 0, 'എക്സ്പ്രെഷനെങ്കിൽ' ),
'iferror' => array( 0, 'പിഴവെങ്കിൽ' ),
'switch' => array( 0, 'മാറ്റുക' ),
- 'default' => array( 0, '#സ്വതവേ' ),
+ 'default' => array( 0, '#സ്വതേ' ),
'ifexist' => array( 0, 'ഉണ്ടെങ്കിൽ' ),
'time' => array( 0, 'സമയം' ),
'timel' => array( 0, 'സമയം|' ),
@@ -330,37 +360,37 @@ $magicWords['ml'] = array(
/** Marathi (मराठी) */
$magicWords['mr'] = array(
- 'expr' => array( 0, 'करण', 'expr' ),
- 'if' => array( 0, 'जर', 'इफ', 'if' ),
- 'ifeq' => array( 0, 'जरसम', 'ifeq' ),
- 'ifexpr' => array( 0, 'जरकरण', 'ifexpr' ),
- 'iferror' => array( 0, 'जरत्रुटी', 'iferror' ),
- 'switch' => array( 0, 'कळ', 'सांगकळ', 'असेलतरसांग', 'असलेतरसांग', 'स्वीच', 'switch' ),
- 'default' => array( 0, '#अविचल', '#default' ),
- 'ifexist' => array( 0, 'जरअसेल', 'जरआहे', 'ifexist' ),
- 'time' => array( 0, 'वेळ', 'time' ),
- 'timel' => array( 0, 'वेळस्था', 'timel' ),
- 'titleparts' => array( 0, 'शीर्षकखंड', 'टाइटलपार्ट्स', 'titleparts' ),
- 'len' => array( 0, 'लांबी', 'len' ),
- 'pos' => array( 0, 'स्थशोध', 'pos' ),
- 'rpos' => array( 0, 'माग्चास्थशोध', 'rpos' ),
- 'sub' => array( 0, 'उप', 'sub' ),
- 'count' => array( 0, 'मोज', 'मोजा', 'count' ),
- 'replace' => array( 0, 'नेबदल', 'रिप्लेस', 'replace' ),
- 'explode' => array( 0, 'एकफोड', 'explode' ),
-);
-
-/** Nedersaksisch (Nedersaksisch) */
+ 'expr' => array( 0, 'करण' ),
+ 'if' => array( 0, 'जर', 'इफ' ),
+ 'ifeq' => array( 0, 'जरसम' ),
+ 'ifexpr' => array( 0, 'जरकरण' ),
+ 'iferror' => array( 0, 'जरत्रुटी' ),
+ 'switch' => array( 0, 'कळ', 'सांगकळ', 'असेलतरसांग', 'असलेतरसांग', 'स्वीच' ),
+ 'default' => array( 0, '#अविचल' ),
+ 'ifexist' => array( 0, 'जरअसेल', 'जरआहे' ),
+ 'time' => array( 0, 'वेळ' ),
+ 'timel' => array( 0, 'वेळस्था' ),
+ 'titleparts' => array( 0, 'शीर्षकखंड', 'टाइटलपार्ट्स' ),
+ 'len' => array( 0, 'लांबी' ),
+ 'pos' => array( 0, 'स्थशोध' ),
+ 'rpos' => array( 0, 'माग्चास्थशोध' ),
+ 'sub' => array( 0, 'उप' ),
+ 'count' => array( 0, 'मोज', 'मोजा' ),
+ 'replace' => array( 0, 'नेबदल', 'रिप्लेस' ),
+ 'explode' => array( 0, 'एकफोड' ),
+);
+
+/** Low Saxon (Netherlands) (Nedersaksies) */
$magicWords['nds-nl'] = array(
- 'if' => array( 0, 'as', 'als', 'if' ),
- 'ifeq' => array( 0, 'asgelieke', 'alsgelijk', 'ifeq' ),
- 'ifexpr' => array( 0, 'asexpressie', 'alsexpressie', 'ifexpr' ),
- 'iferror' => array( 0, 'asfout', 'alsfout', 'iferror' ),
- 'default' => array( 0, '#standard', '#standaard', '#default' ),
- 'ifexist' => array( 0, 'asbesteet', 'alsbestaat', 'ifexist' ),
- 'time' => array( 0, 'tied', 'tijd', 'time' ),
- 'timel' => array( 0, 'tiedl', 'tijdl', 'timel' ),
- 'rel2abs' => array( 0, 'relatiefnaorabseluut', 'relatiefnaarabsoluut', 'rel2abs' ),
+ 'if' => array( 0, 'as', 'als' ),
+ 'ifeq' => array( 0, 'asgelieke', 'alsgelijk' ),
+ 'ifexpr' => array( 0, 'asexpressie', 'alsexpressie' ),
+ 'iferror' => array( 0, 'asfout', 'alsfout' ),
+ 'default' => array( 0, '#standard', '#standaard' ),
+ 'ifexist' => array( 0, 'asbesteet', 'alsbestaat' ),
+ 'time' => array( 0, 'tied', 'tijd' ),
+ 'timel' => array( 0, 'tiedl', 'tijdl' ),
+ 'rel2abs' => array( 0, 'relatiefnaorabseluut', 'relatiefnaarabsoluut' ),
);
/** Dutch (Nederlands) */
@@ -383,28 +413,33 @@ $magicWords['nl'] = array(
'urldecode' => array( 0, 'urldecoderen' ),
);
-/** Norwegian Nynorsk (norsk (nynorsk)‎) */
+/** Norwegian Nynorsk (norsk nynorsk) */
$magicWords['nn'] = array(
- 'expr' => array( 0, 'uttrykk', 'expr' ),
- 'if' => array( 0, 'om', 'if' ),
- 'ifeq' => array( 0, 'omlik', 'ifeq' ),
- 'ifexpr' => array( 0, 'omuttrykk', 'ifexpr' ),
- 'iferror' => array( 0, 'omfeil', 'iferror' ),
- 'switch' => array( 0, 'byt', 'switch' ),
- 'ifexist' => array( 0, 'omfinst', 'ifexist' ),
- 'time' => array( 0, 'tid', 'time' ),
- 'timel' => array( 0, 'tidl', 'timel' ),
- 'rel2abs' => array( 0, 'reltilabs', 'rel2abs' ),
- 'titleparts' => array( 0, 'titteldelar', 'titleparts' ),
- 'len' => array( 0, 'lengd', 'len' ),
- 'replace' => array( 0, 'erstatt', 'replace' ),
-);
-
-/** Oriya (ଓଡ଼ିଆ) */
+ 'expr' => array( 0, 'uttrykk' ),
+ 'if' => array( 0, 'om' ),
+ 'ifeq' => array( 0, 'omlik' ),
+ 'ifexpr' => array( 0, 'omuttrykk' ),
+ 'iferror' => array( 0, 'omfeil' ),
+ 'switch' => array( 0, 'byt' ),
+ 'ifexist' => array( 0, 'omfinst' ),
+ 'time' => array( 0, 'tid' ),
+ 'timel' => array( 0, 'tidl' ),
+ 'rel2abs' => array( 0, 'reltilabs' ),
+ 'titleparts' => array( 0, 'titteldelar' ),
+ 'len' => array( 0, 'lengd' ),
+ 'replace' => array( 0, 'erstatt' ),
+);
+
+/** Oriya (ଓଡ଼ିଆ) */
$magicWords['or'] = array(
'time' => array( 0, 'ସମୟ' ),
);
+/** Punjabi (ਪੰਜਾਬੀ) */
+$magicWords['pa'] = array(
+ 'time' => array( 0, 'ਸਮੇ' ),
+);
+
/** Pashto (پښتو) */
$magicWords['ps'] = array(
'if' => array( 0, 'که', 'if' ),
@@ -426,6 +461,12 @@ $magicWords['pt'] = array(
/** Russian (русский) */
$magicWords['ru'] = array(
+ 'if' => array( 0, 'если' ),
+ 'iferror' => array( 0, 'еслиошибка' ),
+ 'switch' => array( 0, 'переключатель' ),
+ 'default' => array( 0, '#умолчание' ),
+ 'time' => array( 0, 'время' ),
+ 'timel' => array( 0, 'мвремя' ),
'replace' => array( 0, 'замена' ),
);
@@ -469,19 +510,57 @@ $magicWords['tr'] = array(
/** Ukrainian (українська) */
$magicWords['uk'] = array(
- 'expr' => array( 0, 'вираз', 'expr' ),
- 'if' => array( 0, 'якщо', 'if' ),
- 'ifeq' => array( 0, 'якщорівні', 'рівні', 'ifeq' ),
- 'ifexpr' => array( 0, 'якщовираз', 'ifexpr' ),
- 'iferror' => array( 0, 'якщопомилка', 'iferror' ),
- 'switch' => array( 0, 'вибірка', 'switch' ),
- 'default' => array( 0, '#інакше', '#default' ),
- 'ifexist' => array( 0, 'якщоіснує', 'ifexist' ),
+ 'expr' => array( 0, 'вираз' ),
+ 'if' => array( 0, 'якщо' ),
+ 'ifeq' => array( 0, 'якщорівні', 'рівні' ),
+ 'ifexpr' => array( 0, 'якщовираз' ),
+ 'iferror' => array( 0, 'якщопомилка' ),
+ 'switch' => array( 0, 'вибірка' ),
+ 'default' => array( 0, '#інакше' ),
+ 'ifexist' => array( 0, 'якщоіснує' ),
+ 'replace' => array( 0, 'заміна' ),
+);
+
+/** Urdu (اردو) */
+$magicWords['ur'] = array(
+ 'if' => array( 0, 'اگر' ),
+);
+
+/** Uzbek (oʻzbekcha) */
+$magicWords['uz'] = array(
+ 'expr' => array( 0, 'ifoda' ),
+ 'if' => array( 0, 'agar' ),
+ 'ifeq' => array( 0, 'agarteng' ),
+ 'ifexpr' => array( 0, 'agarifoda' ),
+ 'iferror' => array( 0, 'agarxato' ),
+ 'switch' => array( 0, 'tanlov' ),
+ 'default' => array( 0, '#boshlangʻich' ),
+ 'ifexist' => array( 0, 'agarbor' ),
+ 'time' => array( 0, 'vaqt' ),
+ 'len' => array( 0, 'uzunlik' ),
+ 'pos' => array( 0, 'oʻrin' ),
+ 'count' => array( 0, 'miqdor' ),
+ 'replace' => array( 0, 'almashtirish' ),
);
/** Vietnamese (Tiếng Việt) */
$magicWords['vi'] = array(
'expr' => array( 0, 'côngthức' ),
+ 'if' => array( 0, 'nếu' ),
+ 'ifeq' => array( 0, 'nếubằng' ),
+ 'ifexpr' => array( 0, 'nếucôngthức' ),
+ 'iferror' => array( 0, 'nếulỗi' ),
+ 'default' => array( 0, '#mặcđịnh' ),
+ 'ifexist' => array( 0, 'nếutồntại' ),
+ 'time' => array( 0, 'giờ' ),
+ 'timel' => array( 0, 'giờđịaphương' ),
+ 'len' => array( 0, 'sốchữ', 'sốkýtự', 'sốkítự' ),
+ 'pos' => array( 0, 'vịtrí' ),
+ 'rpos' => array( 0, 'vịtríphải' ),
+ 'sub' => array( 0, 'chuỗicon' ),
+ 'count' => array( 0, 'số' ),
+ 'replace' => array( 0, 'thaythế' ),
+ 'urldecode' => array( 0, 'giảimãurl' ),
);
/** Yiddish (ייִדיש) */
@@ -495,4 +574,23 @@ $magicWords['yi'] = array(
'ifexist' => array( 0, 'עקזיסט' ),
'time' => array( 0, 'צייט' ),
'timel' => array( 0, 'צייטל' ),
+ 'count' => array( 0, 'צאל' ),
+);
+
+/** Chinese (中文) */
+$magicWords['zh'] = array(
+ 'expr' => array( 0, '计算式' ),
+ 'if' => array( 0, '非空式' ),
+ 'ifeq' => array( 0, '相同式', '匹配式' ),
+ 'iferror' => array( 0, '错误式' ),
+ 'switch' => array( 0, '多选式', '多条件式', '双射式' ),
+ 'default' => array( 0, '#默认' ),
+ 'ifexist' => array( 0, '存在式' ),
+ 'len' => array( 0, '长度' ),
+ 'pos' => array( 0, '位置' ),
+ 'rpos' => array( 0, '最近位置' ),
+ 'sub' => array( 0, '截取' ),
+ 'count' => array( 0, '计数' ),
+ 'replace' => array( 0, '替换' ),
+ 'explode' => array( 0, '爆炸', '炸开' ),
); \ No newline at end of file
diff --git a/extensions/ParserFunctions/ParserFunctions.i18n.php b/extensions/ParserFunctions/ParserFunctions.i18n.php
index ed37a0d7..3bac1a8d 100644
--- a/extensions/ParserFunctions/ParserFunctions.i18n.php
+++ b/extensions/ParserFunctions/ParserFunctions.i18n.php
@@ -13,15 +13,16 @@ $messages['en'] = array(
'pfunc_time_error' => 'Error: Invalid time.',
'pfunc_time_too_long' => 'Error: Too many #time calls.',
'pfunc_time_too_big' => 'Error: #time only supports years up to 9999.',
+ 'pfunc_time_too_small' => 'Error: #time only supports years from 0.',
'pfunc_rel2abs_invalid_depth' => 'Error: Invalid depth in path: "$1" (tried to access a node above the root node).',
'pfunc_expr_stack_exhausted' => 'Expression error: Stack exhausted.',
'pfunc_expr_unexpected_number' => 'Expression error: Unexpected number.',
'pfunc_expr_preg_match_failure' => 'Expression error: Unexpected preg_match failure.',
- 'pfunc_expr_unrecognised_word' => 'Expression error: Unrecognised word "$1".',
+ 'pfunc_expr_unrecognised_word' => 'Expression error: Unrecognized word "$1".',
'pfunc_expr_unexpected_operator' => 'Expression error: Unexpected $1 operator.',
'pfunc_expr_missing_operand' => 'Expression error: Missing operand for $1.',
'pfunc_expr_unexpected_closing_bracket' => 'Expression error: Unexpected closing bracket.',
- 'pfunc_expr_unrecognised_punctuation' => 'Expression error: Unrecognised punctuation character "$1".',
+ 'pfunc_expr_unrecognised_punctuation' => 'Expression error: Unrecognized punctuation character "$1".',
'pfunc_expr_unclosed_bracket' => 'Expression error: Unclosed bracket.',
'pfunc_expr_division_by_zero' => 'Division by zero.',
'pfunc_expr_invalid_argument' => 'Invalid argument for $1: < -1 or > 1.',
@@ -35,12 +36,81 @@ $messages['en'] = array(
* @author Jon Harald Søby
* @author Kghbln
* @author Meno25
+ * @author Shirayuki
* @author Siebrand
* @author The Evil IP address
*/
$messages['qqq'] = array(
- 'pfunc_desc' => '{{desc}}',
- 'pfunc_expr_division_by_zero' => '{{Identical|Divizion by zero}}',
+ 'pfunc_desc' => '{{desc|name=Parser Functions|url=http://www.mediawiki.org/wiki/Extension:ParserFunctions}}',
+ 'pfunc_time_error' => 'Used as error message about DateTime object, so this "time" means "date and time".
+
+See also:
+* {{msg-mw|Pfunc time too long}}
+* {{msg-mw|Pfunc time too big}}
+* {{msg-mw|Pfunc time too small}}',
+ 'pfunc_time_too_long' => 'Used as error message.
+
+See also:
+* {{msg-mw|Pfunc time error}}
+* {{msg-mw|Pfunc time too big}}
+* {{msg-mw|Pfunc time too small}}',
+ 'pfunc_time_too_big' => 'Used as error message.
+
+See also:
+* {{msg-mw|Pfunc time error}}
+* {{msg-mw|Pfunc time too long}}
+* {{msg-mw|Pfunc time too small}}',
+ 'pfunc_time_too_small' => 'Used as error message.
+
+See also:
+* {{msg-mw|Pfunc time error}}
+* {{msg-mw|Pfunc time too long}}
+* {{msg-mw|Pfunc time too big}}',
+ 'pfunc_rel2abs_invalid_depth' => 'Used as error message. Parameters:
+* $1 - full path',
+ 'pfunc_expr_stack_exhausted' => 'Used as error message.
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_unexpected_number' => 'Used as error message.
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_preg_match_failure' => '{{doc-important|Do not translate <code>preg_match</code>. It is a PHP function name.}}
+Used as error message.
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_unrecognised_word' => 'Used as error message. Parameters:
+* $1 - word
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_unexpected_operator' => 'Used as error message. Parameters:
+* $1 - operator
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_missing_operand' => 'Used as error message. Parameters:
+* $1 - operator name. e.g. +, -, not, mod, sin, cos, sqrt
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_unexpected_closing_bracket' => 'Used as error message.
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_unrecognised_punctuation' => 'Used as error message. Parameters:
+* $1 - invalid character
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_unclosed_bracket' => 'Used as error message.
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_division_by_zero' => 'Used as error message.
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_invalid_argument' => 'Used as error message when the operand is invalid. Parameters:
+* $1 - operator name. Any one of the following: asin, acos
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_invalid_argument_ln' => '{{doc-important|Do not translate <code>ln</code>. It is an operator.}}
+Used as error message when the operand for the operator "ln" is invalid.
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_unknown_error' => 'Used as error message.
+
+In the source code, there is a comment "// Should be impossible to reach here.".
+
+Parameters:
+* $1 - (Undefined in the source code)
+{{Related|Pfunc expr}}',
+ 'pfunc_expr_not_a_number' => 'Used as error message when the result of "sqrt" (square root) is not a number.
+
+Parameters:
+* $1 - operator name: sqrt
+{{Related|Pfunc expr}}',
'pfunc_string_too_long' => 'PLURAL is supported for $1.',
);
@@ -166,10 +236,29 @@ $messages['arz'] = array(
);
/** Assamese (অসমীয়া)
+ * @author Bishnu Saikia
* @author Rajuonline
*/
$messages['as'] = array(
+ 'pfunc_desc' => 'লজিকেল ফাংছন ব্যৱহাৰ কৰি পাৰ্ছাৰক উন্নত কৰক',
'pfunc_time_error' => 'ভুল: অযোগ্য সময়',
+ 'pfunc_time_too_long' => 'ত্রুটী: অত্যধিক #time কল আছে',
+ 'pfunc_time_too_big' => 'ত্ৰুটী: #time -এ কেৱল ৯৯৯৯ চনলৈকে লৈকেহে সমৰ্থন কৰে',
+ 'pfunc_rel2abs_invalid_depth' => 'ত্ৰুটী: পাথত অবৈধ গভীৰতা: "$1" (মূল নোডৰ ওপৰৰ এটা নোড আহৰণ কৰাৰ চেষ্টা কৰিছিল)',
+ 'pfunc_expr_stack_exhausted' => 'এক্সপ্ৰেছন ত্ৰুটী: ষ্টক শেষ হৈছে',
+ 'pfunc_expr_unexpected_number' => 'এক্সপ্ৰেছন ত্ৰুটী: অবাঞ্চিত সংখ্যা',
+ 'pfunc_expr_preg_match_failure' => 'এক্সপ্ৰেছন ত্ৰুটী: অবাঞ্চিত preg_match ব্যৰ্থতা',
+ 'pfunc_expr_unrecognised_word' => 'এক্সপ্ৰেছন ত্ৰুটী: অপৰিচিত শব্দ "$1"',
+ 'pfunc_expr_unexpected_operator' => 'এক্সপ্ৰেছন ত্ৰুটী: অবাঞ্চিত $1 অপাৰেটৰ',
+ 'pfunc_expr_missing_operand' => 'এক্সপ্ৰেছন ত্ৰুটী: $1’ৰ বাবে অপাৰেণ্ড নাই।',
+ 'pfunc_expr_unexpected_closing_bracket' => 'এক্সপ্ৰেছন ত্ৰুটী: অবাঞ্চিত সমাপ্তকাৰী বন্ধনী',
+ 'pfunc_expr_unrecognised_punctuation' => 'এক্সপ্ৰেছন ত্ৰুটী: অপৰিচিত বিৰামচিহ্ন কেৰেক্টাৰ "$1"',
+ 'pfunc_expr_unclosed_bracket' => 'এক্সপ্ৰেছন ত্ৰুটী: উন্মুক্ত বন্ধনী',
+ 'pfunc_expr_division_by_zero' => 'শূন্যৰ দ্বাৰা হৰণ কৰা হৈছে',
+ 'pfunc_expr_invalid_argument' => '$1 ৰ বাবে ভুল চৰ্ত: < -1 অথবা > 1',
+ 'pfunc_expr_invalid_argument_ln' => 'ln ৰ বাবে অমান্য চৰ্ত: <= 0',
+ 'pfunc_expr_unknown_error' => 'এক্সপ্ৰেছন ত্ৰুটী: : অজ্ঞাত ত্ৰুটী ($1)',
+ 'pfunc_expr_not_a_number' => '$1: ৰ ফলাফল একো সংখ্যা নহয়',
);
/** Asturian (asturianu)
@@ -181,15 +270,16 @@ $messages['ast'] = array(
'pfunc_time_error' => 'Error: tiempu non válidu',
'pfunc_time_too_long' => 'Error: demasiaes llamaes #time',
'pfunc_time_too_big' => 'Error: #time sólo almite años fasta 9999.',
+ 'pfunc_time_too_small' => 'Error: #time sólo almite años dende 0.',
'pfunc_rel2abs_invalid_depth' => 'Error: Nivel de subdireutoriu non válidu: "$1" (intentu d\'accesu penriba del direutoriu raíz)',
'pfunc_expr_stack_exhausted' => "Error d'espresión: Pila escosada",
'pfunc_expr_unexpected_number' => "Error d'espresión: Númberu inesperáu",
'pfunc_expr_preg_match_failure' => "Error d'espresión: Fallu inesperáu de preg_match",
- 'pfunc_expr_unrecognised_word' => 'Error d\'espresión: Pallabra "$1" non reconocida',
+ 'pfunc_expr_unrecognised_word' => 'Error d\'espresión: Pallabra "$1" non reconocida.',
'pfunc_expr_unexpected_operator' => "Error d'espresión: Operador $1 inesperáu",
'pfunc_expr_missing_operand' => "Error d'espresión: Falta operador en $1",
'pfunc_expr_unexpected_closing_bracket' => "Error d'espresión: Paréntesis final inesperáu",
- 'pfunc_expr_unrecognised_punctuation' => 'Error d\'espresión: Caráuter de puntuación "$1" non reconocíu',
+ 'pfunc_expr_unrecognised_punctuation' => 'Error d\'espresión: Caráuter de puntuación "$1" non reconocíu.',
'pfunc_expr_unclosed_bracket' => "Error d'espresión: Paréntesis non zarráu",
'pfunc_expr_division_by_zero' => 'División por cero',
'pfunc_expr_invalid_argument' => 'Argumentu non válidu pa $1: < -1 o > 1',
@@ -206,6 +296,13 @@ $messages['az'] = array(
'pfunc_time_error' => 'Xəta: yanlış zaman',
);
+/** South Azerbaijani (تورکجه)
+ * @author Amir a57
+ */
+$messages['azb'] = array(
+ 'pfunc_time_error' => 'ختا: یانلیش زامان',
+);
+
/** Bashkir (башҡортса)
* @author Assele
*/
@@ -345,7 +442,7 @@ $messages['br'] = array(
'pfunc_rel2abs_invalid_depth' => "Fazi : Donder direizh evit an hent : \"\$1\" (klasket ez eus bet mont d'ul live a-us d'ar c'havlec'h-mamm)",
'pfunc_expr_stack_exhausted' => 'Kemennad faziek : pil riñset',
'pfunc_expr_unexpected_number' => "Kemennad faziek : niver dic'hortoz",
- 'pfunc_expr_preg_match_failure' => "Kemennad faziek : c'hwitadenn dic'hortoz evit <code>preg_match</code>",
+ 'pfunc_expr_preg_match_failure' => "Kemennad faziek : c'hwitadenn dic'hortoz evit preg_match",
'pfunc_expr_unrecognised_word' => 'Kemennad faziek : Ger dianav "$1"',
'pfunc_expr_unexpected_operator' => 'Kemennad faziek : Oberier $1 dianav',
'pfunc_expr_missing_operand' => 'Kemennad faziek : Dianav eo operand $1',
@@ -455,6 +552,7 @@ $messages['cs'] = array(
/** Danish (dansk)
* @author Byrial
+ * @author HenrikKbh
* @author Morten LJ
* @author Peter Alberti
*/
@@ -463,6 +561,7 @@ $messages['da'] = array(
'pfunc_time_error' => 'Fejl: Ugyldig tid',
'pfunc_time_too_long' => 'Fejl: for mange kald af #time',
'pfunc_time_too_big' => 'Fejl: #time understøtter kun årstal frem til 9999',
+ 'pfunc_time_too_small' => 'Fejl: #tid understøtter kun år fra 0.',
'pfunc_rel2abs_invalid_depth' => 'Fejl: Ugyldig dybde i sti: "$1" (prøvede at tilgå en knude over rodknuden)',
'pfunc_expr_stack_exhausted' => 'Udtryksfejl: Stak tømt',
'pfunc_expr_unexpected_number' => 'Fejl: Uventet tal',
@@ -490,17 +589,18 @@ $messages['da'] = array(
* @author Rillke
*/
$messages['de'] = array(
- 'pfunc_desc' => 'Ergänzt Parserfunktionen, die logische Funktionen auf Wikiseiten ermöglichen',
+ 'pfunc_desc' => 'Ergänzt den Parser um logische Funktionen',
'pfunc_time_error' => 'Fehler: Ungültige Zeitangabe',
'pfunc_time_too_long' => 'Fehler: Zu viele #time-Aufrufe',
'pfunc_time_too_big' => 'Fehler: #time unterstützt nur Jahre bis 9999',
+ 'pfunc_time_too_small' => 'Fehler: #time unterstützt nur Jahre ab 0.',
'pfunc_rel2abs_invalid_depth' => 'Fehler: Ungültige Pfadtiefe: „$1“ (Zugriff auf einen Knotenpunkt oberhalb des Hauptknotenpunktes ist empfohlen)',
'pfunc_expr_stack_exhausted' => 'Expression-Fehler: Stacküberlauf',
'pfunc_expr_unexpected_number' => 'Expression-Fehler: Unerwartete Zahl',
'pfunc_expr_preg_match_failure' => 'Expression-Fehler: Unerwartete „preg_match“-Fehlfunktion',
'pfunc_expr_unrecognised_word' => 'Expression-Fehler: Unerkanntes Wort „$1“',
- 'pfunc_expr_unexpected_operator' => 'Expression-Fehler: Unerwarteter Operator <tt>$1</tt>',
- 'pfunc_expr_missing_operand' => 'Expression-Fehler: Fehlender Operand für <tt>$1</tt>',
+ 'pfunc_expr_unexpected_operator' => 'Expression-Fehler: Unerwarteter Operator $1',
+ 'pfunc_expr_missing_operand' => 'Expression-Fehler: Fehlender Operand für $1',
'pfunc_expr_unexpected_closing_bracket' => 'Expression-Fehler: Unerwartete schließende eckige Klammer',
'pfunc_expr_unrecognised_punctuation' => 'Expression-Fehler: Unerkanntes Satzzeichen „$1“',
'pfunc_expr_unclosed_bracket' => 'Expression-Fehler: Nicht geschlossene eckige Klammer',
@@ -576,12 +676,14 @@ $messages['dsb'] = array(
* @author Dead3y3
* @author Lou
* @author Omnipaedista
+ * @author Protnet
* @author Απεργός
*/
$messages['el'] = array(
'pfunc_desc' => 'Βελτιώνει το συντακτικό αναλυτή με λογικές συναρτήσεις',
'pfunc_time_error' => 'Σφάλμα: άκυρος χρόνος',
'pfunc_time_too_long' => 'Σφάλμα: πάρα πολλές κλήσεις της #time',
+ 'pfunc_time_too_big' => 'Σφάλμα: το #time υποστηρίζει έτη μέχρι το 9999.',
'pfunc_rel2abs_invalid_depth' => 'Σφάλμα: Άκυρο βάθος στη διαδρομή: «$1» (έγινε προσπάθεια για πρόσβαση σε έναν κόμβο πάνω από τον ριζικό κόμβο)',
'pfunc_expr_stack_exhausted' => 'Σφάλμα έκφρασης: Η στοίβα εξαντλήθηκε',
'pfunc_expr_unexpected_number' => 'Σφάλμα έκφρασης: Μη αναμενόμενος αριθμός',
@@ -600,6 +702,14 @@ $messages['el'] = array(
'pfunc_string_too_long' => 'Σφάλμα: ο ορμαθός υπερβαίνει $1 το όριο χαρακτήρων',
);
+/** British English (British English)
+ * @author Shirayuki
+ */
+$messages['en-gb'] = array(
+ 'pfunc_expr_unrecognised_word' => 'Expression error: Unrecognised word "$1".',
+ 'pfunc_expr_unrecognised_punctuation' => 'Expression error: Unrecognised punctuation character "$1".',
+);
+
/** Esperanto (Esperanto)
* @author Yekrats
*/
@@ -607,6 +717,7 @@ $messages['eo'] = array(
'pfunc_desc' => 'Etendi sintaksan analizilon kun logikaj funkcioj',
'pfunc_time_error' => 'Eraro: malvalida tempo',
'pfunc_time_too_long' => "Eraro: tro da vokoj ''#time''",
+ 'pfunc_time_too_big' => 'Eraro: #time nur subtenas jaroj ĝis 9999.',
'pfunc_rel2abs_invalid_depth' => 'Eraro: Malvalida profundo en vojo: "$1" (provis atingi nodon super la radika nodo)',
'pfunc_expr_stack_exhausted' => 'Esprima eraro: Stako estis malplenigita',
'pfunc_expr_unexpected_number' => 'Esprima eraro: Neatendita numeralo',
@@ -661,7 +772,21 @@ $messages['es'] = array(
$messages['et'] = array(
'pfunc_desc' => 'Laiendab parserit loogiliste funktsioonidega.',
'pfunc_time_error' => 'Tõrge: Vigane aeg',
+ 'pfunc_time_too_long' => 'Tõrge: Liiga palju #time-kutseid.',
+ 'pfunc_time_too_big' => 'Tõrge: #time toetab vaid aastaid kuni väärtuseni 9999.',
+ 'pfunc_expr_unexpected_number' => 'Avaldistõrge: Ootamatu number',
+ 'pfunc_expr_unrecognised_word' => 'Avaldistõrge: Tundmatu sõna "$1"',
+ 'pfunc_expr_unexpected_operator' => 'Avaldistõrge: Ootamatu $1-tehtemärk',
+ 'pfunc_expr_missing_operand' => 'Avaldistõrge: Puudub $1-tehte operand',
+ 'pfunc_expr_unexpected_closing_bracket' => 'Avaldistõrge: Ootamatu lõpusulg',
+ 'pfunc_expr_unrecognised_punctuation' => 'Avaldistõrge: Tundmatu kirjavahemärk "$1"',
+ 'pfunc_expr_unclosed_bracket' => 'Avaldistõrge: sulgemata sulg',
'pfunc_expr_division_by_zero' => 'Nulliga jagamine',
+ 'pfunc_expr_invalid_argument' => 'Vigane $1-tehte argument: < -1 või > 1',
+ 'pfunc_expr_invalid_argument_ln' => 'Vigane ln-tehte argument: <= 0',
+ 'pfunc_expr_unknown_error' => 'Avaldistõrge: Tundmatu tõrge ($1).',
+ 'pfunc_expr_not_a_number' => '$1-tehtes: Vastus pole number',
+ 'pfunc_string_too_long' => 'Tõrge: Sõne ületab $1 märgi piirangu.',
);
/** Basque (euskara)
@@ -688,6 +813,7 @@ $messages['eu'] = array(
);
/** Persian (فارسی)
+ * @author Amire80
* @author Ebraminio
* @author Huji
* @author Wayiran
@@ -696,7 +822,7 @@ $messages['fa'] = array(
'pfunc_desc' => 'به تجزیه‌گر، دستورهای منطقی می‌افزاید',
'pfunc_time_error' => 'خطا: زمان غیرمجاز',
'pfunc_time_too_long' => 'خطا: فراخوانی بیش از حد #time',
- 'pfunc_time_too_big' => 'خطا: <span style="direction: ltr; unicode-bidi: bidi-override;">#time</span> تا سال ۹۹۹۹ را فقط حمایت می‌کند.',
+ 'pfunc_time_too_big' => 'خطا: #زمان تا سال ۹۹۹۹ را فقط حمایت می‌کند.',
'pfunc_rel2abs_invalid_depth' => 'خطا: عمق غیر مجاز در نشانی «$1» (تلاش برای دسترسی به یک نشانی فراتر از نشانی ریشه)',
'pfunc_expr_stack_exhausted' => 'خطای عبارت: پشته از دست رفته',
'pfunc_expr_unexpected_number' => 'خطای عبارت: عدد دور از انتظار',
@@ -719,15 +845,17 @@ $messages['fa'] = array(
* @author Agony
* @author Cimon Avaro
* @author Nike
+ * @author VezonThunder
*/
$messages['fi'] = array(
'pfunc_desc' => 'Laajentaa jäsennintä loogisilla funktiolla.',
'pfunc_time_error' => 'Virhe: kelvoton aika',
'pfunc_time_too_long' => 'Virhe: liian monta #time-kutsua',
+ 'pfunc_time_too_big' => 'Virhe: #time tukee vuosilukuja vain vuoteen 9999 asti.',
'pfunc_rel2abs_invalid_depth' => 'Virhe: Virheellinen syvyys polussa: $1 (ei juurisolmun sisällä)',
'pfunc_expr_stack_exhausted' => 'Virhe lausekkeessa: pino loppui',
'pfunc_expr_unexpected_number' => 'Virhe lausekkeessa: odottamaton numero',
- 'pfunc_expr_preg_match_failure' => 'Virhe lausekkeessa: <tt>preg_match</tt> palautti virheen',
+ 'pfunc_expr_preg_match_failure' => 'Virhe lausekkeessa: preg_match palautti virheen',
'pfunc_expr_unrecognised_word' => 'Virhe lausekkeessa: tunnistamaton sana ”$1”',
'pfunc_expr_unexpected_operator' => 'Virhe lausekkeessa: odottamaton $1-operaattori',
'pfunc_expr_missing_operand' => 'Virhe lausekkeessa: operaattorin $1 edellyttämä operandi puuttuu',
@@ -756,12 +884,13 @@ $messages['fi'] = array(
$messages['fr'] = array(
'pfunc_desc' => 'Améliore l’analyseur syntaxique avec des fonctions logiques',
'pfunc_time_error' => 'Erreur : durée invalide.',
- 'pfunc_time_too_long' => 'Erreur : appels trop nombreux à <code>#time</code>.',
+ 'pfunc_time_too_long' => 'Erreur : appels trop nombreux à #time.',
'pfunc_time_too_big' => 'Erreur : #time prend uniquement en charge des années jusqu’à 9999.',
+ 'pfunc_time_too_small' => 'Erreur : #time prend uniquement en charge les années à partir de 0.',
'pfunc_rel2abs_invalid_depth' => 'Erreur : profondeur invalide dans le chemin « $1 » (a essayé d’accéder à un niveau au-dessus du nœud racine).',
'pfunc_expr_stack_exhausted' => 'Erreur d’expression : pile épuisée.',
'pfunc_expr_unexpected_number' => 'Erreur d’expression : nombre inattendu.',
- 'pfunc_expr_preg_match_failure' => 'Erreur d’expression : échec inattendu de <code>preg_match</code>.',
+ 'pfunc_expr_preg_match_failure' => 'Erreur d’expression : échec inattendu de preg_match.',
'pfunc_expr_unrecognised_word' => 'Erreur d’expression : mot « $1 » non reconnu.',
'pfunc_expr_unexpected_operator' => "Erreur d’expression : opérateur '''$1''' inattendu.",
'pfunc_expr_missing_operand' => "Erreur d’expression : opérande manquant pour '''$1'''.",
@@ -782,14 +911,14 @@ $messages['fr'] = array(
$messages['frp'] = array(
'pfunc_desc' => 'Mèlyore lo parsor avouéc des fonccions logiques.',
'pfunc_time_error' => 'Èrror : temps envalido',
- 'pfunc_time_too_long' => 'Èrror : trop grant nombro d’apèls a <code>#time</code>',
+ 'pfunc_time_too_long' => 'Èrror : trop grant nombro d’apèls a #time',
'pfunc_rel2abs_invalid_depth' => 'Èrror : provondior envalida dens lo chemin « $1 » (at tâchiê d’arrevar a un nivél en-dessus du nuod racena)',
'pfunc_expr_stack_exhausted' => 'Èrror d’èxprèssion : pila èpouesiê',
'pfunc_expr_unexpected_number' => 'Èrror d’èxprèssion : nombro emprèvu',
- 'pfunc_expr_preg_match_failure' => 'Èrror d’èxprèssion : falyita emprèvua de <code>preg_match</code>',
+ 'pfunc_expr_preg_match_failure' => 'Èrror d’èxprèssion : falyita emprèvua de preg_match',
'pfunc_expr_unrecognised_word' => 'Èrror d’èxprèssion : mot « $1 » pas recognu',
'pfunc_expr_unexpected_operator' => 'Èrror d’èxprèssion : opèrator « $1 » emprèvu',
- 'pfunc_expr_missing_operand' => 'Èrror d’èxprèssion : opèrando manquent por « $1 »',
+ 'pfunc_expr_missing_operand' => 'Fôta d’èxprèssion : opèrando manquent por « $1 ».',
'pfunc_expr_unexpected_closing_bracket' => 'Èrror d’èxprèssion : parentèsa cllosenta emprèvua',
'pfunc_expr_unrecognised_punctuation' => 'Èrror d’èxprèssion : caractèro de ponctuacion « $1 » pas recognu',
'pfunc_expr_unclosed_bracket' => 'Èrror d’èxprèssion : parentèsa pas cllôsa',
@@ -812,6 +941,7 @@ $messages['gl'] = array(
'pfunc_time_error' => 'Erro: Hora non válida.',
'pfunc_time_too_long' => 'Erro: Demasiadas chamadas #time.',
'pfunc_time_too_big' => 'Erro: #time só permite anos ata o 9999.',
+ 'pfunc_time_too_small' => 'Erro: #time só permite anos desde o 0.',
'pfunc_rel2abs_invalid_depth' => 'Erro: Profundidade da ruta non válida: "$1" (intentouse acceder a un nodo por riba do nodo raíz).',
'pfunc_expr_stack_exhausted' => 'Erro de expresión: Pila esgotada.',
'pfunc_expr_unexpected_number' => 'Erro de expresión: Número inesperado.',
@@ -850,8 +980,8 @@ $messages['gsw'] = array(
'pfunc_expr_unexpected_number' => 'Expression-Fähler: Nit erwarteti Zahl',
'pfunc_expr_preg_match_failure' => 'Expression-Fähler: Nit erwarteti „preg_match“-Fählfunktion',
'pfunc_expr_unrecognised_word' => 'Expression-Fähler: Nit erkannt Wort „$1“',
- 'pfunc_expr_unexpected_operator' => 'Expression-Fähler: Nit erwartete Operator: <tt>$1</tt>',
- 'pfunc_expr_missing_operand' => 'Expression-Fähler: Operand fir <tt>$1</tt> fählt',
+ 'pfunc_expr_unexpected_operator' => 'Expression-Fähler: Nit erwartete Operator: $1',
+ 'pfunc_expr_missing_operand' => 'Expression-Fähler: Operand fir $1 fählt',
'pfunc_expr_unexpected_closing_bracket' => 'Expression-Fähler: Nit erwarteti schließendi eckigi Chlammere',
'pfunc_expr_unrecognised_punctuation' => 'Expression-Fähler: Nit erkannt Satzzeiche „$1“',
'pfunc_expr_unclosed_bracket' => 'Expression-Fähler: Nit gschlosseni eckige Chlammere',
@@ -871,6 +1001,7 @@ $messages['he'] = array(
'pfunc_time_error' => 'שגיאה: זמן שגוי',
'pfunc_time_too_long' => 'שגיאה: שימוש ב"#זמן" פעמים רבות מדי',
'pfunc_time_too_big' => 'שגיאה: #זמן תומכת רק בשנים עד 9999',
+ 'pfunc_time_too_small' => 'שגיאה: הפונקציה #time תומכת ר בשנים מ־0',
'pfunc_rel2abs_invalid_depth' => 'שגיאה: עומק שגוי בנתיב: "$1" (ניסיון כניסה לצומת מעל צומת השורש)',
'pfunc_expr_stack_exhausted' => 'שגיאה בביטוי: המחסנית מלאה',
'pfunc_expr_unexpected_number' => 'שגיאה בביטוי: מספר בלתי צפוי',
@@ -1067,7 +1198,8 @@ $messages['it'] = array(
'pfunc_desc' => 'Aggiunge al parser una serie di funzioni logiche',
'pfunc_time_error' => 'Errore: orario non valido',
'pfunc_time_too_long' => 'Errore: troppe chiamate a #time',
- 'pfunc_time_too_big' => "Errore: #time supporta solo fino all'anno 9999",
+ 'pfunc_time_too_big' => "Errore: #time supporta solo fino all'anno 9999.",
+ 'pfunc_time_too_small' => "Errore: #time supporta solo dall'anno 0.",
'pfunc_rel2abs_invalid_depth' => 'Errore: profondità non valida nel percorso "$1" (si è tentato di accedere a un nodo superiore alla radice)',
'pfunc_expr_stack_exhausted' => "Errore nell'espressione: stack esaurito",
'pfunc_expr_unexpected_number' => "Errore nell'espressione: numero inatteso",
@@ -1096,14 +1228,15 @@ $messages['it'] = array(
*/
$messages['ja'] = array(
'pfunc_desc' => 'パーサーに論理関数を追加して拡張する',
- 'pfunc_time_error' => 'エラー: 時刻が無効です。',
+ 'pfunc_time_error' => 'エラー: 日時が無効です。',
'pfunc_time_too_long' => 'エラー: #time の呼び出しが多すぎます。',
'pfunc_time_too_big' => 'エラー: #time が対応しているのは 9999 年までです。',
+ 'pfunc_time_too_small' => 'エラー: #time が対応しているのは 0 年以降です。',
'pfunc_rel2abs_invalid_depth' => 'エラー: パス「$1」の階層が無効です (ルート階層からのアクセスをお試しください)。',
'pfunc_expr_stack_exhausted' => '構文エラー: スタックを使い果たしました。',
'pfunc_expr_unexpected_number' => '構文エラー: 予期しない数字です。',
'pfunc_expr_preg_match_failure' => '構文エラー: preg_match で予期しない失敗をしました。',
- 'pfunc_expr_unrecognised_word' => '構文エラー: 「$1」を認識できません。',
+ 'pfunc_expr_unrecognised_word' => '構文エラー:「$1」を認識できません。',
'pfunc_expr_unexpected_operator' => '構文エラー: 予期しない演算子 $1 です。',
'pfunc_expr_missing_operand' => '構文エラー: $1 の演算対象がありません。',
'pfunc_expr_unexpected_closing_bracket' => '構文エラー: 予期しない閉じ括弧です。',
@@ -1143,13 +1276,28 @@ $messages['jv'] = array(
/** Georgian (ქართული)
* @author BRUTE
+ * @author David1010
* @author Dawid Deutschland
*/
$messages['ka'] = array(
+ 'pfunc_desc' => 'გაუმჯებესებული სინტაქსური ანალიზატორი ლოგიკური ფუნქციებით',
'pfunc_time_error' => 'შეცდომა: არასწორი დრო',
+ 'pfunc_time_too_long' => 'შეცდომა: #time ფუნქციის ძალიან ბევრი გამოძახება.',
+ 'pfunc_time_too_big' => 'შეცდომა: პარამეტრი #time არ უნდა აჭარბებდეს 9999.',
+ 'pfunc_rel2abs_invalid_depth' => 'შეცდომა: გზის არასწორი სიღრმე: „$1“ (კვანძთან წვდომის ცდა, რომელიც მდებარეობს უფრო მაღლა, ვიდრე ძირეული)',
+ 'pfunc_expr_stack_exhausted' => 'ექსპრესიის შეცდომა: დასტა გადავსებულია.',
+ 'pfunc_expr_unexpected_number' => 'ექსპრესიის შეცდომა: მოულოდნელი რიცხვი.',
+ 'pfunc_expr_preg_match_failure' => 'ექსპრესიის შეცდომა: მოულოდნელი preg_match წარუმატებლობა.',
+ 'pfunc_expr_unrecognised_word' => 'ექსპესიის შეცდომა: ამოუცნობი სიტყვა „$1“.',
+ 'pfunc_expr_unexpected_operator' => 'ექსპრესიის შეცდომა: მოულოდნელი $1 ოპერატორი.',
+ 'pfunc_expr_missing_operand' => 'ექსპრესიის შეცდომა: დაიკარგა ოპერანდი $1-თვის.',
+ 'pfunc_expr_unexpected_closing_bracket' => 'ექსპრესიის შეცდომა: მოულოდნელი დახურვის ფრჩხილი.',
+ 'pfunc_expr_unrecognised_punctuation' => 'ექსპრესიის შეცდომა: ამოუცნობი პუნქტუაციის ნიშანი „$1“.',
+ 'pfunc_expr_unclosed_bracket' => 'ექსპესიის შეცდომა: დაუხურავი ფრჩხილი.',
'pfunc_expr_division_by_zero' => 'გაყოფა ნულით',
'pfunc_expr_invalid_argument' => 'მცდარი არგუმენტი $1: < -1 ან > 1',
'pfunc_expr_invalid_argument_ln' => 'მცდარი არგუმენტი ln: <= 0',
+ 'pfunc_expr_unknown_error' => 'ექსპრესიის შეცდომა: უცნობი შეცდომა ($1).',
'pfunc_expr_not_a_number' => '$1: შედექში ციფრი არაა',
'pfunc_string_too_long' => 'შეცდომა: სტრიქონის ზომა აღემატება $1 სიმბოლოს ლიმიტს',
);
@@ -1230,43 +1378,46 @@ $messages['km'] = array(
* @author Kwj2772
* @author ToePeu
* @author Yknok29
+ * @author 아라
*/
$messages['ko'] = array(
- 'pfunc_desc' => '파서에 논리 함수를 추가',
+ 'pfunc_desc' => '파서에 논리 함수를 추가합니다',
'pfunc_time_error' => '오류: 시간이 잘못되었습니다.',
'pfunc_time_too_long' => '오류: #time을 너무 많이 썼습니다.',
'pfunc_time_too_big' => '오류: #time 함수는 9999년까지만을 지원합니다.',
+ 'pfunc_time_too_small' => '오류: #time은 0년부터만 지원합니다.',
'pfunc_rel2abs_invalid_depth' => '오류: 경로 구조가 잘못되었습니다: "$1" (루트 노드 위의 노드에 접속을 시도했습니다)',
'pfunc_expr_stack_exhausted' => '표현 오류: 스택이 비어 있습니다.',
- 'pfunc_expr_unexpected_number' => '표현식 오류: 예상치 못한 값',
- 'pfunc_expr_preg_match_failure' => '표현식 오류: 예상치 못한 preg_match 오류',
- 'pfunc_expr_unrecognised_word' => '표현식 오류: 알 수 없는 단어 ‘$1’',
- 'pfunc_expr_unexpected_operator' => '표현 오류: 잘못된 $1 연산자',
+ 'pfunc_expr_unexpected_number' => '표현식 오류: 예상치 못한 숫자입니다.',
+ 'pfunc_expr_preg_match_failure' => '표현식 오류: 예상치 못한 preg_match 실패입니다.',
+ 'pfunc_expr_unrecognised_word' => '표현식 오류: "$1" 낱말을 알 수 없습니다.',
+ 'pfunc_expr_unexpected_operator' => '표현 오류: 예상치 못한 $1 연산자입니다.',
'pfunc_expr_missing_operand' => '표현 오류: $1의 피연산자가 없습니다.',
- 'pfunc_expr_unexpected_closing_bracket' => '표현 오류: 예상치 못한 괄호 닫기',
- 'pfunc_expr_unrecognised_punctuation' => '표현 오류: 알 수 없는 문자 "$1"',
+ 'pfunc_expr_unexpected_closing_bracket' => '표현 오류: 예상치 못한 괄호 닫기입니다.',
+ 'pfunc_expr_unrecognised_punctuation' => '표현 오류: 알 수 없는 "$1" 구두점 문자입니다.',
'pfunc_expr_unclosed_bracket' => '표현 오류: 괄호를 닫지 않았습니다.',
- 'pfunc_expr_division_by_zero' => '0으로 나눔',
+ 'pfunc_expr_division_by_zero' => '0으로 나눴습니다.',
'pfunc_expr_invalid_argument' => '$1 함수의 변수가 잘못되었습니다: < -1 또는 > 1',
'pfunc_expr_invalid_argument_ln' => '자연로그의 진수가 잘못되었습니다: <= 0',
- 'pfunc_expr_unknown_error' => '표현 오류: 알려지지 않은 오류 ($1)',
+ 'pfunc_expr_unknown_error' => '표현 오류: 알 수 없는 오류($1)입니다.',
'pfunc_expr_not_a_number' => '$1: 결과가 숫자가 아닙니다.',
'pfunc_string_too_long' => '오류: $1자 제한을 초과하였습니다.',
);
/** Colognian (Ripoarisch)
+ * @author Amire80
* @author Purodha
* @author Rentenirer
*/
$messages['ksh'] = array(
'pfunc_desc' => 'Deit em Wiki Funxione för Entscheidunge un esu jät dobei.',
'pfunc_time_error' => 'Fähler: Onjöltijje Zick.',
- 'pfunc_time_too_long' => 'Fähler: <code>#time</code> weed zo öff jebruch.',
- 'pfunc_time_too_big' => 'Ene Fähleres opjefalle: <code lang="en">#time</code> kann bloß bes nohm Johr 9999 jonn.',
+ 'pfunc_time_too_long' => 'Fähler: #time weed zo öff jebruch.',
+ 'pfunc_time_too_big' => 'Ene Fähleres opjefalle: #time kann bloß bes nohm Johr 9999 jonn.',
'pfunc_rel2abs_invalid_depth' => 'Fähler: Zo fill „retuur“ em Pahdt „$1“ — mer wöre wigger wi för der Aanfang zeröck jejange.',
- 'pfunc_expr_stack_exhausted' => 'Fähler en enem Ußdrock: Dä löht der <i lang="en">stack</i> övverloufe.',
+ 'pfunc_expr_stack_exhausted' => 'Fähler en enem Ußdrock: Dä löht der stack övverloufe.',
'pfunc_expr_unexpected_number' => 'Fähler en enem Ußdrock: En Zahl dom_mer nit äwaade.',
- 'pfunc_expr_preg_match_failure' => 'Fähler en enem Ußdrock: Esu ene Fähler en „<i lang="en">preg_match</i>“ dum_mer nit äwade.',
+ 'pfunc_expr_preg_match_failure' => 'Fähler en enem Ußdrock: Esu ene Fähler en „preg_match“ dum_mer nit äwade.',
'pfunc_expr_unrecognised_word' => 'Fähler en enem Ußdrock: Dat Woot „$1“ es unbikannt.',
'pfunc_expr_unexpected_operator' => 'Fähler en enem Ußdrock: Dat Räschezeiche „$1“ dom_mer hee nit äwaade.',
'pfunc_expr_missing_operand' => 'Fähler en enem Ußdrock: För dat Räschezeiche „$1“ dom_mer ävver ene Operand äwaade.',
@@ -1274,10 +1425,10 @@ $messages['ksh'] = array(
'pfunc_expr_unrecognised_punctuation' => 'Fähler en enem Ußdrock: Dat Satzzeiche „$1“ dom_mer esu nit äwaade.',
'pfunc_expr_unclosed_bracket' => 'Fähler en enem Ußdrock: Do fählt en eckijje Klammer-Zoh.',
'pfunc_expr_division_by_zero' => 'Fähler en enem Ußdrock: Dorsch Noll jedeilt.',
- 'pfunc_expr_invalid_argument' => 'Fähler: Dä Parrameeter för <code>$1</code> moß -1 udder 1 sin, udder dozwesche lijje.',
- 'pfunc_expr_invalid_argument_ln' => 'Fähler: Dä Parrameeter för <code>ln</code> moß 0 udder kleiner wi 0 sin.',
+ 'pfunc_expr_invalid_argument' => 'Fähler: Dä Parrameeter för $1 moß -1 udder 1 sin, udder dozwesche lijje.',
+ 'pfunc_expr_invalid_argument_ln' => 'Fähler: Dä Parrameeter för ln moß 0 udder kleiner wi 0 sin.',
'pfunc_expr_unknown_error' => 'Fähler en enem Ußdrock: Unbikannt ($1)',
- 'pfunc_expr_not_a_number' => 'Fähler en enem Ußdrock: En <code>$1</code> es dat wat erus kütt kein Zahl.',
+ 'pfunc_expr_not_a_number' => 'Fähler en enem Ußdrock: En $1 es dat wat erus kütt kein Zahl.',
'pfunc_string_too_long' => 'Fähler en enem Ußdrock: En Zeijshereih es länger wi $1 Zeijshe.',
);
@@ -1292,8 +1443,8 @@ $messages['lb'] = array(
'pfunc_expr_stack_exhausted' => 'Expressiouns-Feeler: Stack iwwergelaf',
'pfunc_expr_unexpected_number' => 'Expressiouns-Feeler: Onerwarten Zuel',
'pfunc_expr_unrecognised_word' => 'Expressiouns-Feeler: Onerkantent Wuert "$1"',
- 'pfunc_expr_unexpected_operator' => 'Expression-Feeler: Onerwarten Operateur: <tt>$1</tt>',
- 'pfunc_expr_missing_operand' => 'Expression-Feeler: Et feelt en Operand fir <tt>$1</tt>',
+ 'pfunc_expr_unexpected_operator' => 'Expression-Feeler: Onerwarten Operateur: $1',
+ 'pfunc_expr_missing_operand' => 'Expression-Feeler: Et feelt en Operand fir $1',
'pfunc_expr_unexpected_closing_bracket' => 'Expressiouns-Feeler: Onerwarte Klammer déi zougemaach gëtt',
'pfunc_expr_unrecognised_punctuation' => 'Expressiouns-Feeler: D\'Sazzeechen "$1" gouf net erkannt',
'pfunc_expr_unclosed_bracket' => 'Expressiouns-Feeler: Eckeg Klammer net zougemaach',
@@ -1356,6 +1507,7 @@ $messages['mk'] = array(
'pfunc_time_error' => 'Грешка: погрешен формат за време',
'pfunc_time_too_long' => 'Грешка: премногу повикувања на функцијата #time',
'pfunc_time_too_big' => 'Грешка: #time поддржува само години до 9999',
+ 'pfunc_time_too_small' => 'Грешка: #time поддржува само години од 0 натаму.',
'pfunc_rel2abs_invalid_depth' => 'Грешка: Неважечка длабочина во патеката: „$1“ (обид за пристап до јазол кој се наоѓа повисоко од коренитиот)',
'pfunc_expr_stack_exhausted' => 'Грешка во изразот: Складот е преполн',
'pfunc_expr_unexpected_number' => 'Грешка во изразот: Неочекуван број',
@@ -1438,6 +1590,7 @@ $messages['ms'] = array(
'pfunc_time_error' => 'Ralat: waktu tidak sah',
'pfunc_time_too_long' => 'Ralat: terlalu banyak panggilan #time',
'pfunc_time_too_big' => 'Ralat: #time hanya menyokong tahun sehingga 9999',
+ 'pfunc_time_too_small' => 'Ralat: #time hanya menyokong tahun-tahun mulai 0.',
'pfunc_rel2abs_invalid_depth' => 'Ralat: Kedalaman tidak sah dalam laluan: "$1" (cubaan mencapai nod di atas nod induk)',
'pfunc_expr_stack_exhausted' => 'Ralat ungkapan: Tindanan tuntas',
'pfunc_expr_unexpected_number' => 'Ralat ungkapan: Nombor tidak dijangka',
@@ -1541,6 +1694,7 @@ $messages['nl'] = array(
'pfunc_time_error' => 'Fout: ongeldige tijd.',
'pfunc_time_too_long' => 'Fout: #time te vaak aangeroepen.',
'pfunc_time_too_big' => 'Fout: #time ondersteunt jaren tot maximaal 9999',
+ 'pfunc_time_too_small' => 'Fout: #time ondersteunt alleen jaren vanaf 0.',
'pfunc_rel2abs_invalid_depth' => 'Fout: ongeldige diepte in pad: "$1" (probeerde een node boven de stamnode aan te roepen).',
'pfunc_expr_stack_exhausted' => 'Fout in uitdrukking: stack uitgeput.',
'pfunc_expr_unexpected_number' => 'Fout in uitdrukking: onverwacht getal.',
@@ -1593,7 +1747,7 @@ $messages['nn'] = array(
* @author Jfblanc
*/
$messages['oc'] = array(
- 'pfunc_desc' => 'Augmenta lo parser amb de foncions logicas',
+ 'pfunc_desc' => 'Aumenta lo parser amb de foncions logicas',
'pfunc_time_error' => 'Error: durada invalida',
'pfunc_time_too_long' => 'Error: parser #time apelat tròp de còps',
'pfunc_rel2abs_invalid_depth' => 'Error: nivèl de repertòri invalid dins lo camin : "$1" (a ensajat d’accedir a un nivèl al-dessús del repertòri raiç)',
@@ -1614,10 +1768,38 @@ $messages['oc'] = array(
'pfunc_string_too_long' => 'Error : La cadena depassa lo limit maximal de $1 caractèr{{PLURAL:$1||s}}',
);
+/** Oriya (ଓଡ଼ିଆ)
+ * @author Jnanaranjan Sahu
+ */
+$messages['or'] = array(
+ 'pfunc_desc' => 'ପାର୍ସରକୁ ଯୁକ୍ତିମୂଳକ ବ୍ୟବହାରିତା ଦେଇ ଉନ୍ନତ କରନ୍ତୁ',
+ 'pfunc_time_error' => 'ଅସୁବିଧା: ଅବୈଧ ସମୟ ।',
+ 'pfunc_time_too_long' => 'ଅସୁବିଧା: ଅତ୍ୟଧିକ #time ଡକରା ।',
+ 'pfunc_time_too_big' => 'ଅସୁବିଧା: #time କେବଳ 9999ବର୍ଷ ପର୍ଯ୍ୟନ୍ତ ଭିତରେ ରହିପାରିବ ।',
+ 'pfunc_rel2abs_invalid_depth' => 'ଅସୁବିଧା: "$1" ପଥରେ ଅଜଣା ଦୂରତା (ମୂଳ ନୋଡ ଠାରୁ ଆହୁରି ଭିତରକୁ ଯିବାକୁ ଚେଷ୍ଟା କରୁଛି) ।',
+ 'pfunc_expr_stack_exhausted' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଷ୍ଟାକ ପୂର୍ଣ ହୋଇଗଲା ।',
+ 'pfunc_expr_unexpected_number' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଅଜଣା ସଂଖ୍ୟା ।',
+ 'pfunc_expr_preg_match_failure' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଅଜଣା ପ୍ରେଗ_ମିଳନରେ ଅସୁବିଧା ।',
+ 'pfunc_expr_unrecognised_word' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଅଜଣା ଶବ୍ଦ "$1"',
+ 'pfunc_expr_unexpected_operator' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଅଜଣା $1 ଯୁକ୍ତାକ୍ଷର ।',
+ 'pfunc_expr_missing_operand' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: $1 ପାଇଁ ଅକ୍ଷର ନାହିଁ ।',
+ 'pfunc_expr_unexpected_closing_bracket' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଅଜଣା ବନ୍ଧନୀ ।',
+ 'pfunc_expr_unrecognised_punctuation' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଅଜଣା ଚିହ୍ନ "$1" ।',
+ 'pfunc_expr_unclosed_bracket' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ବନ୍ଧନୀ ଶେଷ ହୋଇନାହିଁ ।',
+ 'pfunc_expr_division_by_zero' => 'ଶୁନ ଦ୍ଵାରା ଭାଗ ।',
+ 'pfunc_expr_invalid_argument' => '$1 ପାଇଁ ଅବୈଧ ଯୁକ୍ତି:< -୧ କିମ୍ବା > ୧ ।',
+ 'pfunc_expr_invalid_argument_ln' => 'ln ପାଇଁ ଅବୈଧ ଲେଖା: <= 0 ।',
+ 'pfunc_expr_unknown_error' => 'ପ୍ରକାଶନରେ ଅସୁବିଧା: ଅଜଣା ଅସୁବିଧା ($1) ।',
+ 'pfunc_expr_not_a_number' => '$1ରେ: ଫଳାଫଳଟି ସଂଖ୍ୟା ନୁହେଁ ।',
+ 'pfunc_string_too_long' => 'ଅସୁବିଧା: ଧାଡିଟି $1 ଅକ୍ଷର ସୀମାଠୁ ଅଧିକ ହେଲାଣି ।',
+);
+
/** Polish (polski)
+ * @author Chrumps
* @author Derbeth
* @author Grzechooo
* @author Sp5uhe
+ * @author WTM
* @author Woytecr
*/
$messages['pl'] = array(
@@ -1625,6 +1807,7 @@ $messages['pl'] = array(
'pfunc_time_error' => 'Błąd – niepoprawny czas',
'pfunc_time_too_long' => 'Błąd – zbyt wiele wywołań funkcji #time',
'pfunc_time_too_big' => 'Błąd – rok w #time nie może być większy niż 9999',
+ 'pfunc_time_too_small' => 'Błąd: #time obsługuje tylko lata od 0.',
'pfunc_rel2abs_invalid_depth' => 'Błąd – nieprawidłowa głębokość w ścieżce „$1” (próba dostępu do węzła powyżej korzenia)',
'pfunc_expr_stack_exhausted' => 'Błąd w wyrażeniu – stos wyczerpany',
'pfunc_expr_unexpected_number' => 'Błąd w wyrażeniu – nieoczekiwana liczba',
@@ -1803,6 +1986,7 @@ $messages['roa-tara'] = array(
'pfunc_time_error' => 'Errore: Orarie invalide',
'pfunc_time_too_long' => 'Errore: stonne troppe #time chiamate',
'pfunc_time_too_big' => "Errore: #time vole sulamende valore de anne 'mbonde a 9999",
+ 'pfunc_time_too_small' => "Errore: #time pigghie anne sulamende da 'u 0.",
'pfunc_rel2abs_invalid_depth' => "Errore: Profondità invalide jndr'à 'u percorse: \"\$1\" (s'à pruvate a pigghià 'nu node sus a 'u node radice)",
'pfunc_expr_stack_exhausted' => 'Espressione in errore: Stack anghiute',
'pfunc_expr_unexpected_number' => 'Espressione in errore: Numere inaspettate',
@@ -2091,8 +2275,8 @@ $messages['stq'] = array(
'pfunc_expr_unexpected_number' => 'Expression-Failer: Nit ferwachtede Taal',
'pfunc_expr_preg_match_failure' => 'Expression-Failer: Uunferwachtede „preg_match“-Failfunktion',
'pfunc_expr_unrecognised_word' => 'Expression-Failer: Nit wierkoand Woud „$1“',
- 'pfunc_expr_unexpected_operator' => 'Expression-Failer: Uunferwachteden Operator: <strong><tt>$1</tt></strong>',
- 'pfunc_expr_missing_operand' => 'Expression-Failer: Failenden Operand foar <strong><tt>$1</tt></strong>',
+ 'pfunc_expr_unexpected_operator' => 'Expression-Failer: Uunferwachteden Operator: $1',
+ 'pfunc_expr_missing_operand' => 'Expression-Failer: Failenden Operand foar $1',
'pfunc_expr_unexpected_closing_bracket' => 'Expression-Failer: Uunferwachte sluutende kaantige Klammere',
'pfunc_expr_unrecognised_punctuation' => 'Expression-Failer: Nit wierkoand Satsteeken „$1“',
'pfunc_expr_unclosed_bracket' => 'Expression-Failer: Nit sleetene kaantige Klammer',
@@ -2145,6 +2329,13 @@ $messages['sv'] = array(
'pfunc_string_too_long' => 'Fel: Strängen överskrider gränsen på $1 tecken',
);
+/** Tamil (தமிழ்)
+ * @author Shanmugamp7
+ */
+$messages['ta'] = array(
+ 'pfunc_time_error' => 'பிழை: செல்லாத நேரம்',
+);
+
/** Telugu (తెలుగు)
* @author Mpradeep
* @author Veeven
@@ -2309,14 +2500,23 @@ $messages['tr'] = array(
'pfunc_string_too_long' => 'Hata: Dize $1 karakter sınırını geçiyor',
);
+/** Uyghur (Arabic script) (ئۇيغۇرچە)
+ * @author Sahran
+ */
+$messages['ug-arab'] = array(
+ 'pfunc_expr_division_by_zero' => 'نۆلگە بۆلۈنگەن.',
+);
+
/** Ukrainian (українська)
* @author AS
* @author Ahonc
+ * @author Base
*/
$messages['uk'] = array(
'pfunc_desc' => 'Покращений синтаксичний аналізатор з логічними функціями',
'pfunc_time_error' => 'Помилка: неправильний час',
'pfunc_time_too_long' => 'Помилка: забагато викликів функції #time',
+ 'pfunc_time_too_big' => 'Помилка: Параметр #time підтримує роки лише до 9999.',
'pfunc_rel2abs_invalid_depth' => 'Помилка: неправильна глибина шляху: «$1» (спроба доступу до вузла, що знаходиться вище, ніж кореневий)',
'pfunc_expr_stack_exhausted' => 'Помилка виразу: стек переповнений',
'pfunc_expr_unexpected_number' => 'Помилка виразу: неочікуване число',
@@ -2337,11 +2537,14 @@ $messages['uk'] = array(
/** vèneto (vèneto)
* @author Candalua
+ * @author GatoSelvadego
*/
$messages['vec'] = array(
'pfunc_desc' => 'Zonta al parser na serie de funsion logiche',
'pfunc_time_error' => 'Eror: orario mìa valido',
'pfunc_time_too_long' => 'Eror: massa chiamate a #time',
+ 'pfunc_time_too_big' => 'Eror: #time suporta soło che fin al ano 9999',
+ 'pfunc_time_too_small' => "Eror: #time suporta soło che da l'ano 0.",
'pfunc_rel2abs_invalid_depth' => 'Eror: profondità mìa valida nel percorso "$1" (se gà proà a accédar a un nodo piassè sora de la raìsa)',
'pfunc_expr_stack_exhausted' => "Eror ne l'espression: stack esaurìo",
'pfunc_expr_unexpected_number' => "Eror ne l'espression: xe vegnù fora un nùmaro che no se se spetava",
@@ -2375,7 +2578,8 @@ $messages['vi'] = array(
'pfunc_desc' => 'Nâng cao bộ xử lý với những hàm cú pháp lôgic',
'pfunc_time_error' => 'Lỗi: thời gian không hợp lệ',
'pfunc_time_too_long' => 'Lỗi: quá nhiều lần gọi #time',
- 'pfunc_time_too_big' => 'Lỗi: #time chỉ hỗ trợ các năm cho tới 9999',
+ 'pfunc_time_too_big' => 'Lỗi: #time chỉ hỗ trợ các năm cho tới 9999.',
+ 'pfunc_time_too_small' => 'Lỗi: #time chỉ hỗ trợ cho các năm 0 trở lên.',
'pfunc_rel2abs_invalid_depth' => 'Lỗi: độ sâu không hợp lệ trong đường dẫn “$1” (do cố gắng truy cập nút phía trên nút gốc)',
'pfunc_expr_stack_exhausted' => 'Lỗi biểu thức: Đã cạn stack',
'pfunc_expr_unexpected_number' => 'Lỗi biểu thức: Dư số',
@@ -2481,16 +2685,17 @@ $messages['zh-hans'] = array(
/** Traditional Chinese (中文(繁體)‎)
* @author Gaoxuewei
+ * @author Justincheng12345
* @author Liangent
* @author Mark85296341
* @author Shinjiman
* @author Waihorace
*/
$messages['zh-hant'] = array(
- 'pfunc_desc' => '用邏輯函數加強解析器',
- 'pfunc_time_error' => '錯誤:無效時間',
- 'pfunc_time_too_long' => '錯誤:過多的 #time 呼叫',
- 'pfunc_time_too_big' => '錯誤:#時間只支援至9999年',
+ 'pfunc_desc' => '使用邏輯函數加強解析器',
+ 'pfunc_time_error' => '錯誤:無效時間。',
+ 'pfunc_time_too_long' => '錯誤:過多#time呼叫。',
+ 'pfunc_time_too_big' => '錯誤:#time只支援至9999年。',
'pfunc_rel2abs_invalid_depth' => '錯誤:無效路徑深度:「$1」(嘗試訪問頂點以上節點)',
'pfunc_expr_stack_exhausted' => '表達式錯誤:堆疊耗盡',
'pfunc_expr_unexpected_number' => '表達式錯誤:未預料的數字',
diff --git a/extensions/ParserFunctions/ParserFunctions.php b/extensions/ParserFunctions/ParserFunctions.php
index ef2ad8d3..4ef62047 100644
--- a/extensions/ParserFunctions/ParserFunctions.php
+++ b/extensions/ParserFunctions/ParserFunctions.php
@@ -33,7 +33,7 @@ $wgPFEnableStringFunctions = false;
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'ParserFunctions',
- 'version' => '1.4.1',
+ 'version' => '1.5.1',
'url' => 'https://www.mediawiki.org/wiki/Extension:ParserFunctions',
'author' => array( 'Tim Starling', 'Robert Rohde', 'Ross McClure', 'Juraj Simlovic' ),
'descriptionmsg' => 'pfunc_desc',
@@ -41,6 +41,7 @@ $wgExtensionCredits['parserhook'][] = array(
$wgAutoloadClasses['ExtParserFunctions'] = dirname( __FILE__ ) . '/ParserFunctions_body.php';
$wgAutoloadClasses['ExprParser'] = dirname( __FILE__ ) . '/Expr.php';
+$wgAutoloadClasses['ExprError'] = dirname( __FILE__ ) . '/Expr.php';
$wgExtensionMessagesFiles['ParserFunctions'] = dirname( __FILE__ ) . '/ParserFunctions.i18n.php';
$wgExtensionMessagesFiles['ParserFunctionsMagic'] = dirname( __FILE__ ) . '/ParserFunctions.i18n.magic.php';
@@ -85,3 +86,14 @@ function wfRegisterParserFunctions( $parser ) {
return true;
}
+
+$wgHooks['UnitTestsList'][] = 'wfParserFunctionsTests';
+
+/**
+ * @param $files array
+ * @return bool
+ */
+function wfParserFunctionsTests( &$files ) {
+ $files[] = dirname( __FILE__ ) . '/tests/ExpressionTest.php';
+ return true;
+}
diff --git a/extensions/ParserFunctions/ParserFunctions_body.php b/extensions/ParserFunctions/ParserFunctions_body.php
index 879b7a15..967e8339 100644
--- a/extensions/ParserFunctions/ParserFunctions_body.php
+++ b/extensions/ParserFunctions/ParserFunctions_body.php
@@ -452,10 +452,10 @@ class ExtParserFunctions {
} else {
$tz = new DateTimeZone( date_default_timezone_get() );
}
- $dateObject->setTimezone( $tz );
} else {
- $dateObject->setTimezone( $utc );
+ $tz = $utc;
}
+ $dateObject->setTimezone( $tz );
# Generate timestamp
$ts = $dateObject->format( 'YmdHis' );
@@ -471,14 +471,16 @@ class ExtParserFunctions {
if ( self::$mTimeChars > self::$mMaxTimeChars ) {
return '<strong class="error">' . wfMessage( 'pfunc_time_too_long' )->inContentLanguage()->escaped() . '</strong>';
} else {
- if ( $ts < 100000000000000 ) { // Language can't deal with years after 9999
+ if ( $ts < 0 ) { // Language can't deal with BC years
+ return '<strong class="error">' . wfMessage( 'pfunc_time_too_small' )->inContentLanguage()->escaped() . '</strong>';
+ } elseif ( $ts < 100000000000000 ) { // Language can't deal with years after 9999
if ( $language !== '' && Language::isValidBuiltInCode( $language ) ) {
// use whatever language is passed as a parameter
$langObject = Language::factory( $language );
- $result = $langObject->sprintfDate( $format, $ts );
+ $result = $langObject->sprintfDate( $format, $ts, $tz );
} else {
// use wiki's content language
- $result = $parser->getFunctionLang()->sprintfDate( $format, $ts );
+ $result = $parser->getFunctionLang()->sprintfDate( $format, $ts, $tz );
}
} else {
return '<strong class="error">' . wfMessage( 'pfunc_time_too_big' )->inContentLanguage()->escaped() . '</strong>';
diff --git a/extensions/ParserFunctions/exprTests.txt b/extensions/ParserFunctions/exprTests.txt
deleted file mode 100644
index d842d462..00000000
--- a/extensions/ParserFunctions/exprTests.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-1 + 1 = 2
--1 + 1 = 0
-+1 + 1 = 2
-4 * 4 = 16
--4 * -4 = 4 * 4
-(1/3) * 3 = 1
-3 / 1.5 = 2
-3 mod 2 = 1
-1 or 0
-not (1 and 0)
-not 0
-4.0 round 0; 4
-ceil 4; 4
-floor 4; 4
-4.5 round 0; 5
-4.2 round 0; 4
--4.2 round 0; -4
--4.5 round 0; -5
--2.0 round 0; -2
-ceil -3; -3
-floor -6.0; -6
-ceil 4.2; 5
-ceil -4.5; -4
-floor -4.5; -5
-4 < 5
--5 < 2
--2 <= -2
-abs(-2); 2
-4 > 3
-4 > -3
-5 >= 2
-2 >= 2
-1 != 2
-not (1 != 1)
-1e4 = 10000
-1e-2 = 0.01
-ln(exp(1));1
-trunc(4.5);4
-trunc(-4.5);-4
diff --git a/extensions/ParserFunctions/funcsParserTests.txt b/extensions/ParserFunctions/funcsParserTests.txt
index a741836a..2ff7ba3d 100644
--- a/extensions/ParserFunctions/funcsParserTests.txt
+++ b/extensions/ParserFunctions/funcsParserTests.txt
@@ -94,6 +94,15 @@ Explicitely specified output language (Dutch)
!! end
!! test
+Preserve tags in #switch default value
+!! input
+{{#switch:a|b|<div>c</div>}}
+!! result
+<div>c</div>
+
+!! end
+
+!! test
Bug 19093: Default values don't fall through in switch
!! input
<{{#switch: foo | bar | #default = DEF }}>
@@ -211,3 +220,15 @@ Bug 22866: #ifexpr should evaluate "-0" as false
<p>false
</p>
!! end
+
+!! test
+Templates: Parser functions don't strip whitespace from positional parameters
+!! input
+{{#if: {{foo}}
+| no-pre-then
+| no-pre-else
+}}
+!! result
+<p>no-pre-then
+</p>
+!! end
diff --git a/extensions/ParserFunctions/testExpr.php b/extensions/ParserFunctions/testExpr.php
deleted file mode 100644
index b3336c53..00000000
--- a/extensions/ParserFunctions/testExpr.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
- ? getenv( 'MW_INSTALL_PATH' ) . "/maintenance/commandLine.inc"
- : dirname( __FILE__ ) . '/../../maintenance/commandLine.inc' );
-require( 'Expr.php' );
-
-$tests = file( 'exprTests.txt' );
-
-$pass = $fail = 0;
-
-// Each test is on one line. The test must always evaluate to '1'.
-$parser = new ExprParser;
-foreach ( $tests as $test ) {
- $test = trim( $test );
- if ( strpos( $test, ';' ) !== false )
- list( $input, $expected ) = explode( ';', $test );
- else {
- $input = $test;
- $expected = 1;
- }
-
- $expected = trim( $expected );
- $input = trim( $input );
-
- $result = $parser->doExpression( $input );
- if ( $result != $expected ) {
- print
- "FAILING test -- $input
- gave a final result of $result, instead of $expected.\n";
- $fail++;
- } else {
- print "PASSED test $test\n";
- $pass++;
- }
-}
-
-print "Passed $pass tests, failed $fail tests, out of a total of " . ( $pass + $fail ) . "\n"; \ No newline at end of file