summaryrefslogtreecommitdiff
path: root/extensions/ParserFunctions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ParserFunctions')
-rw-r--r--extensions/ParserFunctions/Expr.php2
-rw-r--r--extensions/ParserFunctions/ParserFunctions.hooks.php68
-rw-r--r--extensions/ParserFunctions/ParserFunctions.i18n.magic.php24
-rw-r--r--extensions/ParserFunctions/ParserFunctions.i18n.php35
-rw-r--r--extensions/ParserFunctions/ParserFunctions.library.php2
-rw-r--r--extensions/ParserFunctions/ParserFunctions.php125
-rw-r--r--extensions/ParserFunctions/ParserFunctions_body.php102
-rw-r--r--extensions/ParserFunctions/extension.json48
-rw-r--r--extensions/ParserFunctions/i18n/ace.json9
-rw-r--r--extensions/ParserFunctions/i18n/arq.json12
-rw-r--r--extensions/ParserFunctions/i18n/az.json18
-rw-r--r--extensions/ParserFunctions/i18n/azb.json6
-rw-r--r--extensions/ParserFunctions/i18n/bgn.json11
-rw-r--r--extensions/ParserFunctions/i18n/ca.json2
-rw-r--r--extensions/ParserFunctions/i18n/de.json8
-rw-r--r--extensions/ParserFunctions/i18n/es.json11
-rw-r--r--extensions/ParserFunctions/i18n/et.json2
-rw-r--r--extensions/ParserFunctions/i18n/frr.json11
-rw-r--r--extensions/ParserFunctions/i18n/gom-deva.json12
-rw-r--r--extensions/ParserFunctions/i18n/id.json7
-rw-r--r--extensions/ParserFunctions/i18n/it.json11
-rw-r--r--extensions/ParserFunctions/i18n/ko.json17
-rw-r--r--extensions/ParserFunctions/i18n/ksh.json7
-rw-r--r--extensions/ParserFunctions/i18n/lrc.json11
-rw-r--r--extensions/ParserFunctions/i18n/lt.json6
-rw-r--r--extensions/ParserFunctions/i18n/mai.json10
-rw-r--r--extensions/ParserFunctions/i18n/nap.json11
-rw-r--r--extensions/ParserFunctions/i18n/ne.json7
-rw-r--r--extensions/ParserFunctions/i18n/pfl.json11
-rw-r--r--extensions/ParserFunctions/i18n/ps.json7
-rw-r--r--extensions/ParserFunctions/i18n/qqq.json5
-rw-r--r--extensions/ParserFunctions/i18n/rue.json5
-rw-r--r--extensions/ParserFunctions/i18n/shn.json9
-rw-r--r--extensions/ParserFunctions/i18n/sr-ec.json4
-rw-r--r--extensions/ParserFunctions/i18n/sr-el.json4
-rw-r--r--extensions/ParserFunctions/i18n/szl.json10
-rw-r--r--extensions/ParserFunctions/i18n/th.json5
-rw-r--r--extensions/ParserFunctions/i18n/ur.json9
-rw-r--r--extensions/ParserFunctions/i18n/yi.json3
-rw-r--r--extensions/ParserFunctions/i18n/yue.json8
-rw-r--r--extensions/ParserFunctions/i18n/zh-hans.json5
41 files changed, 392 insertions, 288 deletions
diff --git a/extensions/ParserFunctions/Expr.php b/extensions/ParserFunctions/Expr.php
index 70d9b8d4..ef98c263 100644
--- a/extensions/ParserFunctions/Expr.php
+++ b/extensions/ParserFunctions/Expr.php
@@ -48,7 +48,7 @@ define( 'EXPR_PI', 36 );
define( 'EXPR_FMOD', 37 );
define( 'EXPR_SQRT' , 38 );
-class ExprError extends MWException {
+class ExprError extends Exception {
/**
* @param $msg string
* @param $parameter string
diff --git a/extensions/ParserFunctions/ParserFunctions.hooks.php b/extensions/ParserFunctions/ParserFunctions.hooks.php
new file mode 100644
index 00000000..bac580c0
--- /dev/null
+++ b/extensions/ParserFunctions/ParserFunctions.hooks.php
@@ -0,0 +1,68 @@
+<?php
+
+class ParserFunctionsHooks {
+
+ /**
+ * Enable string functions, when running Wikimedia Jenkins unit tests.
+ *
+ * Running Jenkins unit tests without setting $wgPFEnableStringFunctions = true;
+ * will cause all the parser tests for string functions to be skipped.
+ */
+ public static function onRegistration() {
+ if ( isset( $GLOBALS['wgWikimediaJenkinsCI'] ) && $GLOBALS['wgWikimediaJenkinsCI'] === true ) {
+ $GLOBALS['wgPFEnableStringFunctions'] = true;
+ }
+ }
+
+ /**
+ * @param $parser Parser
+ * @return bool
+ */
+ public static function onParserFirstCallInit( $parser ) {
+ global $wgPFEnableStringFunctions;
+
+ // These functions accept DOM-style arguments
+ $parser->setFunctionHook( 'if', 'ExtParserFunctions::ifObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'ifeq', 'ExtParserFunctions::ifeqObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'switch', 'ExtParserFunctions::switchObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'ifexist', 'ExtParserFunctions::ifexistObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'ifexpr', 'ExtParserFunctions::ifexprObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'iferror', 'ExtParserFunctions::iferrorObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'time', 'ExtParserFunctions::timeObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'timel', 'ExtParserFunctions::localTimeObj', Parser::SFH_OBJECT_ARGS );
+
+ $parser->setFunctionHook( 'expr', 'ExtParserFunctions::expr' );
+ $parser->setFunctionHook( 'rel2abs', 'ExtParserFunctions::rel2abs' );
+ $parser->setFunctionHook( 'titleparts', 'ExtParserFunctions::titleparts' );
+
+ // String Functions
+ if ( $wgPFEnableStringFunctions ) {
+ $parser->setFunctionHook( 'len', 'ExtParserFunctions::runLen' );
+ $parser->setFunctionHook( 'pos', 'ExtParserFunctions::runPos' );
+ $parser->setFunctionHook( 'rpos', 'ExtParserFunctions::runRPos' );
+ $parser->setFunctionHook( 'sub', 'ExtParserFunctions::runSub' );
+ $parser->setFunctionHook( 'count', 'ExtParserFunctions::runCount' );
+ $parser->setFunctionHook( 'replace', 'ExtParserFunctions::runReplace' );
+ $parser->setFunctionHook( 'explode', 'ExtParserFunctions::runExplode' );
+ $parser->setFunctionHook( 'urldecode', 'ExtParserFunctions::runUrlDecode' );
+ }
+
+ return true;
+ }
+
+ /**
+ * @param $files array
+ * @return bool
+ */
+ public static function onUnitTestsList( &$files ) {
+ $files[] = __DIR__ . '/tests/ExpressionTest.php';
+ return true;
+ }
+
+ public static function onScribuntoExternalLibraries( $engine, array &$extraLibraries ) {
+ if ( $engine == 'lua' ) {
+ $extraLibraries['mw.ext.ParserFunctions'] = 'Scribunto_LuaParserFunctionsLibrary';
+ }
+ return true;
+ }
+}
diff --git a/extensions/ParserFunctions/ParserFunctions.i18n.magic.php b/extensions/ParserFunctions/ParserFunctions.i18n.magic.php
index d4e1b0f9..363f8781 100644
--- a/extensions/ParserFunctions/ParserFunctions.i18n.magic.php
+++ b/extensions/ParserFunctions/ParserFunctions.i18n.magic.php
@@ -216,6 +216,20 @@ $magicWords['fr'] = array(
'urldecode' => array( 0, 'décoderurl', 'decodeurl' ),
);
+/** Western Frisian (Frysk) */
+$magicWords['fy'] = array(
+ 'expr' => array( 0, 'ekspresje' ),
+ 'if' => array( 0, 'as' ),
+ 'ifeq' => array( 0, 'asgelyk' ),
+ 'ifexpr' => array( 0, 'asekspresje' ),
+ 'iferror' => array( 0, 'asflater' ),
+ 'switch' => array( 0, 'skeakelje' ),
+ 'default' => array( 0, '#standert' ),
+ 'ifexist' => array( 0, 'asbestiet' ),
+ 'time' => array( 0, 'tiid' ),
+ 'timel' => array( 0, 'tiidl' ),
+);
+
/** Hebrew (עברית) */
$magicWords['he'] = array(
'expr' => array( 0, 'חשב' ),
@@ -607,7 +621,7 @@ $magicWords['ur'] = array(
'if' => array( 0, 'اگر' ),
);
-/** Uzbek (oʻzbekcha) */
+/** Uzbek (oʻzbekcha/ўзбекча) */
$magicWords['uz'] = array(
'expr' => array( 0, 'ifoda' ),
'if' => array( 0, 'agar' ),
@@ -701,7 +715,15 @@ $magicWords['zh-hans'] = array(
/** Traditional Chinese (中文(繁體)‎) */
$magicWords['zh-hant'] = array(
+ 'expr' => array( 0, '表達式' ),
'if' => array( 0, '若' ),
+ 'ifexpr' => array( 0, '若表達式' ),
+ 'iferror' => array( 0, '如果錯誤' ),
+ 'switch' => array( 0, '轉換' ),
+ 'default' => array( 0, '#默認' ),
'time' => array( 0, '時間' ),
'timel' => array( 0, '時間L' ),
+ 'len' => array( 0, '長度' ),
+ 'count' => array( 0, '計算' ),
+ 'urldecode' => array( 0, 'URI解碼' ),
); \ No newline at end of file
diff --git a/extensions/ParserFunctions/ParserFunctions.i18n.php b/extensions/ParserFunctions/ParserFunctions.i18n.php
deleted file mode 100644
index 3b38caf5..00000000
--- a/extensions/ParserFunctions/ParserFunctions.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShimb0a7afe1ea1a4a8b' ) ) {
- function wfJsonI18nShimb0a7afe1ea1a4a8b( $cache, $code, &$cachedData ) {
- $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
- foreach ( $codeSequence as $csCode ) {
- $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
- if ( is_readable( $fileName ) ) {
- $data = FormatJson::decode( file_get_contents( $fileName ), true );
- foreach ( array_keys( $data ) as $key ) {
- if ( $key === '' || $key[0] === '@' ) {
- unset( $data[$key] );
- }
- }
- $cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
- }
-
- $cachedData['deps'][] = new FileDependency( $fileName );
- }
- return true;
- }
-
- $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimb0a7afe1ea1a4a8b';
-}
diff --git a/extensions/ParserFunctions/ParserFunctions.library.php b/extensions/ParserFunctions/ParserFunctions.library.php
index 7f92140f..d07838dc 100644
--- a/extensions/ParserFunctions/ParserFunctions.library.php
+++ b/extensions/ParserFunctions/ParserFunctions.library.php
@@ -6,7 +6,7 @@ class Scribunto_LuaParserFunctionsLibrary extends Scribunto_LuaLibraryBase {
'expr' => array( $this, 'expr' ),
);
- $this->getEngine()->registerInterface( __DIR__ . '/mw.ext.ParserFunctions.lua', $lib, array() );
+ return $this->getEngine()->registerInterface( __DIR__ . '/mw.ext.ParserFunctions.lua', $lib, array() );
}
public function expr( $expression = null ) {
diff --git a/extensions/ParserFunctions/ParserFunctions.php b/extensions/ParserFunctions/ParserFunctions.php
index 963dbc4d..c38db82e 100644
--- a/extensions/ParserFunctions/ParserFunctions.php
+++ b/extensions/ParserFunctions/ParserFunctions.php
@@ -1,118 +1,15 @@
<?php
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( 'This file is a MediaWiki extension, it is not a valid entry point' );
-}
-
-/**
- * CONFIGURATION
- * These variables may be overridden in LocalSettings.php after you include the
- * extension file.
- */
-
-/**
- * Defines the maximum length of a string that string functions are allowed to operate on
- * Prevention against denial of service by string function abuses.
- */
-$wgPFStringLengthLimit = 1000;
-
-/**
- * Enable string functions.
- *
- * Set this to true if you want your users to be able to implement their own
- * parsers in the ugliest, most inefficient programming language known to man:
- * MediaWiki wikitext with ParserFunctions.
- *
- * WARNING: enabling this may have an adverse impact on the sanity of your users.
- * An alternative, saner solution for embedding complex text processing in
- * MediaWiki templates can be found at: http://www.mediawiki.org/wiki/Extension:Scribunto
- */
-$wgPFEnableStringFunctions = false;
-
-/**
- * Enable string functions, when running Wikimedia Jenkins unit tests.
- *
- * Running Jenkins unit tests without setting $wgPFEnableStringFunctions = true;
- * will cause all the parser tests for string functions to be skipped.
- */
-if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI === true ) {
- $wgPFEnableStringFunctions = true;
-}
-
-/** REGISTRATION */
-$wgExtensionCredits['parserhook'][] = array(
- 'path' => __FILE__,
- 'name' => 'ParserFunctions',
- 'version' => '1.6.0',
- 'url' => 'https://www.mediawiki.org/wiki/Extension:ParserFunctions',
- 'author' => array( 'Tim Starling', 'Robert Rohde', 'Ross McClure', 'Juraj Simlovic' ),
- 'descriptionmsg' => 'pfunc_desc',
-);
-
-$wgAutoloadClasses['ExtParserFunctions'] = __DIR__ . '/ParserFunctions_body.php';
-$wgAutoloadClasses['ExprParser'] = __DIR__ . '/Expr.php';
-$wgAutoloadClasses['ExprError'] = __DIR__ . '/Expr.php';
-$wgAutoloadClasses['Scribunto_LuaParserFunctionsLibrary'] = __DIR__ . '/ParserFunctions.library.php';
-
-$wgMessagesDirs['ParserFunctions'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['ParserFunctions'] = __DIR__ . '/ParserFunctions.i18n.php';
-$wgExtensionMessagesFiles['ParserFunctionsMagic'] = __DIR__ . '/ParserFunctions.i18n.magic.php';
-
-$wgParserTestFiles[] = __DIR__ . "/funcsParserTests.txt";
-$wgParserTestFiles[] = __DIR__ . "/stringFunctionTests.txt";
-
-$wgHooks['ParserFirstCallInit'][] = 'wfRegisterParserFunctions';
-
-/**
- * @param $parser Parser
- * @return bool
- */
-function wfRegisterParserFunctions( $parser ) {
- global $wgPFEnableStringFunctions;
-
- // These functions accept DOM-style arguments
- $parser->setFunctionHook( 'if', 'ExtParserFunctions::ifObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'ifeq', 'ExtParserFunctions::ifeqObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'switch', 'ExtParserFunctions::switchObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'ifexist', 'ExtParserFunctions::ifexistObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'ifexpr', 'ExtParserFunctions::ifexprObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'iferror', 'ExtParserFunctions::iferrorObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'time', 'ExtParserFunctions::timeObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'timel', 'ExtParserFunctions::localTimeObj', SFH_OBJECT_ARGS );
-
- $parser->setFunctionHook( 'expr', 'ExtParserFunctions::expr' );
- $parser->setFunctionHook( 'rel2abs', 'ExtParserFunctions::rel2abs' );
- $parser->setFunctionHook( 'titleparts', 'ExtParserFunctions::titleparts' );
-
- // String Functions
- if ( $wgPFEnableStringFunctions ) {
- $parser->setFunctionHook( 'len', 'ExtParserFunctions::runLen' );
- $parser->setFunctionHook( 'pos', 'ExtParserFunctions::runPos' );
- $parser->setFunctionHook( 'rpos', 'ExtParserFunctions::runRPos' );
- $parser->setFunctionHook( 'sub', 'ExtParserFunctions::runSub' );
- $parser->setFunctionHook( 'count', 'ExtParserFunctions::runCount' );
- $parser->setFunctionHook( 'replace', 'ExtParserFunctions::runReplace' );
- $parser->setFunctionHook( 'explode', 'ExtParserFunctions::runExplode' );
- $parser->setFunctionHook( 'urldecode', 'ExtParserFunctions::runUrlDecode' );
- }
-
+if ( function_exists( 'wfLoadExtension' ) ) {
+ wfLoadExtension( 'ParserFunctions' );
+ // Keep i18n globals so mergeMessageFileList.php doesn't break
+ $wgMessagesDirs['ParserFunctions'] = __DIR__ . '/i18n';
+ $wgExtensionMessagesFiles['ParserFunctionsMagic'] = __DIR__ . '/ParserFunctions.i18n.magic.php';
+ /* wfWarn(
+ 'Deprecated PHP entry point used for ParserFunctions extension. Please use wfLoadExtension instead, ' .
+ 'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
+ ); */
return true;
+} else {
+ die( 'This version of the ParserFunctions extension requires MediaWiki 1.25+' );
}
-
-$wgHooks['UnitTestsList'][] = 'wfParserFunctionsTests';
-
-/**
- * @param $files array
- * @return bool
- */
-function wfParserFunctionsTests( &$files ) {
- $files[] = __DIR__ . '/tests/ExpressionTest.php';
- return true;
-}
-
-$wgHooks['ScribuntoExternalLibraries'][] = function( $engine, array &$extraLibraries ) {
- if( $engine == 'lua' ) {
- $extraLibraries['mw.ext.ParserFunctions'] = 'Scribunto_LuaParserFunctionsLibrary';
- }
- return true;
-};
diff --git a/extensions/ParserFunctions/ParserFunctions_body.php b/extensions/ParserFunctions/ParserFunctions_body.php
index d3debf36..2651b06e 100644
--- a/extensions/ParserFunctions/ParserFunctions_body.php
+++ b/extensions/ParserFunctions/ParserFunctions_body.php
@@ -12,7 +12,6 @@ class ExtParserFunctions {
*/
public static function clearState( $parser ) {
self::$mTimeChars = 0;
- $parser->pf_markerRegex = null;
return true;
}
@@ -31,38 +30,6 @@ class ExtParserFunctions {
}
/**
- * Get the marker regex. Cached.
- * @param $parser Parser
- * @return
- */
- public static function getMarkerRegex( $parser ) {
- self::registerClearHook();
- if ( isset( $parser->pf_markerRegex ) ) {
- return $parser->pf_markerRegex;
- }
-
- wfProfileIn( __METHOD__ );
-
- $prefix = preg_quote( $parser->uniqPrefix(), '/' );
-
- $suffix = preg_quote( Parser::MARKER_SUFFIX, '/' );
-
- $parser->pf_markerRegex = '/' . $prefix . '(?:(?!' . $suffix . ').)*' . $suffix . '/us';
-
- wfProfileOut( __METHOD__ );
- return $parser->pf_markerRegex;
- }
-
- /**
- * @param $parser Parser
- * @param $text string
- * @return string
- */
- private static function killMarkers ( $parser, $text ) {
- return preg_replace( self::getMarkerRegex( $parser ), '' , $text );
- }
-
- /**
* @return ExprParser
*/
public static function &getExprParser() {
@@ -621,13 +588,8 @@ class ExtParserFunctions {
* @return int
*/
public static function runLen ( $parser, $inStr = '' ) {
- wfProfileIn( __METHOD__ );
-
- $inStr = self::killMarkers( $parser, (string)$inStr );
- $len = mb_strlen( $inStr );
-
- wfProfileOut( __METHOD__ );
- return $len;
+ $inStr = $parser->killMarkers( (string)$inStr );
+ return mb_strlen( $inStr );
}
/**
@@ -644,23 +606,19 @@ class ExtParserFunctions {
* @return int|string
*/
public static function runPos ( $parser, $inStr = '', $inNeedle = '', $inOffset = 0 ) {
- wfProfileIn( __METHOD__ );
-
- $inStr = self::killMarkers( $parser, (string)$inStr );
- $inNeedle = self::killMarkers( $parser, (string)$inNeedle );
+ $inStr = $parser->killMarkers( (string)$inStr );
+ $inNeedle = $parser->killMarkers( (string)$inNeedle );
if ( !self::checkLength( $inStr ) ||
!self::checkLength( $inNeedle ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
if ( $inNeedle == '' ) { $inNeedle = ' '; }
- $pos = mb_strpos( $inStr, $inNeedle, $inOffset );
+ $pos = mb_strpos( $inStr, $inNeedle, intval( $inOffset ) );
if ( $pos === false ) { $pos = ""; }
- wfProfileOut( __METHOD__ );
return $pos;
}
@@ -677,14 +635,11 @@ class ExtParserFunctions {
* @return int|string
*/
public static function runRPos ( $parser, $inStr = '', $inNeedle = '' ) {
- wfProfileIn( __METHOD__ );
-
- $inStr = self::killMarkers( $parser, (string)$inStr );
- $inNeedle = self::killMarkers( $parser, (string)$inNeedle );
+ $inStr = $parser->killMarkers( (string)$inStr );
+ $inNeedle = $parser->killMarkers( (string)$inNeedle );
if ( !self::checkLength( $inStr ) ||
!self::checkLength( $inNeedle ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
@@ -693,7 +648,6 @@ class ExtParserFunctions {
$pos = mb_strrpos( $inStr, $inNeedle );
if ( $pos === false ) { $pos = -1; }
- wfProfileOut( __METHOD__ );
return $pos;
}
@@ -716,12 +670,9 @@ class ExtParserFunctions {
* @return string
*/
public static function runSub ( $parser, $inStr = '', $inStart = 0, $inLength = 0 ) {
- wfProfileIn( __METHOD__ );
-
- $inStr = self::killMarkers( $parser, (string)$inStr );
+ $inStr = $parser->killMarkers( (string)$inStr );
if ( !self::checkLength( $inStr ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
@@ -731,7 +682,6 @@ class ExtParserFunctions {
$result = mb_substr( $inStr, intval( $inStart ), intval( $inLength ) );
}
- wfProfileOut( __METHOD__ );
return $result;
}
@@ -747,14 +697,11 @@ class ExtParserFunctions {
* @return int|string
*/
public static function runCount ( $parser, $inStr = '', $inSubStr = '' ) {
- wfProfileIn( __METHOD__ );
-
- $inStr = self::killMarkers( $parser, (string)$inStr );
- $inSubStr = self::killMarkers( $parser, (string)$inSubStr );
+ $inStr = $parser->killMarkers( (string)$inStr );
+ $inSubStr = $parser->killMarkers( (string)$inSubStr );
if ( !self::checkLength( $inStr ) ||
!self::checkLength( $inSubStr ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
@@ -764,7 +711,6 @@ class ExtParserFunctions {
$result = mb_substr_count( $inStr, $inSubStr );
- wfProfileOut( __METHOD__ );
return $result;
}
@@ -786,16 +732,14 @@ class ExtParserFunctions {
public static function runReplace( $parser, $inStr = '',
$inReplaceFrom = '', $inReplaceTo = '', $inLimit = -1 ) {
global $wgPFStringLengthLimit;
- wfProfileIn( __METHOD__ );
- $inStr = self::killMarkers( $parser, (string)$inStr );
- $inReplaceFrom = self::killMarkers( $parser, (string)$inReplaceFrom );
- $inReplaceTo = self::killMarkers( $parser, (string)$inReplaceTo );
+ $inStr = $parser->killMarkers( (string)$inStr );
+ $inReplaceFrom = $parser->killMarkers( (string)$inReplaceFrom );
+ $inReplaceTo = $parser->killMarkers( (string)$inReplaceTo );
if ( !self::checkLength( $inStr ) ||
!self::checkLength( $inReplaceFrom ) ||
!self::checkLength( $inReplaceTo ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
@@ -822,11 +766,9 @@ class ExtParserFunctions {
$inReplaceTo, $inStr, $limit );
if ( !self::checkLength( $result ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
- wfProfileOut( __METHOD__ );
return $result;
}
@@ -848,10 +790,8 @@ class ExtParserFunctions {
* @return string
*/
public static function runExplode ( $parser, $inStr = '', $inDiv = '', $inPos = 0, $inLim = null ) {
- wfProfileIn( __METHOD__ );
-
- $inStr = self::killMarkers( $parser, (string)$inStr );
- $inDiv = self::killMarkers( $parser, (string)$inDiv );
+ $inStr = $parser->killMarkers( (string)$inStr );
+ $inDiv = $parser->killMarkers( (string)$inDiv );
if ( $inDiv == '' ) {
$inDiv = ' ';
@@ -859,7 +799,6 @@ class ExtParserFunctions {
if ( !self::checkLength( $inStr ) ||
!self::checkLength( $inDiv ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
@@ -875,7 +814,6 @@ class ExtParserFunctions {
$result = '';
}
- wfProfileOut( __METHOD__ );
return $result;
}
@@ -888,18 +826,12 @@ class ExtParserFunctions {
* @return string
*/
public static function runUrlDecode( $parser, $inStr = '' ) {
- wfProfileIn( __METHOD__ );
-
- $inStr = self::killMarkers( $parser, (string)$inStr );
+ $inStr = $parser->killMarkers( (string)$inStr );
if ( !self::checkLength( $inStr ) ) {
- wfProfileOut( __METHOD__ );
return self::tooLongError();
}
- $result = urldecode( $inStr );
-
- wfProfileOut( __METHOD__ );
- return $result;
+ return urldecode( $inStr );
}
/**
diff --git a/extensions/ParserFunctions/extension.json b/extensions/ParserFunctions/extension.json
new file mode 100644
index 00000000..0198398a
--- /dev/null
+++ b/extensions/ParserFunctions/extension.json
@@ -0,0 +1,48 @@
+{
+ "name": "ParserFunctions",
+ "version": "1.6.0",
+ "author": [
+ "Tim Starling",
+ "Robert Rohde",
+ "Ross McClure",
+ "Juraj Simlovic"
+ ],
+ "url": "https://www.mediawiki.org/wiki/Extension:ParserFunctions",
+ "descriptionmsg": "pfunc_desc",
+ "type": "parserhook",
+ "config": {
+ "PFEnableStringFunctions": false,
+ "PFStringLengthLimit": 1000
+ },
+ "callback": "ParserFunctionsHooks::onRegistration",
+ "ExtensionMessagesFiles": {
+ "ParserFunctionsMagic": "ParserFunctions.i18n.magic.php"
+ },
+ "MessagesDirs": {
+ "ParserFunctions": [
+ "i18n"
+ ]
+ },
+ "Hooks": {
+ "ParserFirstCallInit": [
+ "ParserFunctionsHooks::onParserFirstCallInit"
+ ],
+ "UnitTestsList": [
+ "ParserFunctionsHooks::onUnitTestsList"
+ ],
+ "ScribuntoExternalLibraries": [
+ "ParserFunctionsHooks::onScribuntoExternalLibraries"
+ ]
+ },
+ "AutoloadClasses": {
+ "ExtParserFunctions": "ParserFunctions_body.php",
+ "ExprParser": "Expr.php",
+ "ExprError": "Expr.php",
+ "Scribunto_LuaParserFunctionsLibrary": "ParserFunctions.library.php",
+ "ParserFunctionsHooks": "ParserFunctions.hooks.php"
+ },
+ "ParserTestFiles": [
+ "funcsParserTests.txt",
+ "stringFunctionTests.txt"
+ ]
+}
diff --git a/extensions/ParserFunctions/i18n/ace.json b/extensions/ParserFunctions/i18n/ace.json
new file mode 100644
index 00000000..d4fa7ab5
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/ace.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Si Gam Acèh"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "Reuloh ekspresi: Narit \"$1\" hana geuturi.",
+ "pfunc_expr_unrecognised_punctuation": "Reuloh ekspresi: Karakter tanda beuët \"$1\" hana geuturi."
+}
diff --git a/extensions/ParserFunctions/i18n/arq.json b/extensions/ParserFunctions/i18n/arq.json
new file mode 100644
index 00000000..a8eb5208
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/arq.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bachounda",
+ "Oldstoneage"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "غلط فالتعبير: كلمة غير متعرف عليها \"$1\"",
+ "pfunc_expr_unexpected_operator": "غلطة تاع تعبير : عامل '''$1''' ماشي مقارع.",
+ "pfunc_expr_missing_operand": "غلطة ف`التعبير: معمول مودّر لـ$1",
+ "pfunc_expr_unrecognised_punctuation": "غلطه فالتعبير: علامة تنقيط ماشي متعرف عليها \"$1\""
+}
diff --git a/extensions/ParserFunctions/i18n/az.json b/extensions/ParserFunctions/i18n/az.json
index 05cca268..fa04d6a7 100644
--- a/extensions/ParserFunctions/i18n/az.json
+++ b/extensions/ParserFunctions/i18n/az.json
@@ -1,8 +1,22 @@
{
"@metadata": {
"authors": [
- "Cekli829"
+ "Cekli829",
+ "Dağlı95"
]
},
- "pfunc_time_error": "Xəta: yanlış zaman"
+ "pfunc_time_error": "Xəta: yanlış zaman",
+ "pfunc_expr_stack_exhausted": "İfadə xətası: Stek doludur.",
+ "pfunc_expr_unexpected_number": "İfadə xətası: gözlənilməz ədəd",
+ "pfunc_expr_preg_match_failure": "İfadə xətası: Gözlənilməz preg_match nasazlığı",
+ "pfunc_expr_unrecognised_word": "İfadə xətası: tanınmayan ifadə söz \"$1\".",
+ "pfunc_expr_unexpected_operator": "İfadə xətası: gözlənilməz \"$1\" operatoru.",
+ "pfunc_expr_missing_operand": "İfadə xətası: $1 operantı çatışmır.",
+ "pfunc_expr_unexpected_closing_bracket": "İfadə xətası: Gözlənilməz bağlanmış mötərizə",
+ "pfunc_expr_unrecognised_punctuation": "İfadə xətası: \"$1\" punktuasiyasının tanınmayan simvolu.",
+ "pfunc_expr_unclosed_bracket": "İfadə xətası: Mötərizə bağlanılmamışdır.",
+ "pfunc_expr_division_by_zero": "Sıfıra bölmə",
+ "pfunc_expr_invalid_argument_ln": "ln üçün xətalı arqument: <= 0",
+ "pfunc_expr_unknown_error": "İfadə xətası: naməlum xəta ($1)",
+ "pfunc_expr_not_a_number": "$1-də: nəticə ədəd deyildir."
}
diff --git a/extensions/ParserFunctions/i18n/azb.json b/extensions/ParserFunctions/i18n/azb.json
index f56e506b..d92dc2e6 100644
--- a/extensions/ParserFunctions/i18n/azb.json
+++ b/extensions/ParserFunctions/i18n/azb.json
@@ -4,5 +4,9 @@
"Amir a57"
]
},
- "pfunc_time_error": "ختا: یانلیش زامان"
+ "pfunc_time_error": "ختا: یانلیش زامان",
+ "pfunc_expr_unrecognised_word": "عیبارت خطاسی: تانینمایان سوز «$1»",
+ "pfunc_expr_unexpected_operator": "عیبارت خطاسی: عمل ائدن $1 اینتظار دان اوزاق",
+ "pfunc_expr_missing_operand": "عیبارت خطاسی: ایتمیش عمل ائدن $1 اوچون",
+ "pfunc_expr_unrecognised_punctuation": "عیبارت خطاسی: تانیمایان نوقطالنمیش یازی «$1»"
}
diff --git a/extensions/ParserFunctions/i18n/bgn.json b/extensions/ParserFunctions/i18n/bgn.json
new file mode 100644
index 00000000..ec7e084a
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/bgn.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Baloch Afghanistan"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "ئبارت ئی ختا: نازانتین کلمه «$1»",
+ "pfunc_expr_unexpected_operator": "ئبارت ئی ختا: $1 ئی ئمل کورت دور شه انتظارا",
+ "pfunc_expr_missing_operand": "ئبارت ئی ختا: زیان بودین ئمل په $1 ئا",
+ "pfunc_expr_unrecognised_punctuation": "ئبارت ئی ختا: نقطه‌گذاری نویسگ دروست نه بوت «$1»"
+}
diff --git a/extensions/ParserFunctions/i18n/ca.json b/extensions/ParserFunctions/i18n/ca.json
index 93bc9e32..9f14268a 100644
--- a/extensions/ParserFunctions/i18n/ca.json
+++ b/extensions/ParserFunctions/i18n/ca.json
@@ -16,7 +16,7 @@
"pfunc_expr_stack_exhausted": "Error de l'expressió: Pila exhaurida",
"pfunc_expr_unexpected_number": "Error de l'expressió: Nombre inesperat",
"pfunc_expr_preg_match_failure": "Error de l'expressió: Error de funció no compresa i inesperada",
- "pfunc_expr_unrecognised_word": "Error de l'expressió: Paraula no reconeguda \"$1\"",
+ "pfunc_expr_unrecognised_word": "Error de l'expressió: Paraula no reconeguda \"$1\".",
"pfunc_expr_unexpected_operator": "Error de l'expressió: Operador $1 inesperat",
"pfunc_expr_missing_operand": "Error de l'expressió: Falta l'operand de $1",
"pfunc_expr_unexpected_closing_bracket": "Error de l'expressió: Parèntesi inesperat",
diff --git a/extensions/ParserFunctions/i18n/de.json b/extensions/ParserFunctions/i18n/de.json
index 7052807c..70de3373 100644
--- a/extensions/ParserFunctions/i18n/de.json
+++ b/extensions/ParserFunctions/i18n/de.json
@@ -19,11 +19,11 @@
"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 $1",
- "pfunc_expr_missing_operand": "Expression-Fehler: Fehlender Operand für $1",
+ "pfunc_expr_unrecognised_word": "Fehler im Ausdruck: Unerkanntes Wort „$1“",
+ "pfunc_expr_unexpected_operator": "Fehler im Ausdruck: Unerwarteter Operator $1",
+ "pfunc_expr_missing_operand": "Fehler im Ausdruck: 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_unrecognised_punctuation": "Fehler im Ausdruck: Nicht erkanntes Satzzeichen „$1“",
"pfunc_expr_unclosed_bracket": "Expression-Fehler: Nicht geschlossene eckige Klammer",
"pfunc_expr_division_by_zero": "Division durch Null",
"pfunc_expr_invalid_argument": "Ungültiges Argument für $1: < -1 oder > 1",
diff --git a/extensions/ParserFunctions/i18n/es.json b/extensions/ParserFunctions/i18n/es.json
index f4d63d0a..b1b6bca4 100644
--- a/extensions/ParserFunctions/i18n/es.json
+++ b/extensions/ParserFunctions/i18n/es.json
@@ -6,7 +6,8 @@
"Fitoschido",
"Muro de Aguas",
"Remember the dot",
- "Sanbec"
+ "Sanbec",
+ "Macofe"
]
},
"pfunc_desc": "Mejora el analizador lógico con funciones.",
@@ -17,11 +18,11 @@
"pfunc_expr_stack_exhausted": "Error de expresión: Pila agotada",
"pfunc_expr_unexpected_number": "Error con la expresión: Número no esperado",
"pfunc_expr_preg_match_failure": "Error de expresión: Fracaso preg_match no esperado",
- "pfunc_expr_unrecognised_word": "Error con la expresión: La palabra \"$1\" no se reconoce",
- "pfunc_expr_unexpected_operator": "Error con la expresión: Operador $1 no esperado",
- "pfunc_expr_missing_operand": "Error con la expresión: Falta un operador para $1",
+ "pfunc_expr_unrecognised_word": "Error en la expresión: no se reconoce la palabra «$1».",
+ "pfunc_expr_unexpected_operator": "Error en la expresión: operador $1 no esperado.",
+ "pfunc_expr_missing_operand": "Error en la expresión: falta un operando para $1.",
"pfunc_expr_unexpected_closing_bracket": "Error con la expresión: Paréntesis de cierre no esperado",
- "pfunc_expr_unrecognised_punctuation": "Error con la expresión: Carácter de puntuación no reconocido \"$1\"",
+ "pfunc_expr_unrecognised_punctuation": "Error en la expresión: no se reconoce el carácter de puntuación «$1».",
"pfunc_expr_unclosed_bracket": "Error con la expresión: Paréntesis sin cerrar",
"pfunc_expr_division_by_zero": "División entre cero",
"pfunc_expr_invalid_argument": "Argumento no válido para $1: < -1 o > 1.",
diff --git a/extensions/ParserFunctions/i18n/et.json b/extensions/ParserFunctions/i18n/et.json
index a33128ad..ba832d29 100644
--- a/extensions/ParserFunctions/i18n/et.json
+++ b/extensions/ParserFunctions/i18n/et.json
@@ -17,7 +17,7 @@
"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_unclosed_bracket": "Avaldistõrge: sulgemata sulud",
"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",
diff --git a/extensions/ParserFunctions/i18n/frr.json b/extensions/ParserFunctions/i18n/frr.json
new file mode 100644
index 00000000..fd327ede
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/frr.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Murma174"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "Tiaken-feeler: Ünbekäänd wurd \"$1\"",
+ "pfunc_expr_unexpected_operator": "Tiaken-feeler: Ünbekäänd operaator $1",
+ "pfunc_expr_missing_operand": "Tiaken-feeler: Operand för $1 ei diar",
+ "pfunc_expr_unrecognised_punctuation": "Tiaken-feeler: Ünbekäänd tiaken \"$1\""
+}
diff --git a/extensions/ParserFunctions/i18n/gom-deva.json b/extensions/ParserFunctions/i18n/gom-deva.json
new file mode 100644
index 00000000..88aabea1
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/gom-deva.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Konknni mogi 24",
+ "Supriya kankumbikar"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "अभिव्यक्तींत त्रुटीः अनवळखी उतर \"$1\".",
+ "pfunc_expr_unexpected_operator": "अभिव्यक्ती त्रुटी: अनवळखी $1 कार्यवाहक",
+ "pfunc_expr_missing_operand": "अभिव्यक्ती त्रुटि: $1 चो घटक मेळूंक ना",
+ "pfunc_expr_unrecognised_punctuation": "अभिव्यक्तींत त्रुटीः अनपेक्षीत उदगार चिन्ह \"$1\"."
+}
diff --git a/extensions/ParserFunctions/i18n/id.json b/extensions/ParserFunctions/i18n/id.json
index d5b6a7e1..5f549f39 100644
--- a/extensions/ParserFunctions/i18n/id.json
+++ b/extensions/ParserFunctions/i18n/id.json
@@ -3,7 +3,8 @@
"authors": [
"IvanLanin",
"Meursault2004",
- "Rex"
+ "Rex",
+ "Iwan Novirion"
]
},
"pfunc_desc": "Mengembangkan parser dengan fungsi logis",
@@ -14,11 +15,11 @@
"pfunc_expr_stack_exhausted": "Kesalahan ekspresi: Stack habis",
"pfunc_expr_unexpected_number": "Kesalahan ekspresi: Angka yang tak terduga",
"pfunc_expr_preg_match_failure": "Kesalahan ekspresi: Kegagalan preg_match tak terduga",
- "pfunc_expr_unrecognised_word": "Kesalahan ekspresi: Kata \"$1\" tak dikenal",
+ "pfunc_expr_unrecognised_word": "Kesalahan ekspresi: Kata \"$1\" tak dikenal.",
"pfunc_expr_unexpected_operator": "Kesalahan ekspresi: Operator $1 tak terduga",
"pfunc_expr_missing_operand": "Kesalahan ekspresi: Operand tak ditemukan untuk $1",
"pfunc_expr_unexpected_closing_bracket": "Kesalahan ekspresi: Kurung tutup tak terduga",
- "pfunc_expr_unrecognised_punctuation": "Kesalahan ekspresi: Karakter tanda baca \"$1\" tak dikenali",
+ "pfunc_expr_unrecognised_punctuation": "Kesalahan ekspresi: Karakter tanda baca \"$1\" tak dikenali.",
"pfunc_expr_unclosed_bracket": "Kesalahan ekspresi: Kurung tanpa tutup",
"pfunc_expr_division_by_zero": "Pembagian oleh nol",
"pfunc_expr_invalid_argument": "Argumen tidak berlaku untuk $1: < -1 or > 1",
diff --git a/extensions/ParserFunctions/i18n/it.json b/extensions/ParserFunctions/i18n/it.json
index c73c0887..23d3ece2 100644
--- a/extensions/ParserFunctions/i18n/it.json
+++ b/extensions/ParserFunctions/i18n/it.json
@@ -4,7 +4,8 @@
"Beta16",
"BrokenArrow",
"Darth Kule",
- "Pietrodn"
+ "Pietrodn",
+ "FRacco"
]
},
"pfunc_desc": "Aggiunge al parser una serie di funzioni logiche",
@@ -16,11 +17,11 @@
"pfunc_expr_stack_exhausted": "Errore nell'espressione: stack esaurito",
"pfunc_expr_unexpected_number": "Errore nell'espressione: numero inatteso",
"pfunc_expr_preg_match_failure": "Errore nell'espressione: errore inatteso in preg_match",
- "pfunc_expr_unrecognised_word": "Errore nell'espressione: parola \"$1\" non riconosciuta",
- "pfunc_expr_unexpected_operator": "Errore nell'espressione: operatore $1 inatteso",
- "pfunc_expr_missing_operand": "Errore nell'espressione: operando mancante per $1",
+ "pfunc_expr_unrecognised_word": "Errore nell'espressione: parola \"$1\" non riconosciuta.",
+ "pfunc_expr_unexpected_operator": "Errore nell'espressione: operatore $1 inatteso.",
+ "pfunc_expr_missing_operand": "Errore nell'espressione: operando mancante per $1.",
"pfunc_expr_unexpected_closing_bracket": "Errore nell'espressione: parentesi chiusa inattesa",
- "pfunc_expr_unrecognised_punctuation": "Errore nell'espressione: carattere di punteggiatura \"$1\" non riconosciuto",
+ "pfunc_expr_unrecognised_punctuation": "Errore nell'espressione: carattere di punteggiatura \"$1\" non riconosciuto.",
"pfunc_expr_unclosed_bracket": "Errore nell'espressione: parentesi non chiusa",
"pfunc_expr_division_by_zero": "Divisione per zero",
"pfunc_expr_invalid_argument": "Argomento non valido per $1: < -1 o > 1",
diff --git a/extensions/ParserFunctions/i18n/ko.json b/extensions/ParserFunctions/i18n/ko.json
index afbbaa43..7c33fc64 100644
--- a/extensions/ParserFunctions/i18n/ko.json
+++ b/extensions/ParserFunctions/i18n/ko.json
@@ -5,7 +5,8 @@
"Kwj2772",
"ToePeu",
"Yknok29",
- "아라"
+ "아라",
+ "IRTC1015"
]
},
"pfunc_desc": "파서에 논리 함수를 추가합니다",
@@ -14,19 +15,19 @@
"pfunc_time_too_big": "오류: #time 함수는 9999년까지만을 지원합니다.",
"pfunc_time_too_small": "오류: #time은 0년부터만을 지원합니다.",
"pfunc_rel2abs_invalid_depth": "오류: 경로 구조가 잘못되었습니다: \"$1\" (루트 노드 위의 노드에 접속을 시도했습니다)",
- "pfunc_expr_stack_exhausted": "표현 오류: 스택이 비어 있습니다.",
+ "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_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": "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 글자 제한을 초과하였습니다."
}
diff --git a/extensions/ParserFunctions/i18n/ksh.json b/extensions/ParserFunctions/i18n/ksh.json
index b55e45b7..6a1a5ad4 100644
--- a/extensions/ParserFunctions/i18n/ksh.json
+++ b/extensions/ParserFunctions/i18n/ksh.json
@@ -7,9 +7,10 @@
]
},
"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: #time weed zo öff jebruch.",
- "pfunc_time_too_big": "Ene Fähleres opjefalle: #time kann bloß bes nohm Johr 9999 jonn.",
+ "pfunc_time_error": "Fähler: En onjöltejje Zigg.",
+ "pfunc_time_too_long": "Fähler: <code lang=\"en\" xml:lang=\"en\">#time</code> weed zo öff jebruch.",
+ "pfunc_time_too_big": "Ene Fähler es opjefalle: <code lang=\"en\" xml:lang=\"en\">#time</code> kann blohß bes nohm Johr 9999 jonn.",
+ "pfunc_time_too_small": "Ene Fähler es opjefalle: <code lang=\"en\" xml:lang=\"en\">#time</code> kann blohß Johre övver Noll.",
"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 stack övverloufe.",
"pfunc_expr_unexpected_number": "Fähler en enem Ußdrock: En Zahl dom_mer nit äwaade.",
diff --git a/extensions/ParserFunctions/i18n/lrc.json b/extensions/ParserFunctions/i18n/lrc.json
index 85b963cf..de161b96 100644
--- a/extensions/ParserFunctions/i18n/lrc.json
+++ b/extensions/ParserFunctions/i18n/lrc.json
@@ -1,8 +1,15 @@
{
"@metadata": {
"authors": [
- "Bonevarluri"
+ "Bonevarluri",
+ "Mogoeilor"
]
},
- "pfunc_time_error": "خطا:وخت نامعتور."
+ "pfunc_time_error": "خطا:وخت نامعتور.",
+ "pfunc_expr_unrecognised_word": "خطا جمله ای: کلیمه دسه بنی نبیه \"$1\".",
+ "pfunc_expr_unexpected_operator": "خطا جمله: عملدیارکن ناحاستنی $1",
+ "pfunc_expr_missing_operand": "خطا جمله ای:عملیار گم بیه سی $1",
+ "pfunc_expr_unrecognised_punctuation": "خطا جمله ای: کاراکتر نقطه نیائن دسه بنی نبیه\"$1\".",
+ "pfunc_expr_division_by_zero": "بهرکنون وا صفر",
+ "pfunc_expr_invalid_argument_ln": "چک چنه گن سی درینده:<=0."
}
diff --git a/extensions/ParserFunctions/i18n/lt.json b/extensions/ParserFunctions/i18n/lt.json
index b1bfdd2d..ff569ecd 100644
--- a/extensions/ParserFunctions/i18n/lt.json
+++ b/extensions/ParserFunctions/i18n/lt.json
@@ -4,5 +4,9 @@
"Hugo.arg"
]
},
- "pfunc_time_error": "Klaida: neteisingas laikas"
+ "pfunc_time_error": "Klaida: neteisingas laikas",
+ "pfunc_expr_unrecognised_word": "Išraiškos klaida: nežinomas žodis „$1“.",
+ "pfunc_expr_unexpected_operator": "Išraiškos klaida: netikėtas operatorius „$1“.",
+ "pfunc_expr_missing_operand": "Išraiškos klaida: trūksta operando „$1“.",
+ "pfunc_expr_unrecognised_punctuation": "Išraiškos klaida: neatpažintas punktuacijos ženklas „$1“."
}
diff --git a/extensions/ParserFunctions/i18n/mai.json b/extensions/ParserFunctions/i18n/mai.json
new file mode 100644
index 00000000..f9a69e3c
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/mai.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Tulsi Bhagat"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "एक्स्प्रेशन गल्ती: अनपेक्षित शब्द \"$1\"।",
+ "pfunc_expr_unexpected_operator": "एक्स्प्रेशन गल्ती: अनपेक्षित $1 ऑपरेटर।",
+ "pfunc_expr_unrecognised_punctuation": "एक्स्प्रेशन गल्ती: अनपेक्षित उद्गार चिन्ह \"$1\"।"
+}
diff --git a/extensions/ParserFunctions/i18n/nap.json b/extensions/ParserFunctions/i18n/nap.json
new file mode 100644
index 00000000..c0a0e6bc
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/nap.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "C.R."
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "Espressione 'n errore: Parola scanusciuta \"$1\"",
+ "pfunc_expr_unexpected_operator": "Espressione 'n errore: Operatore $1 inaspettato",
+ "pfunc_expr_missing_operand": "Espressione 'n errore: Operatore zumpato pe' $1.",
+ "pfunc_expr_unrecognised_punctuation": "Espressione 'n errore: Carattere 'e punteggiatura \"$1\" scanusciuto"
+}
diff --git a/extensions/ParserFunctions/i18n/ne.json b/extensions/ParserFunctions/i18n/ne.json
index f0537cd3..c88152f5 100644
--- a/extensions/ParserFunctions/i18n/ne.json
+++ b/extensions/ParserFunctions/i18n/ne.json
@@ -1,10 +1,13 @@
{
"@metadata": {
"authors": [
- "RajeshPandey"
+ "RajeshPandey",
+ "बिप्लब आनन्द"
]
},
"pfunc_time_error": "त्रुटी: गलत/वा हुदैनहुने समय",
"pfunc_time_too_long": "त्रुटी: एकदम धेरै #time callहरु",
- "pfunc_rel2abs_invalid_depth": "त्रुटी: पाथमा (इनभ्यालिड)गलत गहिराइ(डेप्थ) भयो: \"$1\" (ले रुट नोड भन्दापनि माथिको नोडलाइ चलाउन(एकसेस गर्न) खोज्यो)"
+ "pfunc_rel2abs_invalid_depth": "त्रुटी: पाथमा (इनभ्यालिड)गलत गहिराइ(डेप्थ) भयो: \"$1\" (ले रुट नोड भन्दापनि माथिको नोडलाइ चलाउन(एकसेस गर्न) खोज्यो)",
+ "pfunc_expr_unrecognised_word": "अभिव्यक्ति त्रुटि: अज्ञात शब्द \"$1\"।",
+ "pfunc_expr_unrecognised_punctuation": "अभिव्यक्ति त्रुटि: अज्ञात विराम चिन्ह चरित्र \"$1\"।"
}
diff --git a/extensions/ParserFunctions/i18n/pfl.json b/extensions/ParserFunctions/i18n/pfl.json
new file mode 100644
index 00000000..909f0bf3
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/pfl.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Manuae"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "Fehla im Ausdrugg: Uubekondes Woad „$1“",
+ "pfunc_expr_unexpected_operator": "Fehla im Ausdrugg: Uueawadedi Greeß $1",
+ "pfunc_expr_missing_operand": "Ausdrugg-Fehla: Fehldä Greeß fa $1",
+ "pfunc_expr_unrecognised_punctuation": "Fehla im Ausdrugg: Uubekondes Sadzzaische „$1“"
+}
diff --git a/extensions/ParserFunctions/i18n/ps.json b/extensions/ParserFunctions/i18n/ps.json
index 24f52833..8a79666a 100644
--- a/extensions/ParserFunctions/i18n/ps.json
+++ b/extensions/ParserFunctions/i18n/ps.json
@@ -1,9 +1,14 @@
{
"@metadata": {
"authors": [
- "Ahmed-Najib-Biabani-Ibrahimkhel"
+ "Ahmed-Najib-Biabani-Ibrahimkhel",
+ "عثمان خان شاہ"
]
},
"pfunc_time_error": "ستونزه: ناسم وخت",
+ "pfunc_expr_unrecognised_word": "اصطلاحي تېروتنه: ناپېژندل شوې وييکه \"$1\".",
+ "pfunc_expr_unexpected_operator": "اصطلاحي تېروتنه: نااټکله $1 چارنگر.",
+ "pfunc_expr_missing_operand": "اصطلاحي تېروتنه: د $1 ورک شوی چارنگر.",
+ "pfunc_expr_unrecognised_punctuation": "اصطلاحي تېروتنه: د ناپېژندلې ليکنښې لوښه \"$1\".",
"pfunc_expr_division_by_zero": "وېش په صفر"
}
diff --git a/extensions/ParserFunctions/i18n/qqq.json b/extensions/ParserFunctions/i18n/qqq.json
index f47d1b21..67ff5e66 100644
--- a/extensions/ParserFunctions/i18n/qqq.json
+++ b/extensions/ParserFunctions/i18n/qqq.json
@@ -6,10 +6,11 @@
"Meno25",
"Shirayuki",
"Siebrand",
- "The Evil IP address"
+ "The Evil IP address",
+ "Umherirrender"
]
},
- "pfunc_desc": "{{desc|name=Parser Functions|url=http://www.mediawiki.org/wiki/Extension:ParserFunctions}}",
+ "pfunc_desc": "{{desc|name=Parser Functions|url=https://www.mediawiki.org/wiki/Extension:ParserFunctions}}",
"pfunc_time_error": "Used as error message about DateTime object, so this \"time\" means \"date and time\".\n\nSee also:\n* {{msg-mw|Pfunc time too long}}\n* {{msg-mw|Pfunc time too big}}\n* {{msg-mw|Pfunc time too small}}",
"pfunc_time_too_long": "Used as error message.\n\nSee also:\n* {{msg-mw|Pfunc time error}}\n* {{msg-mw|Pfunc time too big}}\n* {{msg-mw|Pfunc time too small}}",
"pfunc_time_too_big": "Used as error message.\n\nSee also:\n* {{msg-mw|Pfunc time error}}\n* {{msg-mw|Pfunc time too long}}\n* {{msg-mw|Pfunc time too small}}",
diff --git a/extensions/ParserFunctions/i18n/rue.json b/extensions/ParserFunctions/i18n/rue.json
index a592c200..b381e7d0 100644
--- a/extensions/ParserFunctions/i18n/rue.json
+++ b/extensions/ParserFunctions/i18n/rue.json
@@ -1,11 +1,12 @@
{
"@metadata": {
"authors": [
- "Gazeb"
+ "Gazeb",
+ "Tkalyn"
]
},
"pfunc_desc": "Росшырїня парсера о лоґічны функції",
- "pfunc_time_error": "Хына: неплатный час",
+ "pfunc_time_error": "Хыба: неплатный час",
"pfunc_time_too_long": "Хыба: дуже много кликаня #time",
"pfunc_rel2abs_invalid_depth": "Хыба: Неплатна глубка в стежцї: \"$1\" (проба о приступ до узла высшого як корїнь)",
"pfunc_expr_stack_exhausted": "Хыба выразу: Засобник переповненый",
diff --git a/extensions/ParserFunctions/i18n/shn.json b/extensions/ParserFunctions/i18n/shn.json
new file mode 100644
index 00000000..aeb5508d
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/shn.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Saimawnkham"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "လွင်ႈၽိတ်းပိူင်ႈ : ဢမ်ႇၼႄႉၼွၼ်းလႆႈ တူဝ်လိၵ်ႈ \"$1\"",
+ "pfunc_expr_unrecognised_punctuation": "လွင်ႈၽိတ်းပိူင်ႈ: တူဝ်လိၵ်ႈ လၢၵ်ႇလၢႆး \"$1\" ဢၼ်ၼႆႉ ဢမ်ႇလႆႈမၵ်းမၼ်ႈဝႆႉ"
+}
diff --git a/extensions/ParserFunctions/i18n/sr-ec.json b/extensions/ParserFunctions/i18n/sr-ec.json
index 403d78ce..5514cbde 100644
--- a/extensions/ParserFunctions/i18n/sr-ec.json
+++ b/extensions/ParserFunctions/i18n/sr-ec.json
@@ -3,12 +3,14 @@
"authors": [
"Millosh",
"Rancher",
- "Verlor"
+ "Verlor",
+ "Milicevic01"
]
},
"pfunc_desc": "Проширује рашчлањивач с логичким функцијама",
"pfunc_time_error": "Грешка: лоше време",
"pfunc_time_too_long": "Грешка: превише #time позива",
+ "pfunc_rel2abs_invalid_depth": "Грешка: неправилна дубина у путањи: „$1“ (покушај приступа чвору изнад коренског (root)).",
"pfunc_expr_stack_exhausted": "Грешка у изразу: стек напуњен",
"pfunc_expr_unexpected_number": "Грешка у изразу: неочекивани број",
"pfunc_expr_preg_match_failure": "Грешка у изразу: Неочекивана preg_match грешка",
diff --git a/extensions/ParserFunctions/i18n/sr-el.json b/extensions/ParserFunctions/i18n/sr-el.json
index 00c0a5fa..e0c990ba 100644
--- a/extensions/ParserFunctions/i18n/sr-el.json
+++ b/extensions/ParserFunctions/i18n/sr-el.json
@@ -1,12 +1,14 @@
{
"@metadata": {
"authors": [
- "Michaello"
+ "Michaello",
+ "Milicevic01"
]
},
"pfunc_desc": "obogati parser logičkim funkcijama",
"pfunc_time_error": "Greška: loše vreme",
"pfunc_time_too_long": "Greška: previše #time poziva",
+ "pfunc_rel2abs_invalid_depth": "Greška: nepravilna dubina u putanji: „$1“ (pokušaj pristupa čvoru iznad korenskog (root)).",
"pfunc_expr_stack_exhausted": "Greška u izrazu: stek napunjen",
"pfunc_expr_unexpected_number": "Greška u izrazu: neočekivani broj",
"pfunc_expr_preg_match_failure": "Greška u izrazu: Neočekivana preg_match greška",
diff --git a/extensions/ParserFunctions/i18n/szl.json b/extensions/ParserFunctions/i18n/szl.json
new file mode 100644
index 00000000..84ab4e99
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/szl.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Krol111"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "Błąd we wyrażyńu – felerne słowo „$1”",
+ "pfunc_expr_missing_operand": "Feler we wyrażyńu – brak argumyntu funkcyji $1",
+ "pfunc_expr_unrecognised_punctuation": "Feler we wyrażyńu – felerny znok „$1”"
+}
diff --git a/extensions/ParserFunctions/i18n/th.json b/extensions/ParserFunctions/i18n/th.json
index 3717762d..44a7ccbe 100644
--- a/extensions/ParserFunctions/i18n/th.json
+++ b/extensions/ParserFunctions/i18n/th.json
@@ -1,7 +1,8 @@
{
"@metadata": {
"authors": [
- "Ans"
+ "Ans",
+ "Horus"
]
},
"pfunc_time_error": "เกิดข้อผิดพลาด: ค่าเวลาไม่ถูกต้อง",
@@ -12,7 +13,7 @@
"pfunc_expr_preg_match_failure": "สูตรเกิดข้อผิดพลาด: เกิดความล้มเหลวในการสั่ง preg_match โดยไม่ทราบสาเหตุ",
"pfunc_expr_unrecognised_word": "สูตรไม่ถูกต้อง: \"$1\" เป็นคำที่ไม่รู้จัก",
"pfunc_expr_unexpected_operator": "สูตรไม่ถูกต้อง: $1 อยู่ผิดที่",
- "pfunc_expr_missing_operand": "สูตรไม่ถูกต้อง: ได้รับค่าไม่ครบในการคำนวณ $1",
+ "pfunc_expr_missing_operand": "สูตรไม่ถูกต้อง: ขาดตัวถูกดำเนินการสำหรับ $1",
"pfunc_expr_unexpected_closing_bracket": "สูตรไม่ถูกต้อง: ปิดวงเล็บเกิน หรือ ปิดวงเล็บผิดที่",
"pfunc_expr_unrecognised_punctuation": "สูตรไม่ถูกต้อง: \"$1\" เป็นเครื่องหมายหรือตัวอักษรที่ไม่รู้จัก",
"pfunc_expr_unclosed_bracket": "สูตรไม่ถูกต้อง: ไม่ได้ปิดวงเล็บ",
diff --git a/extensions/ParserFunctions/i18n/ur.json b/extensions/ParserFunctions/i18n/ur.json
new file mode 100644
index 00000000..af410e94
--- /dev/null
+++ b/extensions/ParserFunctions/i18n/ur.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "عثمان خان شاہ"
+ ]
+ },
+ "pfunc_expr_unrecognised_word": "ظاہریت خطاْْْْ: نامعلوم لفظ \"$1\"",
+ "pfunc_expr_unrecognised_punctuation": "خطائے تعبیری: نامعلوم تلفظ برائے \"$1\""
+}
diff --git a/extensions/ParserFunctions/i18n/yi.json b/extensions/ParserFunctions/i18n/yi.json
index 2d85aebf..9654b788 100644
--- a/extensions/ParserFunctions/i18n/yi.json
+++ b/extensions/ParserFunctions/i18n/yi.json
@@ -5,7 +5,10 @@
]
},
"pfunc_time_error": "גרײַז: אומגילטיגע צײַט",
+ "pfunc_expr_unrecognised_word": "אויסדרוק־גרײַז: אומבעקאנט ווארט \"$1",
"pfunc_expr_unexpected_operator": "אויסדריק גרײַז: אומגעריכטער $1 אפעראַטאר",
+ "pfunc_expr_missing_operand": "אויסדרוק פעלער: פעלט אפעראנד פאר $1.",
+ "pfunc_expr_unrecognised_punctuation": "אויסדרוק־גרײַז: אומבעקאנטער צייכן \"$1\".",
"pfunc_expr_unclosed_bracket": "אויסדריק גרײַז: אומגעשלאסענער קלאַמער",
"pfunc_expr_not_a_number": "אין $1: רעזולטאַט איז נישט קיין נומער"
}
diff --git a/extensions/ParserFunctions/i18n/yue.json b/extensions/ParserFunctions/i18n/yue.json
index 0f0f9898..5738c3e0 100644
--- a/extensions/ParserFunctions/i18n/yue.json
+++ b/extensions/ParserFunctions/i18n/yue.json
@@ -1,12 +1,15 @@
{
"@metadata": {
"authors": [
- "Shinjiman"
+ "Shinjiman",
+ "Yueman"
]
},
"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": "表達錯: 未預料嘅數字",
@@ -21,5 +24,6 @@
"pfunc_expr_invalid_argument": "$1嘅無效參數: < -1 or > 1",
"pfunc_expr_invalid_argument_ln": "ln嘅無效參數: <= 0",
"pfunc_expr_unknown_error": "表達錯: 未知嘅錯 ($1)",
- "pfunc_expr_not_a_number": "響 $1: 結果唔係數字"
+ "pfunc_expr_not_a_number": "響 $1: 結果唔係數字",
+ "pfunc_string_too_long": "出錯:字串超過 $1 個字元嘅限制。"
}
diff --git a/extensions/ParserFunctions/i18n/zh-hans.json b/extensions/ParserFunctions/i18n/zh-hans.json
index c7491d22..d2e0b54a 100644
--- a/extensions/ParserFunctions/i18n/zh-hans.json
+++ b/extensions/ParserFunctions/i18n/zh-hans.json
@@ -7,11 +7,12 @@
"PhiLiP",
"Philip",
"Shinjiman",
- "阿pp"
+ "阿pp",
+ "Liuxinyu970226"
]
},
"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年。",