From 43b04c7700f22101d8c0b0bc18f3c4e69100e975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Mon, 9 Aug 2021 17:26:25 +0300 Subject: [PATCH] RED-1905: ocr pages license & date pipe translation fixes --- .../license-information-screen.component.html | 5 ++ .../comments/comments.component.html | 9 ++-- .../comments/comments.component.scss | 4 -- .../src/app/modules/shared/pipes/date.pipe.ts | 46 +++++++++++-------- apps/red-ui/src/assets/i18n/en.json | 35 +++++++------- .../src/lib/model/licenseReport.ts | 2 + 6 files changed, 54 insertions(+), 47 deletions(-) diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html index 188ae38f1..727db13cb 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html @@ -71,6 +71,11 @@
{{ currentInfo.numberOfAnalyzedPages }}
+
+
+
{{ currentInfo.numberOfOcrPages }}
+
+
diff --git a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html index c6af5832f..e1431f031 100644 --- a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html @@ -1,11 +1,8 @@
-
-
{{ getOwnerName(comment) }}
-
- {{ getOwnerName(comment) }} - {{ comment.date | date: 'commentDate' }} -
+
+ {{ getOwnerName(comment) }} + {{ comment.date | date: 'commentDate' }}
= thisMonth - 3) + const isShortMonthFormat = day < thisDay - 1 && (year === thisYear || month >= thisMonth - 3); if (isShortMonthFormat) { - const translatedMonth = this._translateService.instant(`months.${MONTH_NAMES[month]}`); + const translatedMonth = this._translateService.instant(MONTH_NAMES[month]); return `${day} ${translatedMonth}`; } - const isShortMonthYearFormat = (year === thisYear - 1) && (month < thisMonth - 3) + const isShortMonthYearFormat = year === thisYear - 1 && month < thisMonth - 3; if (isShortMonthYearFormat) { - const translatedMonth = this._translateService.instant(`months.${MONTH_NAMES[month]}`); + const translatedMonth = this._translateService.instant(MONTH_NAMES[month]); return `${translatedMonth} ${year}`; } @@ -98,11 +98,17 @@ export class DatePipe extends BaseDatePipe implements PipeTransform { private _getExactCommentDate(item: string) { const date = moment(item); const day = date.date(); - const month = this._translateService.instant(`months.${MONTH_NAMES[date.month()]}`); + const month = this._translateService.instant(MONTH_NAMES[date.month()]); const year = date.year(); const hour = date.hour(); const minute = date.minute(); - return this._translateService.instant('exact-comment-date', {day, month, year, hour, minute}); + return this._translateService.instant('exact-comment-date', { + day, + month, + year, + hour, + minute + }); } } diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index befe97755..371e05607 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -801,6 +801,7 @@ "side-nav-title": "Configurations", "unsaved-changes": "You have unsaved changes. Save or revert before changing the tab." }, + "exact-comment-date": "{day} {month} {year} at {hour}:{minute}", "file-attribute-types": { "date": "Date", "number": "Number", @@ -1078,6 +1079,7 @@ "licensed-to": "Licensed to", "licensing-details": "Licensing Details", "licensing-period": "Licensing Period", + "ocr-analyzed-pages": "OCR Analyzed Pages", "total-analyzed": "Total Analyzed Pages Since {date}", "unlicensed-analyzed": "Unlicensed Analyzed Pages", "usage-details": "Usage Details" @@ -1108,6 +1110,20 @@ } } }, + "months": { + "apr": "Apr.", + "aug": "Aug.", + "dec": "Dec.", + "feb": "Feb.", + "jan": "Jan.", + "jul": "Jul.", + "jun": "Jun.", + "mar": "Mar.", + "may": "May", + "nov": "Nov.", + "oct": "Oct.", + "sep": "Sep." + }, "notifications": { "mark-read": "Mark as read", "mark-unread": "Mark as unread", @@ -1250,22 +1266,6 @@ "less-than-an-hour": "< 1 hour", "no-time-left": "Time to restore already passed" }, - "yesterday": "Yesterday", - "exact-comment-date": "{day} {month} {year} at {hour}:{minute}", - "months": { - "jan": "Jan.", - "feb": "Feb.", - "mar": "Mar.", - "apr": "Apr.", - "may": "May", - "jun": "Jun.", - "jul": "Jul.", - "aug": "Aug.", - "sep": "Sep.", - "oct": "Oct.", - "nov": "Nov.", - "dec": "Dec." - }, "top-bar": { "navigation-items": { "back": "Back", @@ -1389,5 +1389,6 @@ "text-placeholder": "Enter text" }, "title": "Watermark" - } + }, + "yesterday": "Yesterday" } diff --git a/libs/red-ui-http/src/lib/model/licenseReport.ts b/libs/red-ui-http/src/lib/model/licenseReport.ts index 01a188361..4a483e07e 100644 --- a/libs/red-ui-http/src/lib/model/licenseReport.ts +++ b/libs/red-ui-http/src/lib/model/licenseReport.ts @@ -19,6 +19,8 @@ export interface LicenseReport { numberOfAnalyzedFiles?: number; numberOfAnalyzedPages?: number; numberOfDossiers?: number; + numberOfOcrFiles?: number; + numberOfOcrPages?: number; offset?: number; requestId?: string; startDate?: Date;