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

Updated 0 board to 0 boards (singular vs plural) #1210

Merged
merged 13 commits into from
Sep 22, 2021
2 changes: 2 additions & 0 deletions webapp/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"GalleryCard.delete": "Delete",
"GalleryCard.duplicate": "Duplicate",
"GroupBy.ungroup": "Ungroup",
"General.BoardSingular": "Board",
"General.BoardPlural": "Boards",
"KanbanCard.delete": "Delete",
"KanbanCard.duplicate": "Duplicate",
"KanbanCard.untitled": "Untitled",
Expand Down
6 changes: 5 additions & 1 deletion webapp/src/components/workspaceSwitcher/workspaceOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ const WorkspaceOptions = (props: Props): JSX.Element => {

const Option = (props: any): JSX.Element => {
const {innerProps, innerRef} = props
const intl = useIntl()

const singular = intl.formatMessage({id: 'General.BoardSingular', defaultMessage: 'Board'})
const plural = intl.formatMessage({id: 'General.BoardPlural', defaultMessage: 'Boards'})

return (
<div
Expand All @@ -102,7 +106,7 @@ const Option = (props: any): JSX.Element => {
{
props.data.value !== DashboardOption.value &&
<div className='boardCount'>
{props.data.boardCount} {props.data.boardCount > 1 ? 'Boards' : 'Board'}
{props.data.boardCount} {props.data.boardCount === 1 ? singular : plural}
</div>
}

Expand Down