Extension talk:ParserFunctions/Extended
Add topicWhat minimum MediaWiki version is this good for?? I'm using 1.6.10, latest for PHP4 compatibility. --89.0.111.219 20:45, 17 May 2007 (UTC)
- It was adapted to a change in the MediaWiki software that occurred in Nov 2006, so it may not work with earlier versions.--Patrick 21:51, 17 May 2007 (UTC)
- thanksĀ :-) finally got it off here. Works like a charm. --89.0.111.219 01:32, 18 May 2007 (UTC)
Installation
[edit]How does one actually install these extended parser functions? --Kasimir Katowitsch 17:12, 15 February 2009 (UTC)
Good question, did you ever get an answer? I made the appropriate change to the Local Settings after having uploaded through the wiki, that didn't work. Do I need to put the files in the same folder as the localSettings...or some other specific file/folder?
Parsing non-ASCII numbers in #expr
for translation/internationalisation
[edit]Is it possible to extend the decimal digits character class and the decimal separator class used in the #expr
parser, so that it will correctly parse and accept without error expression using non-ASCII digits (out of 0-9)?
This includes notably the Arabic, Hebew, and Indic digits (possibly also the fullwidth CJK decimal digits) as they are returned in numbers formated by #time
and magic keywords like {{CURRENTYEAR}}
Ā ?
For now we need to fix expressions currently using {{CURRENTYEAR}}
and similar by using #time
with the xn
flag before ALL date field formatting specifier letters. Because these templates only with with Latin/Greek/Cyrillic scripts.
This is a problem for maintaining multilingual sites using the Translate extension, because the date and number formats will not always generate ASCII numbers, depending on the language used of the translated page (these pages or templates will bug once they are translated to Arabic, Farsi, Assamese, Hindi, Marathi, Tamil...)
Fising the many templates that currently use {{CURRENTYEAR}}
or variable format strings for #time, to force them to use only #time with the xn
flag is a nightmare to trackĀ ! And many translation admins do not realize that a page currently working in English will bug in these languages using non-ASCII digits by default.
For this reason:
- please parse all Unicode decimal digits (at least all those used in generated by #time formats)
- support the mathematical signs and operators (minus, times, divided by), not just the ASCII ones.
- accept and discard whitespaces and apostrophes in the middle of numbers (group separators)
- support comma like the full stop as decimal separators (as we don't support any function with two parameters, if needed the functin parameter separator will be the semicolon)
- optionally support variant forms used in CFK languages (such as fullwidth digits and operators, CJK full stop, CJK and Arabic commas)
- optionally support parsing Roman numbers in capitals (also used in CJK languages in precomposed square forms for I to XII)
- optionally support some other operators as synonyms of unary functions (e.g. the square root)
This extension would be called "lenient parsing of numbers, signs and operators". It will also allow easier localisation of many templates whose numeric parameters are entered in natural languages. It will be extremely useful for wikis written in non-Latin scripts as well as all multilingual wikis using the Translate extension. This includes Wikimedia Commons, Wikimedia Meta, the Foundation wiki, BetaWiki, (default) Wikiversity, Wikimedia Incubator, or even this Wikimedia MediaWiki wiki to allow seemless transtlations, without causing nightmares by translation admins that cannot always decipher many complex templates to fix them (or cannot fix them when they are blocked by other admins that won't care about translations).
-- Verdy p (talk) 10:59, 11 January 2014 (UTC)
#min and #max in wiki-templates
[edit]To implement some nice things in a (wiki-)template I would like to make for the Dutch Wikipedia, I would like to use the #min (and #max) functions. The Extension-page states: Most of the functionality of this extension is now in the regular ParserFunctions. I can't find the #min-expression on the Help-page and the functions don't seem to work. Any help would be appreciated. RonnieV (talk) 21:18, 26 November 2015 (UTC)