Translations::select_plural_form
Given the number of items, returns the 0-based index of the plural form to use
Here, in the base Translations class, the common logic for English is implemented: 0 if there is one element, 1 otherwise This function should be overridden by the sub-classes. For example MO/PO can derive the logic from their headers.
Signature
public function select_plural_form(integer
$count )
Parameters
$count
— integer- number of items
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
110 | 1 | error | Spaces must be used for alignment; tabs are not allowed |
110 | 5 | error | Line indented incorrectly; expected 8 spaces, found 4 |
110 | 5 | error | Method name "Translations::select_plural_form" is not in camel caps format |
110 | 5 | error | Visibility must be declared on method "select_plural_form" |
110 | 41 | error | Opening brace should be on a new line |
111 | 1 | error | Spaces must be used for alignment; tabs are not allowed |
111 | 9 | error | Line indented incorrectly; expected at least 12 spaces, found 8 |
112 | 1 | error | Spaces must be used for alignment; tabs are not allowed |
112 | 5 | error | Line indented incorrectly; expected 8 spaces, found 4 |