[ADF-2699] added localisation for time ago pipe (#3298)

* [ADF-2699] added localisation to the time-ago pipe

* [ADF-2699] added lang to time ago pipe

* [ADF-2699] added localisation for time ago pipe

* [ADF-2699] removed fdescribe

* [ADF-2699] removed comments

* [ADF-2699] removed useless default values
This commit is contained in:
Vito
2018-05-10 19:41:02 +01:00
committed by Eugenio Romano
parent 4c7a63c95a
commit d2cfbeadb5
9 changed files with 49 additions and 125 deletions

View File

@@ -77,7 +77,7 @@
key="archivedAt"
title="DOCUMENT_LIST.COLUMNS.DELETED_ON">
<ng-template let-value="value">
<span title="{{ value | date:'medium' }}">{{ value | adfTimeAgo }}</span>
<span title="{{ value | date:'medium' }}">{{ value | adfTimeAgo: currentLocale }}</span>
</ng-template>
</data-column>

View File

@@ -37,12 +37,17 @@ export class TrashcanComponent {
documentList: DocumentListComponent;
supportedPages = [];
currentLocale;
constructor(private preference: UserPreferencesService) {
this.preference.select(UserPreferenceValues.SupportedPageSizes)
.subscribe((pages) => {
this.supportedPages = pages;
});
this.preference.select(UserPreferenceValues.Locale).subscribe((locale) => {
this.currentLocale = locale;
});
}
refresh() {