From 19c3154130f67ea5acf9a99618d68ad41d8aa7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 14 Nov 2023 17:45:19 +0200 Subject: [PATCH] RED-6435: Removed add to dict character limit --- .../entity-services/dictionary.service.ts | 18 +++++++++--------- apps/red-ui/src/assets/i18n/redact/de.json | 9 --------- apps/red-ui/src/assets/i18n/redact/en.json | 9 --------- apps/red-ui/src/assets/i18n/scm/de.json | 9 --------- apps/red-ui/src/assets/i18n/scm/en.json | 9 --------- 5 files changed, 9 insertions(+), 45 deletions(-) diff --git a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts index bc2bc8438..2cb0fac0a 100644 --- a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts @@ -12,7 +12,6 @@ import { DossierDictionariesMapService } from '@services/entity-services/dossier import { List } from '@iqser/common-ui/lib/utils'; import { IMAGE_CATEGORIES } from '../../modules/file-preview/utils/constants'; -const MIN_WORD_LENGTH = 2; const IMAGE_TYPES = ['image', 'formula', 'ocr']; @Injectable({ @@ -100,20 +99,13 @@ export class DictionaryService extends EntitiesService ) { const entriesToAdd: Array = []; const initialEntriesSet = new Set(initialEntries); - let hasInvalidRows = false; for (let i = 0; i < entries.length; i++) { const entry = entries.at(i); if (!entry.trim() || initialEntriesSet.has(entry)) { continue; } - hasInvalidRows ||= entry.length < MIN_WORD_LENGTH; entriesToAdd.push(entry); } - if (hasInvalidRows) { - this._toaster.error(_('dictionary-overview.error.entries-too-short')); - - throw new Error('Entries too short'); - } const deletedEntries: Array = []; const entriesSet = new Set(entries); for (let i = 0; i < initialEntries.length; i++) { @@ -260,7 +252,15 @@ export class DictionaryService extends EntitiesService } } if (!manualTypeExists) { - dictionaries.push(new Dictionary({ hexColor: FALLBACK_COLOR, type: SuperTypes.ManualRedaction }, true)); + dictionaries.push( + new Dictionary( + { + hexColor: FALLBACK_COLOR, + type: SuperTypes.ManualRedaction, + }, + true, + ), + ); } return dictionaries; diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index be3460264..2818281c8 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -763,7 +763,6 @@ "download": "Download current entries", "error": { "400": "Cannot update dictionary because at least one of the newly added words where recognized as a general term that appear too often in texts.", - "entries-too-short": "Einige Einträge im Wörterbuch unterschreiten die Mindestlänge von 2 Zeichen. Diese sind rot markiert.", "generic": "Es ist ein Fehler aufgetreten ... Das Wörterbuch konnte nicht aktualisiert werden!" }, "revert-changes": "Rückgängig machen", @@ -1787,14 +1786,6 @@ "copyright-claim-text": "Copyright © 2020 - {currentYear} knecon", "copyright-claim-title": "Copyright", "custom-app-title": "Name der Anwendung", - "email-report": "E-Mail-Bericht", - "email": { - "body": { - "analyzed": "Im aktuellen Lizenzzeitraum insgesamt analysierte Seiten: {pages}.", - "licensed": "Lizenzierte Seiten: {pages}." - }, - "title": "Lizenzbericht {licenseCustomer}" - }, "end-user-license-text": "Die Nutzung dieses Produkts unterliegt den Bedingungen der Endbenutzer-Lizenzvereinbarung für den RedactManager, sofern darin nichts anderweitig festgelegt.", "end-user-license-title": "Endbenutzer-Lizenzvereinbarung", "licensing-details": { diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 692805858..86b919565 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -763,7 +763,6 @@ "download": "Download current entries", "error": { "400": "Cannot update dictionary because at least one of the newly added words where recognized as a general term that appear too often in texts.", - "entries-too-short": "Some entries of the dictionary are below the minimum length of 2. These are highlighted with red!", "generic": "Something went wrong... Dictionary update failed!" }, "revert-changes": "Revert", @@ -1787,14 +1786,6 @@ "copyright-claim-text": "Copyright © 2020 - {currentYear} knecon", "copyright-claim-title": "Copyright Claim", "custom-app-title": "Custom Application Title", - "email-report": "Email Report", - "email": { - "body": { - "analyzed": "Total Analyzed Pages in current license period: {pages}.", - "licensed": "Licensed Pages: {pages}." - }, - "title": "License Report {licenseCustomer}" - }, "end-user-license-text": "The use of this product is subject to the terms of the RedactManager End User License Agreement, unless otherwise specified therein.", "end-user-license-title": "End User License Agreement", "licensing-details": { diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index e3b4083ef..c45629178 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -763,7 +763,6 @@ "download": "", "error": { "400": "", - "entries-too-short": "Einige Einträge im Wörterbuch unterschreiten die Mindestlänge von 2 Zeichen. Diese sind rot markiert.", "generic": "Es ist ein Fehler aufgetreten ... Das Wörterbuch konnte nicht aktualisiert werden!" }, "revert-changes": "Rückgängig machen", @@ -1787,14 +1786,6 @@ "copyright-claim-text": "Copyright © 2020 - {currentYear} knecon AG (powered by IQSER)", "copyright-claim-title": "Copyright", "custom-app-title": "Name der Anwendung", - "email-report": "E-Mail-Bericht", - "email": { - "body": { - "analyzed": "Im aktuellen Lizenzzeitraum insgesamt analysierte Seiten: {pages}.", - "licensed": "Lizenzierte Seiten: {pages}." - }, - "title": "Lizenzbericht {licenseCustomer}" - }, "end-user-license-text": "Die Nutzung dieses Produkts unterliegt den Bedingungen der Endbenutzer-Lizenzvereinbarung für den RedactManager, sofern darin nichts anderweitig festgelegt.", "end-user-license-title": "Endbenutzer-Lizenzvereinbarung", "licensing-details": { diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 6c35faf60..98e79afe1 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -763,7 +763,6 @@ "download": "Download current entries", "error": { "400": "Cannot update dictionary because at least one of the newly added words where recognized as a general term that appear too often in texts.", - "entries-too-short": "Some entries of the dictionary are below the minimum length of 2. These are highlighted with red!", "generic": "Something went wrong... Dictionary update failed!" }, "revert-changes": "Revert", @@ -1787,14 +1786,6 @@ "copyright-claim-text": "Copyright © 2020 - {currentYear} knecon", "copyright-claim-title": "Copyright Claim", "custom-app-title": "Custom Application Title", - "email-report": "Email Report", - "email": { - "body": { - "analyzed": "Total Analyzed Pages in current license period: {pages}.", - "licensed": "Licensed Pages: {pages}." - }, - "title": "License Report {licenseCustomer}" - }, "end-user-license-text": "The use of this product is subject to the terms of the DocuMine End User License Agreement, unless otherwise specified therein.", "end-user-license-title": "End User License Agreement", "licensing-details": {