Translate extension for MediaWiki
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\Validation\Validators\PrintfIndexedParameterValidator Class Reference

Validates that every % in a translation is followed by a non-zero argument index in the form N$ (e.g. More...

Inheritance diagram for MediaWiki\Extension\Translate\Validation\Validators\PrintfIndexedParameterValidator:
MediaWiki\Extension\Translate\Validation\MessageValidator

Public Member Functions

 getIssues (Message $message, string $targetLanguage)

Detailed Description

Validates that every % in a translation is followed by a non-zero argument index in the form N$ (e.g.

%1$s, %2$d). Field widths without an explicit index (e.g. %10s, %2d) are rejected. The %% escape sequence is accepted by stripping all %% pairs before checking. Use this for projects that require explicit argument indices and forbid positional or bare % signs. @license GPL-2.0-or-later

Since
2026.09

Definition at line 20 of file PrintfIndexedParameterValidator.php.

Member Function Documentation

◆ getIssues()

MediaWiki\Extension\Translate\Validation\Validators\PrintfIndexedParameterValidator::getIssues ( Message $message,
string $targetLanguage )

The documentation for this class was generated from the following file: