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

Generic file format support for JavaScript formatted files. More...

Inheritance diagram for JavaScriptFFS:
SimpleFFS FFS

Public Member Functions

 getFileExtensions ()
 Return the commonly used file extensions for these formats.
 
 readFromVariable ( $data)
 
 writeReal (MessageCollection $collection)
 
- Public Member Functions inherited from SimpleFFS
 supportsFuzzy ()
 Query the capabilities of this FFS.
 
 __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.
 
 read ( $code)
 Reads messages from the file in a given language and returns an array of AUTHORS, MESSAGES and possibly other properties.
 
 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.
 

Protected Member Functions

 transformKey ( $key)
 Message keys format.
 
 header ( $code, array $authors)
 Header of message file.
 
 footer ()
 Footer of message file.
 
 authorsList (array $authors)
 
- 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.
 

Static Protected Member Functions

static escapeJsString ( $string)
 
static unescapeJsString ( $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

Generic file format support for JavaScript formatted files.

Definition at line 9 of file JavaScriptFFS.php.

Member Function Documentation

◆ authorsList()

JavaScriptFFS::authorsList ( array $authors)
protected
Parameters
string[]$authors
Returns
string

Definition at line 170 of file JavaScriptFFS.php.

◆ escapeJsString()

static JavaScriptFFS::escapeJsString ( $string)
staticprotected
Parameters
string$string
Returns
string

Definition at line 213 of file JavaScriptFFS.php.

◆ getFileExtensions()

JavaScriptFFS::getFileExtensions ( )

Return the commonly used file extensions for these formats.

Include the dot.

Returns
string[]
Since
2013-04

Reimplemented from SimpleFFS.

Definition at line 10 of file JavaScriptFFS.php.

◆ header()

JavaScriptFFS::header ( $code,
array $authors )
abstractprotected

Header of message file.

Parameters
string$code
string[]$authors

◆ readFromVariable()

JavaScriptFFS::readFromVariable ( $data)
Parameters
string$data
Returns
array Parsed data.

Reimplemented from SimpleFFS.

Definition at line 40 of file JavaScriptFFS.php.

◆ transformKey()

JavaScriptFFS::transformKey ( $key)
abstractprotected

Message keys format.

Parameters
string$key
Returns
string

◆ unescapeJsString()

static JavaScriptFFS::unescapeJsString ( $string)
staticprotected
Parameters
string$string
Returns
string

Definition at line 221 of file JavaScriptFFS.php.

◆ writeReal()

JavaScriptFFS::writeReal ( MessageCollection $collection)
Parameters
MessageCollection$collection
Returns
string

Reimplemented from SimpleFFS.

Definition at line 130 of file JavaScriptFFS.php.


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