Skip to content

Commit

Permalink
Pluralize item counts for English, at least; fixes #3268 (#3446)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer authored Jun 15, 2021
1 parent d215c3d commit eefc88a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/ManifestListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class ManifestListItem extends React.Component {
</Grid>
<Grid item xs={8} sm={4}>
<Typography className={ns('manifest-list-item-provider')}>{provider || t('addedFromUrl')}</Typography>
<Typography>{t('numItems', { number: size })}</Typography>
<Typography>{t('numItems', { count: size, number: size })}</Typography>
</Grid>

<Grid item xs={4} sm={2}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/WindowSideBarAnnotationsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class WindowSideBarAnnotationsPanel extends Component {
titleControls={<AnnotationSettings windowId={windowId} />}
>
<div className={classes.section}>
<Typography component="p" variant="subtitle2">{t('showingNumAnnotations', { number: annotationCount })}</Typography>
<Typography component="p" variant="subtitle2">{t('showingNumAnnotations', { count: annotationCount, number: annotationCount })}</Typography>
</div>

{canvasIds.map((canvasId, index) => (
Expand Down
12 changes: 8 additions & 4 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
"moveCompanionWindowToRight": "Move to right",
"nextCanvas": "Next item",
"noItemSelected": "No item selected",
"numItems": "{{number}} items",
"numItems": "{{number}} item",
"numItems_plural": "{{number}} items",
"off": "Off",
"openCompanionWindow_annotations": "Annotations",
"openCompanionWindow_attribution": "Rights",
Expand Down Expand Up @@ -121,7 +122,8 @@
"searchSubmitAria": "Submit search",
"searchTitle": "Search",
"selectWorkspaceMenu": "Select workspace type",
"showingNumAnnotations": "Showing {{number}} annotations",
"showingNumAnnotations": "Showing {{number}} annotation",
"showingNumAnnotations_plural": "Showing {{number}} annotations",
"showCollection": "Show collection",
"showZoomControls": "Show zoom controls",
"sidebarPanelsNavigation": "Sidebar panels navigation",
Expand All @@ -134,8 +136,10 @@
"thumbnailNavigation": "Thumbnails",
"thumbnails": "Thumbnails",
"toggleWindowSideBar": "Toggle sidebar",
"totalCollections": "{{count}} collections",
"totalManifests": "{{count}} manifests",
"totalCollections": "{{count}} collection",
"totalCollections_plural": "{{count}} collections",
"totalManifests": "{{count}} manifest",
"totalManifests_plural": "{{count}} manifests",
"tryAgain": "Try again",
"untitled": "[Untitled]",
"view": "View",
Expand Down

0 comments on commit eefc88a

Please sign in to comment.