From 338f84b2b0b4e347e3705dd132b3be6dc9311220 Mon Sep 17 00:00:00 2001 From: rakekniven <2069590+rakekniven@users.noreply.github.com> Date: Mon, 20 Jul 2026 14:33:33 +0200 Subject: [PATCH 1/2] 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> --- developer_manual/basics/translations.rst | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/developer_manual/basics/translations.rst b/developer_manual/basics/translations.rst index 4ee51205f44..17169aa4b17 100644 --- a/developer_manual/basics/translations.rst +++ b/developer_manual/basics/translations.rst @@ -222,6 +222,32 @@ JS Example: .. _improving-translations: +.. important:: + General rule: Whenever a variable with varying values (numbers) is part of a string, the plural form must be used. + +There are languages with multi-plural forms. See https://en.wikipedia.org/wiki/Plural#Use_in_systems_of_grammatical_number + +Example + +.. code-block:: php + + "Vault will be locked in %1$d seconds" + +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. + +Bad: Only one string provided + +.. code-block:: php + + "Vault will be locked in %1$d seconds" + +Good: Two strings in source code. + +.. code-block:: php + + "Vault will be locked in %1$d second" + "Vault will be locked in %1$d seconds" + Improving your translations ^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 9d43266a1abd8d08877bfc53ead0c7a04eac7996 Mon Sep 17 00:00:00 2001 From: rakekniven <2069590+rakekniven@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:05:43 +0200 Subject: [PATCH 2/2] chore(l10n): Fix syntax Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com> --- developer_manual/basics/translations.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer_manual/basics/translations.rst b/developer_manual/basics/translations.rst index 17169aa4b17..62a614027f0 100644 --- a/developer_manual/basics/translations.rst +++ b/developer_manual/basics/translations.rst @@ -220,8 +220,6 @@ JS Example: /* BEST: Simple string with undefined plural not using any number in the string */ t('myapp', 'Import calendars') -.. _improving-translations: - .. important:: General rule: Whenever a variable with varying values (numbers) is part of a string, the plural form must be used. @@ -248,6 +246,8 @@ Good: Two strings in source code. "Vault will be locked in %1$d second" "Vault will be locked in %1$d seconds" +.. _improving-translations: + Improving your translations ^^^^^^^^^^^^^^^^^^^^^^^^^^^