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 91 of file poimport.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 101 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 124 of file poimport.php.

◆ parse()

PoImporter::parse ( )

Parses relevant stuff from the po file.

Returns
array|bool

Definition at line 137 of file poimport.php.

◆ reportProgress()

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

Definition at line 110 of file poimport.php.

◆ setProgressCallback()

PoImporter::setProgressCallback ( $callback)

Definition at line 105 of file poimport.php.


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