Skip to content

Commit

Permalink
Fixed the i18n entries for comic details [#547]
Browse files Browse the repository at this point in the history
Also removed "-detail" from all effect entry translation keys.
  • Loading branch information
mcpierce committed Mar 1, 2021
1 parent 5a4a341 commit 6d4c533
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 54 deletions.
Expand Up @@ -11,7 +11,7 @@
[matBadge]="node.childCount"
matBadgeOverlap="false"
matBadgePosition="after"
>{{ node.label | translate }}</span
>{{ node.label | translate }}</span
>
</li>
</mat-tree-node>
Expand All @@ -21,15 +21,15 @@
<button mat-icon-button matTreeNodeToggle>
<mat-icon class="mat-icon-rtl-mirror">
{{
treeControl.isExpanded(node) ? "expand_more" : "chevron_right"
treeControl.isExpanded(node) ? "expand_more" : "chevron_right"
}}
</mat-icon>
</button>
<span
[matBadge]="node.childCount"
matBadgeOverlap="false"
matBadgePosition="after"
>{{ node.label | translate }}</span
>{{ node.label | translate }}</span
>
</div>
<ul [class.cx-invisible-node]="!treeControl.isExpanded(node)">
Expand Down
12 changes: 4 additions & 8 deletions comixed-web/src/app/library/effects/comic-import.effects.ts
Expand Up @@ -66,7 +66,7 @@ export class ComicImportEffects {
tap((response: LoadComicFilesResponse) =>
this.alertService.info(
this.translateService.instant(
'load-comic-files.effect-success-detail',
'load-comic-files.effect-success',
{ count: response.files.length }
)
)
Expand All @@ -85,9 +85,7 @@ export class ComicImportEffects {
catchError(error => {
this.logger.error('Service failure:', error);
this.alertService.error(
this.translateService.instant(
'load-comic-files.effect-failure-detail'
)
this.translateService.instant('load-comic-files.effect-failure')
);
return of(loadComicFilesFailed());
})
Expand Down Expand Up @@ -119,7 +117,7 @@ export class ComicImportEffects {
tap(() =>
this.alertService.info(
this.translateService.instant(
'send-comic-files.effect-success-detail',
'send-comic-files.effect-success',
{ count: action.files.length }
)
)
Expand All @@ -138,9 +136,7 @@ export class ComicImportEffects {
catchError(error => {
this.logger.error('Service failure:', error);
this.alertService.error(
this.translateService.instant(
'send-comic-files.effect-failure-detail'
)
this.translateService.instant('send-comic-files.effect-failure')
);
return of(sendComicFilesFailed());
})
Expand Down
4 changes: 1 addition & 3 deletions comixed-web/src/app/library/effects/library.effects.ts
Expand Up @@ -52,9 +52,7 @@ export class LibraryEffects {
catchError(error => {
this.logger.error('Service failure:', error);
this.alertService.error(
this.translateService.instant(
'comic.load-comic.effect-failure-detail'
)
this.translateService.instant('comic.load-comic.effect-failure')
);
return of(loadComicFailed());
})
Expand Down
6 changes: 2 additions & 4 deletions comixed-web/src/app/user/effects/user.effects.ts
Expand Up @@ -68,7 +68,7 @@ export class UserEffects {
this.logger.error('Service failure:', error);
this.alertService.error(
this.translateService.instant(
'user.load-current-user.effect-failure-detail'
'user.load-current-user.effect-failure'
)
);
return of(loadCurrentUserFailed());
Expand Down Expand Up @@ -105,9 +105,7 @@ export class UserEffects {
this.logger.error('Service failure:', error);
this.tokenService.clearAuthToken();
this.alertService.error(
this.translateService.instant(
'user.login-user.effect-failure-detail'
)
this.translateService.instant('user.login-user.effect-failure')
);
return of(loginUserFailed());
})
Expand Down
14 changes: 7 additions & 7 deletions comixed-web/src/assets/i18n/en/library.json
Expand Up @@ -4,8 +4,8 @@
"page-title": "Import Comics: {selected, plural, =1{One} other{#}} Of {count, plural, =1{One Comic} other{# Comics}} Selected",
"busy-title": "There Are Comics Importing Now",
"load-comic-files": {
"effect-success-detail": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure-detail": "Failed to find any comic files."
"effect-success": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure": "Failed to find any comic files."
},
"header": {
"cover": "Cover Image",
Expand Down Expand Up @@ -43,13 +43,13 @@
"confirm-start-message": "Are you sure you want to import the {count, plural, =1{one comic} other{# comic files}} into the library?"
},
"send-comic-files": {
"effect-success-detail": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure-detail": "Failed to send comic files for import."
},
"load-comic": {
"effect-failure-detail": "Failed to load the comic."
"effect-success": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure": "Failed to send comic files for import."
},
"comic": {
"load-comic": {
"effect-failure": "Failed to load comic."
},
"undo-changes": {
"title": "Undo Changes",
"message": "Are you sure you want to undo changes to this comic?"
Expand Down
4 changes: 2 additions & 2 deletions comixed-web/src/assets/i18n/en/user.json
@@ -1,13 +1,13 @@
{
"user": {
"load-current-user": {
"effect-failure-detail": "Failed to load the current user."
"effect-failure": "Failed to load the current user."
},
"login-user": {
"page-title": "Please Enter Your User Details",
"email-placeholder": "Your email address",
"password-placeholder": "Your password",
"effect-failure-detail": "Email or password is invalid.",
"effect-failure": "Email or password is invalid.",
"login-tooltip": "Go to the login page...",
"logout-tooltip": "Log out..."
},
Expand Down
14 changes: 7 additions & 7 deletions comixed-web/src/assets/i18n/es/library.json
Expand Up @@ -4,8 +4,8 @@
"page-title": "Import Comics: {selected, plural, =1{One} other{#}} Of {count, plural, =1{One Comic} other{# Comics}} Selected",
"busy-title": "There Are Comics Importing Now",
"load-comic-files": {
"effect-success-detail": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure-detail": "Failed to find any comic files."
"effect-success": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure": "Failed to find any comic files."
},
"header": {
"cover": "Cover Image",
Expand Down Expand Up @@ -43,13 +43,13 @@
"confirm-start-message": "Are you sure you want to import the {count, plural, =1{one comic} other{# comic files}} into the library?"
},
"send-comic-files": {
"effect-success-detail": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure-detail": "Failed to send comic files for import."
},
"load-comic": {
"effect-failure-detail": "Failed to load the comic."
"effect-success": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure": "Failed to send comic files for import."
},
"comic": {
"load-comic": {
"effect-failure": "Failed to load comic."
},
"undo-changes": {
"title": "Undo Changes",
"message": "Are you sure you want to undo changes to this comic?"
Expand Down
4 changes: 2 additions & 2 deletions comixed-web/src/assets/i18n/es/user.json
@@ -1,13 +1,13 @@
{
"user": {
"load-current-user": {
"effect-failure-detail": "Failed to load the current user."
"effect-failure": "Failed to load the current user."
},
"login-user": {
"page-title": "Please Enter Your User Details",
"email-placeholder": "Your email address",
"password-placeholder": "Your password",
"effect-failure-detail": "Email or password is invalid.",
"effect-failure": "Email or password is invalid.",
"login-tooltip": "Go to the login page...",
"logout-tooltip": "Log out..."
},
Expand Down
14 changes: 7 additions & 7 deletions comixed-web/src/assets/i18n/fr/library.json
Expand Up @@ -4,8 +4,8 @@
"page-title": "Import Comics: {selected, plural, =1{One} other{#}} Of {count, plural, =1{One Comic} other{# Comics}} Selected",
"busy-title": "There Are Comics Importing Now",
"load-comic-files": {
"effect-success-detail": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure-detail": "Failed to find any comic files."
"effect-success": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure": "Failed to find any comic files."
},
"header": {
"cover": "Cover Image",
Expand Down Expand Up @@ -43,13 +43,13 @@
"confirm-start-message": "Are you sure you want to import the {count, plural, =1{one comic} other{# comic files}} into the library?"
},
"send-comic-files": {
"effect-success-detail": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure-detail": "Failed to send comic files for import."
},
"load-comic": {
"effect-failure-detail": "Failed to load the comic."
"effect-success": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure": "Failed to send comic files for import."
},
"comic": {
"load-comic": {
"effect-failure": "Failed to load comic."
},
"undo-changes": {
"title": "Undo Changes",
"message": "Are you sure you want to undo changes to this comic?"
Expand Down
4 changes: 2 additions & 2 deletions comixed-web/src/assets/i18n/fr/user.json
@@ -1,13 +1,13 @@
{
"user": {
"load-current-user": {
"effect-failure-detail": "Failed to load the current user."
"effect-failure": "Failed to load the current user."
},
"login-user": {
"page-title": "Please Enter Your User Details",
"email-placeholder": "Your email address",
"password-placeholder": "Your password",
"effect-failure-detail": "Email or password is invalid.",
"effect-failure": "Email or password is invalid.",
"login-tooltip": "Go to the login page...",
"logout-tooltip": "Log out..."
},
Expand Down
14 changes: 7 additions & 7 deletions comixed-web/src/assets/i18n/pt/library.json
Expand Up @@ -4,8 +4,8 @@
"page-title": "Import Comics: {selected, plural, =1{One} other{#}} Of {count, plural, =1{One Comic} other{# Comics}} Selected",
"busy-title": "There Are Comics Importing Now",
"load-comic-files": {
"effect-success-detail": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure-detail": "Failed to find any comic files."
"effect-success": "Found {count, plural, =1{one comic file} other{# comic files}}.",
"effect-failure": "Failed to find any comic files."
},
"header": {
"cover": "Cover Image",
Expand Down Expand Up @@ -43,13 +43,13 @@
"confirm-start-message": "Are you sure you want to import the {count, plural, =1{one comic} other{# comic files}} into the library?"
},
"send-comic-files": {
"effect-success-detail": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure-detail": "Failed to send comic files for import."
},
"load-comic": {
"effect-failure-detail": "Failed to load the comic."
"effect-success": "Submitted {count, plural, =1{one comic file} other{# comic files}} for import.",
"effect-failure": "Failed to send comic files for import."
},
"comic": {
"load-comic": {
"effect-failure": "Failed to load comic."
},
"undo-changes": {
"title": "Undo Changes",
"message": "Are you sure you want to undo changes to this comic?"
Expand Down
4 changes: 2 additions & 2 deletions comixed-web/src/assets/i18n/pt/user.json
@@ -1,13 +1,13 @@
{
"user": {
"load-current-user": {
"effect-failure-detail": "Failed to load the current user."
"effect-failure": "Failed to load the current user."
},
"login-user": {
"page-title": "Please Enter Your User Details",
"email-placeholder": "Your email address",
"password-placeholder": "Your password",
"effect-failure-detail": "Email or password is invalid.",
"effect-failure": "Email or password is invalid.",
"login-tooltip": "Go to the login page...",
"logout-tooltip": "Log out..."
},
Expand Down

0 comments on commit 6d4c533

Please sign in to comment.