Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: i18n plurals for number of layout columns #1941

Merged
merged 1 commit into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions src/pages/edit/TitleBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ const EditTitleBar = ({
)}
<span className={classes.layoutValue}>
{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')}
</span>
Expand Down