Skip to content

Commit 9c695fa

Browse files
authored
chore(l10n): Enhance translation guidelines for plural forms
Added guidelines for plural forms in translations. Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
1 parent 30c2f31 commit 9c695fa

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

developer_manual/basics/translations.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,32 @@ JS Example:
222222
223223
.. _improving-translations:
224224

225+
.. important::
226+
General rule: Whenever a variable with varying values (numbers) is part of a string, the plural form must be used.
227+
228+
There are languages with multi-plural forms. See https://en.wikipedia.org/wiki/Plural#Use_in_systems_of_grammatical_number
229+
230+
Example
231+
232+
.. code-block:: php
233+
234+
"Vault will be locked in %1$d seconds"
235+
236+
This means that even though the value ‘seconds’ is always greater than 1, translators on Transifex are unable to produce valid translations in the plural form for some languages.
237+
238+
Bad: Only one string provided
239+
240+
.. code-block:: php
241+
242+
"Vault will be locked in %1$d seconds"
243+
244+
Good: Two strings in source code.
245+
246+
.. code-block:: php
247+
248+
"Vault will be locked in %1$d second"
249+
"Vault will be locked in %1$d seconds"
250+
225251
Improving your translations
226252
^^^^^^^^^^^^^^^^^^^^^^^^^^^
227253

0 commit comments

Comments
 (0)