Skip to content

Commit ccf5ca2

Browse files
authored
Merge pull request #5344 from oscar-escire/Issue/4202
Add singular/plural support for QA notification messages
2 parents f5e8730 + ad44d3b commit ccf5ca2

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/app/item-page/simple/qa-event-notification/qa-event-notification.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
</div>
1111
<div class="w-100 d-flex justify-content-between">
1212
<div class="ps-4 align-self-center">
13-
{{'item.qa-event-notification.check.notification-info' | translate : {num: source.totalEvents } }}
13+
@if (source.totalEvents === 1) {
14+
{{'item.qa-event-notification.check.notification-info.singular' | translate : {num: source.totalEvents } }}
15+
} @else {
16+
{{'item.qa-event-notification.check.notification-info.plural' | translate : {num: source.totalEvents } }}
17+
}
1418
</div>
1519
<button [routerLink]="[ getQualityAssuranceRoute(), (source.id | dsSplit: ':')[0], 'target', item.id]"
1620
[queryParams]="{ forward: true }"

src/app/my-dspace-page/my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
</div>
1515
<div class="w-100 d-flex justify-content-between">
1616
<div class="ps-4 align-self-center">
17-
{{ "mydspace.qa-event-notification.check.notification-info" | translate : { num: source.totalEvents } }}
17+
@if (source.totalEvents === 1) {
18+
{{ "mydspace.qa-event-notification.check.notification-info.singular" | translate : { num: source.totalEvents } }}
19+
} @else {
20+
{{ "mydspace.qa-event-notification.check.notification-info.plural" | translate : { num: source.totalEvents } }}
21+
}
1822
</div>
1923
<button
2024
[routerLink]="[getQualityAssuranceRoute(), source.id]"

src/assets/i18n/en.json5

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,11 +3007,15 @@
30073007

30083008
"item.truncatable-part.show-less": "Collapse",
30093009

3010-
"item.qa-event-notification.check.notification-info": "There are {{num}} pending suggestions related to your account",
3010+
"item.qa-event-notification.check.notification-info.singular": "There is {{num}} pending suggestion related to your account",
3011+
3012+
"item.qa-event-notification.check.notification-info.plural": "There are {{num}} pending suggestions related to your account",
30113013

30123014
"item.qa-event-notification-info.check.button": "View",
30133015

3014-
"mydspace.qa-event-notification.check.notification-info": "There are {{num}} pending suggestions related to your account",
3016+
"mydspace.qa-event-notification.check.notification-info.singular": "There is {{num}} pending suggestion related to your account",
3017+
3018+
"mydspace.qa-event-notification.check.notification-info.plural": "There are {{num}} pending suggestions related to your account",
30153019

30163020
"mydspace.qa-event-notification-info.check.button": "View",
30173021

0 commit comments

Comments
 (0)