New-style FFS class that implements support for gettext file format.
More...
New-style FFS class that implements support for gettext file format.
Definition at line 24 of file GettextFFS.php.
◆ doGettextHeader()
◆ expectKeyword()
static GettextFFS::expectKeyword |
( |
| $name, |
|
|
| $section ) |
|
static |
◆ formatForWiki()
static GettextFFS::formatForWiki |
( |
| $data, |
|
|
| $whitespace = 'mark' ) |
|
static |
This parses the Gettext text block format.
Since trailing whitespace is not allowed in MediaWiki pages, the default action is to append -character at the end of the message. You can also choose to ignore it and use the trim action instead.
- Parameters
-
string | $data | |
string | $whitespace | |
- Exceptions
-
- Returns
- string
Definition at line 362 of file GettextFFS.php.
◆ generateKeyFromItem()
static GettextFFS::generateKeyFromItem |
( |
array | $item, |
|
|
| $algorithm = 'simple' ) |
|
static |
Generates unique key for each message.
Changing this WILL BREAK ALL existing pages!
- Parameters
-
array | $item | As returned by parseGettextSection |
string | $algorithm | Algorithm used to generate message keys: simple or legacy |
- Returns
- string
Definition at line 323 of file GettextFFS.php.
◆ getFileExtensions()
GettextFFS::getFileExtensions |
( |
| ) |
|
Return the commonly used file extensions for these formats.
Include the dot.
- Returns
- string[]
- Since
- 2013-04
Reimplemented from SimpleFFS.
Definition at line 32 of file GettextFFS.php.
◆ parseFlags()
static GettextFFS::parseFlags |
( |
| $section | ) |
|
|
static |
◆ parseGettext()
GettextFFS::parseGettext |
( |
| $data | ) |
|
◆ parseGettextData()
static GettextFFS::parseGettextData |
( |
| $data, |
|
|
| $useCtxtAsKey, |
|
|
StringMangler | $mangler, |
|
|
| $keyAlgorithm, |
|
|
bool | $allowPotMode ) |
|
static |
Parses gettext file as string into internal representation.
- Parameters
-
string | $data | |
bool | $useCtxtAsKey | Whether to create message keys from the context or use msgctxt (non-standard po-files) |
StringMangler | $mangler | |
string | $keyAlgorithm | Key generation algorithm, see generateKeyFromItem |
bool | $allowPotMode | |
- Exceptions
-
- Returns
- array
Definition at line 99 of file GettextFFS.php.
◆ parseGettextSection()
static GettextFFS::parseGettextSection |
( |
| $section, |
|
|
| $pluralCount ) |
|
static |
◆ parseHeaderTags()
static GettextFFS::parseHeaderTags |
( |
| $headers | ) |
|
|
static |
◆ processGettextPluralMessage()
static GettextFFS::processGettextPluralMessage |
( |
| $pluralCount, |
|
|
| $section ) |
|
static |
◆ read()
GettextFFS::read |
( |
| $code | ) |
|
◆ readFromVariable()
GettextFFS::readFromVariable |
( |
| $data | ) |
|
◆ setOfflineMode()
GettextFFS::setOfflineMode |
( |
| $value | ) |
|
◆ supportsFuzzy()
GettextFFS::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 28 of file GettextFFS.php.
◆ writeReal()
- Parameters
-
MessageCollection | $collection | |
- Returns
- string
Reimplemented from SimpleFFS.
Definition at line 394 of file GettextFFS.php.
◆ $offlineMode
GettextFFS::$offlineMode = false |
|
protected |
The documentation for this class was generated from the following file: