RubyYamlFFS Class Reference
[File format support]

Extends YamlFFS with Ruby (on Rails) style plural support. More...

Inheritance diagram for RubyYamlFFS:
Inheritance graph
[legend]
Collaboration diagram for RubyYamlFFS:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 getFileExtensions ()
 Return the commonly used file extensions for these formats.
 flattenPlural ($messages)
 Flattens ruby plural arrays into special plural syntax.
 unflattenPlural ($key, $message)
 Converts the special plural syntax to array or ruby style plurals.

Static Protected Attributes

static $pluralWords

Detailed Description

Extends YamlFFS with Ruby (on Rails) style plural support.

Supports subkeys zero, one, many, few, other and two for each message using plural with {{count}} variable.

Definition at line 9 of file RubyYamlFFS.php.


Member Function Documentation

RubyYamlFFS::flattenPlural ( messages  ) 

Flattens ruby plural arrays into special plural syntax.

Parameters:
array $messages Array of keys and values
Exceptions:
MWException 
Returns:
bool|string

Reimplemented from YamlFFS.

Definition at line 31 of file RubyYamlFFS.php.

RubyYamlFFS::getFileExtensions (  ) 

Return the commonly used file extensions for these formats.

Include the dot.

Returns:
string[]
Since:
2013-04

Reimplemented from YamlFFS.

Definition at line 19 of file RubyYamlFFS.php.

RubyYamlFFS::unflattenPlural ( key,
message 
)

Converts the special plural syntax to array or ruby style plurals.

Parameters:
string $key Message key prefix
string $message The plural string
Returns:
bool|array

Reimplemented from YamlFFS.

Definition at line 84 of file RubyYamlFFS.php.

Here is the call graph for this function:


Member Data Documentation

RubyYamlFFS::$pluralWords [static, protected]
Initial value:
 array(
        'zero' => 1,
        'one' => 1,
        'many' => 1,
        'few' => 1,
        'other' => 1,
        'two' => 1
    )

Definition at line 10 of file RubyYamlFFS.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:52 2013 for MediaWiki Translate Extension by  doxygen 1.6.3