Page MenuHomePhabricator

Update to ParserFunctions.php
Closed, ResolvedPublic

Description

Please update the bottom section of ParserFunctions.php file to what you see below. This is to enable support for Farsi translation of parser functions. Thanks in advance.


function wfParserFunctionsLanguageGetMagic( &$magicWords, $langCode ) {

switch ( $langCode ) {
    case 'he':
        $magicWords['expr']    = array( 0, 'חשב',          'expr' );
        $magicWords['if']      = array( 0, 'תנאי',         'if' );
        $magicWords['ifeq']    = array( 0, 'שווה',         'ifeq' );
        $magicWords['ifexpr']  = array( 0, 'חשב תנאי',     'ifexpr' );
        $magicWords['switch']  = array( 0, 'בחר',          'switch' );
        $magicWords['default'] = array( 0, '#ברירת מחדל',  '#default' );
        $magicWords['ifexist'] = array( 0, 'קיים',         'ifexist' );
        $magicWords['time']    = array( 0, 'זמן',          'time' );
        $magicWords['rel2abs'] = array( 0, 'יחסי למוחלט',  'rel2abs' );
        break;

case 'fa':

        $magicWords['expr']    = array( 0, 'حساب',         'expr' );
        $magicWords['if']      = array( 0, 'اگر',          'if' );
        $magicWords['ifeq']    = array( 0, 'اگرمساوی',     'ifeq' );
        $magicWords['ifexpr']  = array( 0, 'اگرحساب',      'ifexpr' );
        $magicWords['switch']  = array( 0, 'گزینه',        'switch' );
        $magicWords['default'] = array( 0, '#پیش‌فرض',      '#default' );
        $magicWords['ifexist'] = array( 0, 'اگرموجود',     'ifexist' );
        $magicWords['time']    = array( 0, 'زمان',         'time' );
        $magicWords['rel2abs'] = array( 0, 'نسبی‌به‌مطلق',   'rel2abs' );
        break;
    default:
        $magicWords['expr']    = array( 0, 'expr' );
        $magicWords['if']      = array( 0, 'if' );
        $magicWords['ifeq']    = array( 0, 'ifeq' );
        $magicWords['ifexpr']  = array( 0, 'ifexpr' );
        $magicWords['switch']  = array( 0, 'switch' );
        $magicWords['default'] = array( 0, '#default' );
        $magicWords['ifexist'] = array( 0, 'ifexist' );
        $magicWords['time']    = array( 0, 'time' );
        $magicWords['rel2abs'] = array( 0, 'rel2abs' );
        $magicWords['titleparts'] = array( 0, 'titleparts' );
}
return true;

}


Version: unspecified
Severity: enhancement

Details

Reference
bz10144

Event Timeline

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