Skip to content

Commit e018998

Browse files
authored
Merge pull request #5723 from oscar-escire/Issue/4202-DSpace-8
[Port dspace-8_x] Add singular/plural support for QA notification messages
2 parents 31fcca9 + 108fe97 commit e018998

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
@@ -9,7 +9,11 @@
99
</div>
1010
<div class="w-100 d-flex justify-content-between">
1111
<div class="pl-4 align-self-center">
12-
{{'item.qa-event-notification.check.notification-info' | translate : {num: source.totalEvents } }}
12+
@if (source.totalEvents === 1) {
13+
{{'item.qa-event-notification.check.notification-info.singular' | translate : {num: source.totalEvents } }}
14+
} @else {
15+
{{'item.qa-event-notification.check.notification-info.plural' | translate : {num: source.totalEvents } }}
16+
}
1317
</div>
1418
<button [routerLink]="[ getQualityAssuranceRoute(), (source.id | dsSplit: ':')[0], 'target', item.id]"
1519
[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="pl-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
@@ -2753,11 +2753,15 @@
27532753

27542754
"item.truncatable-part.show-less": "Collapse",
27552755

2756-
"item.qa-event-notification.check.notification-info": "There are {{num}} pending suggestions related to your account",
2756+
"item.qa-event-notification.check.notification-info.singular": "There is {{num}} pending suggestion related to your account",
2757+
2758+
"item.qa-event-notification.check.notification-info.plural": "There are {{num}} pending suggestions related to your account",
27572759

27582760
"item.qa-event-notification-info.check.button": "View",
27592761

2760-
"mydspace.qa-event-notification.check.notification-info": "There are {{num}} pending suggestions related to your account",
2762+
"mydspace.qa-event-notification.check.notification-info.singular": "There is {{num}} pending suggestion related to your account",
2763+
2764+
"mydspace.qa-event-notification.check.notification-info.plural": "There are {{num}} pending suggestions related to your account",
27612765

27622766
"mydspace.qa-event-notification-info.check.button": "View",
27632767

0 commit comments

Comments
 (0)