JavaFFS class implements support for Java properties files. More...
Public Member Functions | |
supportsFuzzy () | |
Query the capabilities of this FFS. | |
getFileExtensions () | |
Return the commonly used file extensions for these formats. | |
__construct (FileBasedMessageGroup $group) | |
readFromVariable ( $data) | |
Public Member Functions inherited from SimpleFFS | |
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. | |
Static Public Member Functions | |
static | writeRow ( $key, $sep, $value) |
Writes well-formed properties file row with key and value. | |
static | readRow ( $line, $sep) |
Parses non-empty properties file row to key and value. | |
static | getExtraSchema () |
Return a data structure that will be merged with the base schema. | |
Public Attributes | |
$messages = $this->group->getMangler()->mangleArray( $messages ) | |
return ['AUTHORS'=> $authors, 'MESSAGES'=> $messages,] | |
Protected Member Functions | |
writeReal (MessageCollection $collection) | |
doHeader (MessageCollection $collection) | |
doAuthors (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. | |
Protected Attributes | |
$keySeparator = '=' | |
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. | |
JavaFFS class implements support for Java properties files.
This class reads and writes only utf-8 files. Java projects need to run native2ascii on them before using them.
This class adds a new item into FILES section of group configuration: keySeparator
which defaults to '='.
Definition at line 16 of file JavaFFS.php.
JavaFFS::__construct | ( | FileBasedMessageGroup | $group | ) |
FileBasedMessageGroup | $group |
Reimplemented from SimpleFFS.
Definition at line 28 of file JavaFFS.php.
|
protected |
|
protected |
|
static |
Return a data structure that will be merged with the base schema.
It is not possible to remove things.
Implements MediaWiki\Extension\Translate\MessageGroupConfiguration\MetaYamlSchemaExtender.
Definition at line 250 of file JavaFFS.php.
JavaFFS::getFileExtensions | ( | ) |
Return the commonly used file extensions for these formats.
Include the dot.
Reimplemented from SimpleFFS.
Definition at line 21 of file JavaFFS.php.
JavaFFS::readFromVariable | ( | $data | ) |
string | $data |
MWException |
Reimplemented from SimpleFFS.
Definition at line 41 of file JavaFFS.php.
|
static |
Parses non-empty properties file row to key and value.
string | $line | |
string | $sep |
Definition at line 161 of file JavaFFS.php.
JavaFFS::supportsFuzzy | ( | ) |
Query the capabilities of this FFS.
Allowed values are:
Reimplemented from SimpleFFS.
Definition at line 17 of file JavaFFS.php.
|
protected |
MessageCollection | $collection |
Reimplemented from SimpleFFS.
Definition at line 102 of file JavaFFS.php.
|
static |
Writes well-formed properties file row with key and value.
string | $key | |
string | $sep | |
string | $value |
Definition at line 143 of file JavaFFS.php.
|
protected |
Definition at line 25 of file JavaFFS.php.
JavaFFS::$messages = $this->group->getMangler()->mangleArray( $messages ) |
Definition at line 90 of file JavaFFS.php.
JavaFFS::return[ 'AUTHORS'=> $authors, 'MESSAGES'=> $messages,] |
Definition at line 92 of file JavaFFS.php.