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

Partial support for the Xliff translation format. More...

Inheritance diagram for XliffFFS:
SimpleFFS FFS

Public Member Functions

 getFileExtensions ()
 Return the commonly used file extensions for these formats.
 
 readFromVariable ( $data, $element='target')
 
 read ( $code)
 
 supportsFuzzy ()
 Query the capabilities of this FFS.
 
- Public Member Functions inherited from SimpleFFS
 __construct (FileBasedMessageGroup $group)
 
 setGroup (FileBasedMessageGroup $group)
 
 getGroup ()
 
 setWritePath ( $writePath)
 
 getWritePath ()
 
 exists ( $code=false)
 Returns true if the file for this message group in a given language exists.
 
 readFromVariable ( $data)
 Parse the message data given as a string in the SimpleFFS format and return it as an array of AUTHORS and MESSAGES.
 
 write (MessageCollection $collection)
 Write the collection to file.
 
 writeIntoVariable (MessageCollection $collection)
 Read a collection and return it as a SimpleFFS formatted string.
 
 filterAuthors (array $authors, $code)
 Remove excluded authors.
 
 isContentEqual ( $a, $b)
 Checks whether two strings are equal.
 
 shouldOverwrite ( $a, $b)
 Allows to skip writing the export output into a file.
 
 isGroupFfsReadable ()
 Check if the file format of the current group is readable by the file format system.
 

Static Public Member Functions

static isValid ( $data)
 
static getInnerXml (DOMElement $node)
 Gets the html inside en element without the element itself.
 
- Static Public Member Functions inherited from SimpleFFS
static fixNewLines ( $data)
 Replaces all Windows and Mac line endings with Unix line endings.
 

Protected Member Functions

 writeReal (MessageCollection $collection)
 
- Protected Member Functions inherited from SimpleFFS
 tryReadSource ( $filename, MessageCollection $collection)
 This tries to pick up external authors in the source files so that they are not lost if those authors are not among those who have translated in the wiki.
 
 tryReadFile ( $filename)
 Read the contents of $filename and return it as a string.
 

Additional Inherited Members

- Protected Attributes inherited from SimpleFFS
 $group
 
 $writePath
 
 $extra
 Stores the FILES section of the YAML configuration, which can be accessed for extra FFS class specific options.
 

Detailed Description

Partial support for the Xliff translation format.

Since
2013-04

Definition at line 15 of file XliffFFS.php.

Member Function Documentation

◆ getFileExtensions()

XliffFFS::getFileExtensions ( )

Return the commonly used file extensions for these formats.

Include the dot.

Returns
string[]
Since
2013-04

Reimplemented from SimpleFFS.

Definition at line 35 of file XliffFFS.php.

◆ getInnerXml()

static XliffFFS::getInnerXml ( DOMElement $node)
static

Gets the html inside en element without the element itself.

Parameters
DOMElement$node
Returns
string

Definition at line 121 of file XliffFFS.php.

◆ isValid()

static XliffFFS::isValid ( $data)
static

Definition at line 16 of file XliffFFS.php.

◆ read()

XliffFFS::read ( $code)
Parameters
string$codeLanguage code.
Returns
array|bool
Exceptions
MWException

Reimplemented from SimpleFFS.

Definition at line 99 of file XliffFFS.php.

◆ readFromVariable()

XliffFFS::readFromVariable ( $data,
$element = 'target' )
Parameters
string$data
string$element
Returns
array Parsed data.

Definition at line 44 of file XliffFFS.php.

◆ supportsFuzzy()

XliffFFS::supportsFuzzy ( )

Query the capabilities of this FFS.

Allowed values are:

  • yes
  • write (ignored on read)
  • no (stripped on write)
    Returns
    string
    Since
    2013-03-05

Reimplemented from SimpleFFS.

Definition at line 189 of file XliffFFS.php.

◆ writeReal()

XliffFFS::writeReal ( MessageCollection $collection)
protected
Parameters
MessageCollection$collection
Returns
string

Reimplemented from SimpleFFS.

Definition at line 130 of file XliffFFS.php.


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