From 9ac985e9a07c394bf7e1b99ea03f7c25f42dedef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Tue, 7 Sep 2021 12:51:15 +0200 Subject: [PATCH] fix: i18n plurals for number of layout columns --- i18n/en.pot | 10 ++++++---- src/pages/edit/TitleBar.js | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index d770fdfb1..1b550c101 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2021-08-31T20:31:16.412Z\n" -"PO-Revision-Date: 2021-08-31T20:31:16.412Z\n" +"POT-Creation-Date: 2021-09-07T10:44:42.043Z\n" +"PO-Revision-Date: 2021-09-07T10:44:42.043Z\n" msgid "Untitled dashboard" msgstr "Untitled dashboard" @@ -330,8 +330,10 @@ msgstr "Dashboard description" msgid "Layout" msgstr "Layout" -msgid "{{numberOfColumns}} columns" -msgstr "{{numberOfColumns}} columns" +msgid "{{count}} columns" +msgid_plural "{{count}} columns" +msgstr[0] "{{count}} column" +msgstr[1] "{{count}} columns" msgid "Change layout" msgstr "Change layout" diff --git a/src/pages/edit/TitleBar.js b/src/pages/edit/TitleBar.js index 31dbb9ecc..57df52b36 100644 --- a/src/pages/edit/TitleBar.js +++ b/src/pages/edit/TitleBar.js @@ -73,8 +73,10 @@ const EditTitleBar = ({ )} {columns.length - ? i18n.t('{{numberOfColumns}} columns', { - numberOfColumns: columns.length, // TODO: Add pluralisation + ? i18n.t('{{count}} columns', { + count: columns.length, + defaultValue: '{{count}} column', + defaultValue_plural: '{{count}} columns', }) : i18n.t('Freeflow')}