Page MenuHomePhabricator

Parameter replacement in messages happens only after parsing
Closed, ResolvedPublic

Description

Author: elephantus

Description:
Parameter replacement ($1, $2...) in MediaWiki messages happens only after the
parsing of the message is done (incl. expansion of templates and functions
invoked through template syntax, eg {{plural:number|x|y|z}}). This means that
message parameters can't be used as function arguments, which would be very
useful in messages like "categoryarticlecount" and similar. Could the parsing be
somehow moved after the parameter replacement?


Version: unspecified
Severity: minor

Details

Reference
bz4489

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:00 PM
bzimport set Reference to bz4489.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

What do you mean "function arguments" ?

elephantus wrote:

(In reply to comment #1)

What do you mean "function arguments" ?

Eg {{plural:$1|one|two|three}}

elephantus wrote:

*** Bug 3704 has been marked as a duplicate of this bug. ***

elephantus wrote:

These two fix this but probably break other things

1/2

Attached:

elephantus wrote:

See previous

2/2

Attached:

Eugene.Zelenko wrote:

I don't know is this problem is fixed exactly as in this bug
description/patches, but PLURAL: works correctly in 1.7alpha (r14284).

Bug 3704 is definitely fixed.