Skip to content

Commit

Permalink
translations: fix missing translations
Browse files Browse the repository at this point in the history
- Solves rero/rero-ils#2276
- Solves rero/rero-ils#2752

Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>
  • Loading branch information
PascalRepond committed Apr 26, 2022
1 parent acb65f2 commit 707013d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
Acquisition status
</div>
<div class="col-sm-9">
{{ holding.metadata.acquisition_status }}
{{ holding.metadata.acquisition_status.display_text | getTranslatedLabel : language }}
</div>
</ng-container>

Expand All @@ -76,7 +76,7 @@
Acquisition method
</div>
<div class="col-sm-9">
{{ holding.metadata.acquisition_method }}
{{ holding.metadata.acquisition_method.display_text | getTranslatedLabel : language }}
</div>
</ng-container>

Expand All @@ -96,7 +96,7 @@
General retention policy
</div>
<div class="col-sm-9">
{{ holding.metadata.general_retention_policy }}
{{ holding.metadata.general_retention_policy.display_text | getTranslatedLabel : language }}
</div>
</ng-container>

Expand All @@ -106,7 +106,7 @@
Completness
</div>
<div class="col-sm-9">
{{ holding.metadata.completeness }}
{{ holding.metadata.completeness.display_text | getTranslatedLabel : language }}
</div>
</ng-container>

Expand All @@ -116,7 +116,7 @@
Composite copy report
</div>
<div class="col-sm-9">
{{ holding.metadata.composite_copy_report }}
{{ holding.metadata.composite_copy_report.display_text | getTranslatedLabel : language }}
</div>
</ng-container>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

import { Component, Input } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';

@Component({
selector: 'admin-holding-detail',
Expand All @@ -28,4 +29,21 @@ export class HoldingDetailComponent {

/** Context */
@Input() context: 'document'|'holdings' = 'document';
}


// CONSTRUCTOR & HOOKS ==============================================================
/**
* Constructor
* @param _translateService - TranslateService
*/
constructor(
protected _translateService: TranslateService
) { }


// GETTER & SETTER ==========================================================
/** Current interface language */
get language() {
return this._translateService.currentLang;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</ng-container>
<ng-container *ngVar="itemRequestCounter as pendingRequest">
<span class="pl-3" *ngIf="pendingRequest > 0">
({{ pendingRequest }} {{ pendingRequest | i18nPlural: {'=1': 'request', 'other': 'requests'} }})
({{ pendingRequest }} {{ pendingRequest | i18nPlural: {'=1': 'request', 'other': 'requests'} | translate }})
</span>
</ng-container>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
}"></i>
{{ item.metadata.status | translate }}
<ng-container *ngVar="itemRequestCounter as pendingRequest">
<div class="pl-3" *ngIf="pendingRequest > 0">
({{ pendingRequest }} {{ pendingRequest | i18nPlural: {'=1': 'request', 'other': 'requests'} }})
</div>
<span class="pl-3" *ngIf="pendingRequest > 0">
({{ pendingRequest }} {{ pendingRequest | i18nPlural: {'=1': 'request', 'other': 'requests'} | translate }})
</span>
</ng-container>
</div>
<div class="col-sm-3" name="issue">{{ item.metadata.enumerationAndChronology }}</div>
Expand Down

0 comments on commit 707013d

Please sign in to comment.