Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
PoImporter Class Reference

Parses a po file that has been exported from MediaWiki. More...

Public Member Functions

 __construct ( $file)
 
 setProgressCallback ( $callback)
 
 parse ()
 Parses relevant stuff from the po file.
 

Protected Member Functions

 reportProgress ( $text, $channel=null, $severity='status')
 
 initMessages ( $id, $code)
 Loads translations for comparison.
 

Detailed Description

Parses a po file that has been exported from MediaWiki.

Other files are not supported.

Definition at line 94 of file poimport.php.

Constructor & Destructor Documentation

◆ __construct()

PoImporter::__construct ( $file)
Parameters
string$fileFile to import

Definition at line 104 of file poimport.php.

Member Function Documentation

◆ initMessages()

PoImporter::initMessages ( $id,
$code )
protected

Loads translations for comparison.

Parameters
string$idId of MessageGroup.
string$codeLanguage code.
Returns
MessageCollection

Definition at line 127 of file poimport.php.

◆ parse()

PoImporter::parse ( )

Parses relevant stuff from the po file.

Returns
array|bool

Definition at line 140 of file poimport.php.

◆ reportProgress()

PoImporter::reportProgress ( $text,
$channel = null,
$severity = 'status' )
protected
See also
Maintenance::output for param docs

Definition at line 113 of file poimport.php.

◆ setProgressCallback()

PoImporter::setProgressCallback ( $callback)

Definition at line 108 of file poimport.php.


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