RED-8692 - Automatic code validation in the rule editor

This commit is contained in:
Valentin Mihai 2024-03-22 15:56:35 +02:00
parent f534c28b7e
commit d5215656fb
12 changed files with 293 additions and 203 deletions

View File

@ -9,7 +9,14 @@
<div (click)="goToErrors()" *ngIf="numberOfErrors()" class="errors">
<span>
<mat-icon [svgIcon]="'iqser:alert-circle'" class="icon"></mat-icon>
<span [translateParams]="{ errors: numberOfErrors() }" [translate]="translations[this.type]['errors-found']"></span>
<div class="found-errors">
<span [translateParams]="{ errors: numberOfErrors() }" [translate]="translations[this.type]['errors-found']"></span>
<span
[translateParams]="{ warnings: numberOfWarnings() }"
[translate]="translations[this.type]['warnings-found']"
class="warning"
></span>
</div>
</span>
<mat-icon [svgIcon]="'iqser:expand'" class="icon face-up"></mat-icon>
</div>

View File

@ -40,18 +40,30 @@ ngx-monaco-editor {
.errors {
cursor: pointer;
align-items: flex-start;
.icon {
scale: 0.7;
}
.found-errors {
margin-top: 4px;
display: flex;
flex-direction: column;
gap: 5px;
}
:first-child {
display: flex;
align-items: center;
align-items: flex-start;
gap: 0.5em;
font-weight: 500;
/* TODO: Update this to --iqser-error when added */
color: #dd4d50;
color: var(--iqser-red-1);
.warning {
color: var(--iqser-warn);
}
}
.face-up {

View File

@ -17,6 +17,13 @@ interface SyntaxError {
line: number;
column: number;
message: string;
warning: boolean;
}
interface UploadResponse {
blacklistErrorMessages: SyntaxError[];
syntaxErrorMessages: SyntaxError[];
deprecatedWarnings: SyntaxError[];
}
const RULE_VALIDATION_TIMEOUT = 2000;
@ -41,11 +48,13 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate {
currentLines: string[] = [];
isLeaving = false;
readonly type: IRules['ruleFileType'];
private _codeEditor: ICodeEditor;
private _decorations: string[] = [];
readonly #errorGlyphs = signal<string[]>([]);
readonly numberOfErrors = computed(() => this.#errorGlyphs().length);
readonly numberOfErrors = computed(() => this.#errors().filter(e => !e.warning).length);
readonly numberOfWarnings = computed(() => this.#errors().filter(e => e.warning).length);
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
#codeEditor: ICodeEditor;
#decorations: string[] = [];
#errors = signal<SyntaxError[]>([]);
#ruleValidationTimeout: number = null;
set isLeavingPage(isLeaving: boolean) {
@ -65,7 +74,7 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate {
this.currentLines = $event.split('\n');
this.codeEditorTextChanged();
this.validateRules();
this._closeProblemsView();
this.#closeProblemsView();
}
constructor(
@ -81,84 +90,97 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate {
}
async ngOnInit() {
await this._initialize();
await this.#initialize();
}
validateRules() {
if (!this.changed) {
this.#removeErrorMarkers();
}
if (this.#ruleValidationTimeout) {
clearTimeout(this.#ruleValidationTimeout);
}
this.#ruleValidationTimeout = window.setTimeout(async () => {
await this.#uploadRules(true);
if (this.changed) {
await this.#uploadRules(true);
}
}, RULE_VALIDATION_TIMEOUT);
}
async onCodeEditorInit(editor: ICodeEditor): Promise<void> {
this._codeEditor = editor;
this.#codeEditor = editor;
for (const theme of this._editorThemeService.themes) {
(window as any).monaco.editor.defineTheme(theme, this._editorThemeService.configurations[theme]);
}
(window as any).monaco.editor.setTheme(this._editorThemeService.getTheme(true));
await this._configureSyntaxHighlighting();
await this.#configureSyntaxHighlighting();
this._changeDetectorRef.detectChanges();
}
@Debounce()
codeEditorTextChanged() {
const newDecorations = this.currentLines.filter(entry => this._isNew(entry)).map(entry => this._makeDecorationFor(entry));
this._decorations = this._codeEditor.deltaDecorations(this._decorations, newDecorations);
const newDecorations = this.currentLines.filter(entry => this.#isNew(entry)).map(entry => this.#makeDecorationFor(entry));
this.#decorations = this.#codeEditor.deltaDecorations(this.#decorations, newDecorations);
}
goToErrors() {
this._codeEditor.trigger(null, 'editor.action.marker.next', null);
this.#codeEditor.trigger(null, 'editor.action.marker.next', null);
}
async save(): Promise<void> {
this._loadingService.start();
this._removeErrorMarkers();
this.#removeErrorMarkers();
await this.#uploadRules();
}
async #uploadRules(dryRun = false) {
return firstValueFrom(
this._rulesService.uploadRules({
rules: this._getValue(),
rules: this.#getValue(),
dossierTemplateId: this.#dossierTemplateId,
ruleFileType: this.type,
dryRun,
}),
).then(
async response => {
if (dryRun) {
console.log('RESPONSE: ', response);
return;
async (response: UploadResponse) => {
const errors = this.#mapErrors(response);
this.#drawErrorMarkers(errors);
if (!dryRun) {
await this.#initialize();
this._toaster.success(rulesScreenTranslations[this.type]['success.generic']);
}
await this._initialize();
this._toaster.success(rulesScreenTranslations[this.type]['success-generic']);
},
error => {
const errors = error.error as SyntaxError[] | undefined;
this._drawErrorMarkers(errors);
const errors = this.#mapErrors(error.error);
this.#drawErrorMarkers(errors);
this._loadingService.stop();
this._toaster.success(rulesScreenTranslations[this.type]['error-generic']);
this._toaster.error(rulesScreenTranslations[this.type]['error.generic']);
},
);
}
revert(): void {
this.currentLines = this.initialLines;
this._decorations = this._codeEditor?.deltaDecorations(this._decorations, []) || [];
this._removeErrorMarkers();
this.#decorations = this.#codeEditor?.deltaDecorations(this.#decorations, []) || [];
this.#removeErrorMarkers();
this._changeDetectorRef.detectChanges();
this._loadingService.stop();
}
private _getValue(): string {
this._codeEditor.getModel().setEOL(monaco.editor.EndOfLineSequence.LF);
return this._codeEditor.getModel().getValue();
#mapErrors(response: UploadResponse) {
return [
...response.blacklistErrorMessages,
...response.syntaxErrorMessages,
...response.deprecatedWarnings.map(w => ({ ...w, warning: true })),
];
}
private async _configureSyntaxHighlighting() {
#getValue(): string {
this.#codeEditor.getModel().setEOL(monaco.editor.EndOfLineSequence.LF);
return this.#codeEditor.getModel().getValue();
}
async #configureSyntaxHighlighting() {
const languages = (window as any).monaco.languages.getLanguages();
const javaLang = languages.find(l => l.id === 'java');
const { language: config } = await javaLang.loader();
@ -191,11 +213,11 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate {
});
}
private _isNew(entry: string): boolean {
#isNew(entry: string): boolean {
return this.initialLines.indexOf(entry) < 0 && entry?.trim().length > 0;
}
private _makeDecorationFor(entry: string): IModelDeltaDecoration {
#makeDecorationFor(entry: string): IModelDeltaDecoration {
const line = this.currentLines.indexOf(entry) + 1;
return {
@ -204,8 +226,8 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate {
} as IModelDeltaDecoration;
}
private _drawErrorMarkers(errors: SyntaxError[] | undefined) {
const model = this._codeEditor?.getModel();
#drawErrorMarkers(errors: SyntaxError[] | undefined) {
const model = this.#codeEditor?.getModel();
if (!model || !errors?.length) {
return;
}
@ -217,7 +239,7 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate {
const endColumn = model.getLineLength(e.line) + 1;
markers.push({
message: e.message,
severity: monaco.MarkerSeverity.Error,
severity: e.warning ? monaco.MarkerSeverity.Warning : monaco.MarkerSeverity.Error,
startLineNumber: e.line,
startColumn: e.column,
endLineNumber: e.line,
@ -226,29 +248,31 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate {
glyphs.push({
range: new monaco.Range(e.line, e.column, e.line, endColumn),
options: {
glyphMarginClassName: 'error-glyph-margin',
glyphMarginClassName: `glyph-margin ${e.warning ? 'warning' : 'error'}`,
},
});
});
this.#errorGlyphs.set(this._codeEditor.deltaDecorations(this.#errorGlyphs(), glyphs));
this.#errors.set(errors);
this.#errorGlyphs.set(this.#codeEditor.deltaDecorations(this.#errorGlyphs(), glyphs));
(window as any).monaco.editor.setModelMarkers(model, model.id, markers);
}
private _closeProblemsView(): void {
this._codeEditor.trigger(null, 'closeMarkersNavigation', null);
#closeProblemsView(): void {
this.#codeEditor.trigger(null, 'closeMarkersNavigation', null);
}
private _removeErrorMarkers(): void {
const model = this._codeEditor?.getModel();
#removeErrorMarkers(): void {
const model = this.#codeEditor?.getModel();
if (!model) {
return;
}
(window as any).monaco.editor.setModelMarkers(model, model.id, []);
this.#errorGlyphs.set(this._codeEditor.deltaDecorations(this.#errorGlyphs(), []) || []);
this._closeProblemsView();
this.#errors.set([]);
this.#errorGlyphs.set(this.#codeEditor.deltaDecorations(this.#errorGlyphs(), []) || []);
this.#closeProblemsView();
}
private async _initialize() {
async #initialize() {
this._loadingService.start();
await firstValueFrom(this._rulesService.download(this.#dossierTemplateId, this.type)).then(
rules => {

View File

@ -7,6 +7,7 @@ export const rulesScreenTranslations: Record<'ENTITY' | 'COMPONENT', Record<stri
title: _('entity-rules-screen.title'),
'warning-text': _('entity-rules-screen.warning-text'),
'errors-found': _('entity-rules-screen.errors-found'),
'warnings-found': _('entity-rules-screen.warnings-found'),
'save-changes': _('entity-rules-screen.save-changes'),
'revert-changes': _('entity-rules-screen.revert-changes'),
},
@ -16,6 +17,7 @@ export const rulesScreenTranslations: Record<'ENTITY' | 'COMPONENT', Record<stri
title: _('component-rules-screen.title'),
'warning-text': _('component-rules-screen.warning-text'),
'errors-found': _('component-rules-screen.errors-found'),
'warnings-found': _('entity-rules-screen.warnings-found'),
'save-changes': _('component-rules-screen.save-changes'),
'revert-changes': _('component-rules-screen.revert-changes'),
},

View File

@ -15,6 +15,8 @@ export class EditorThemeService {
rules: [],
colors: {
'editor.lineHighlightBackground': '#f4f5f7',
'editorWarning.foreground': '#fdbd00',
'editorError.foreground': '#dd4d50',
},
},
'redaction-disabled': {
@ -27,6 +29,8 @@ export class EditorThemeService {
'editor.lineHighlightBackground': '#f4f5f7',
'editorLineNumber.foreground': '#9398a0',
'editorActiveLineNumber.foreground': '#9398a0',
'editorWarning.foreground': '#fdbd00',
'editorError.foreground': '#dd4d50',
},
},
'redaction-dark': {
@ -36,6 +40,8 @@ export class EditorThemeService {
colors: {
'editor.background': '#151a21',
'editor.lineHighlightBackground': '#283241',
'editorWarning.foreground': '#fdbd00',
'editorError.foreground': '#dd4d50',
},
},
'redaction-disabled-dark': {
@ -48,6 +54,8 @@ export class EditorThemeService {
'editor.lineHighlightBackground': '#283241',
'editorLineNumber.foreground': '#9398a0',
'editorActiveLineNumber.foreground': '#9398a0',
'editorWarning.foreground': '#fdbd00',
'editorError.foreground': '#dd4d50',
},
},
};

View File

@ -255,9 +255,6 @@
"watermarks": "Watermarks"
},
"analysis-disabled": "",
"annotation": {
"pending": "(Pending analysis)"
},
"annotation-actions": {
"accept-recommendation": {
"label": "Empfehlung annehmen"
@ -316,14 +313,14 @@
"error": "Rekategorisierung des Bildes gescheitert: {error}",
"success": "Bild wurde einer neuen Kategorie zugeordnet."
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"remove-hint": {
"error": "Failed to remove hint: {error}",
"success": "Hint removed!"
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "erfolgreich Rückgängig gemacht"
@ -336,15 +333,15 @@
"remove-highlights": {
"label": "Remove selected earmarks"
},
"resize": {
"label": "Größe ändern"
},
"resize-accept": {
"label": "Größe speichern"
},
"resize-cancel": {
"label": "Größenänderung abbrechen"
},
"resize": {
"label": "Größe ändern"
},
"see-references": {
"label": "See references"
},
@ -377,6 +374,9 @@
"skipped": "Übersprungen",
"text-highlight": "Earmark"
},
"annotation": {
"pending": "(Pending analysis)"
},
"archived-dossiers-listing": {
"no-data": {
"title": "No archived dossiers."
@ -582,18 +582,14 @@
"warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!"
},
"confirmation-dialog": {
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-file-without-analysis": {
"confirmationText": "Approve without analysis",
"denyText": "Cancel",
"question": "Analysis required to detect new redactions.",
"title": "Warning!"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-multiple-files-without-analysis": {
@ -602,6 +598,10 @@
"question": "Analysis required to detect new redactions for at least one file.",
"title": "Warning"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"title": "Warnung!"
},
"assign-file-to-me": {
"question": {
"multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?",
@ -946,13 +946,13 @@
"recent": "Neu ({hours} h)",
"unassigned": "Niemandem zugewiesen"
},
"reanalyse": {
"action": "Datei analysieren"
},
"reanalyse-dossier": {
"error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.",
"success": "Dateien für Reanalyse vorgesehen."
},
"reanalyse": {
"action": "Datei analysieren"
},
"start-auto-analysis": "Enable auto-analysis",
"stop-auto-analysis": "Stop auto-analysis",
"table-col-names": {
@ -1021,14 +1021,6 @@
"total-documents": "Anzahl der Dokumente",
"total-people": "<strong>{count}</strong> {count, plural, one{user} other {users}}"
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-templates-listing": {
"action": {
"clone": "Clone template",
@ -1064,6 +1056,14 @@
"title": "{length} {length, plural, one{Dossier-Vorlage} other{Dossier-Vorlagen}}"
}
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-watermark-selector": {
"heading": "Watermarks on documents",
"no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.",
@ -1249,15 +1249,6 @@
"title": "{length} {length, plural, one{Wörterbuch} other{Wörterbücher}}"
}
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"entity-rules-screen": {
"error": {
"generic": "Something went wrong... Entity rules update failed!"
@ -1269,7 +1260,17 @@
"generic": "Entity rules updated!"
},
"title": "Entity rule editor",
"warning-text": "Warning: experimental feature!"
"warning-text": "Warning: experimental feature!",
"warnings-found": ""
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"error": {
"deleted-entity": {
@ -1277,13 +1278,13 @@
"action": "Zurück zur Übersicht",
"label": "Dieses Dossier wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
},
"file-dossier": {
"action": "Zurück zur Übersicht",
"label": "Das Dossier dieser Datei wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
}
},
"file-preview": {
@ -1301,12 +1302,6 @@
},
"exact-date": "{day} {month} {year} um {hour}:{minute} Uhr",
"file": "Datei",
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attribute-encoding-types": {
"ascii": "ASCII",
"iso": "ISO-8859-1",
@ -1317,6 +1312,12 @@
"number": "Nummer",
"text": "Freier Text"
},
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attributes-configurations": {
"cancel": "Cancel",
"form": {
@ -1532,15 +1533,6 @@
"csv": "File attributes were imported successfully from uploaded CSV file."
}
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filter-menu": {
"filter-options": "Filteroptionen",
"filter-types": "Filter",
@ -1550,6 +1542,15 @@
"unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten",
"with-comments": "Nur Anmerkungen mit Kommentaren"
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filters": {
"assigned-people": "Beauftragt",
"documents-status": "Documents state",
@ -1820,13 +1821,6 @@
"user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!",
"user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"notifications-screen": {
"category": {
"email-notifications": "E-Mail Benachrichtigungen",
@ -1840,6 +1834,7 @@
"dossier": "Dossierbezogene Benachrichtigungen",
"other": "Andere Benachrichtigungen"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"options": {
"ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin",
"ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin",
@ -1857,7 +1852,6 @@
"USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde",
"USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"schedule": {
"daily": "Tägliche Zusammenfassung",
"instant": "Sofortig",
@ -1865,6 +1859,13 @@
},
"title": "Benachrichtigungseinstellungen"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"ocr": {
"confirmation-dialog": {
"cancel": "Cancel",
@ -1956,16 +1957,16 @@
"warnings-subtitle": "Do not show again options",
"warnings-title": "Prompts and dialogs settings"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"processing-status": {
"ocr": "OCR",
"pending": "Pending",
"processed": "processed",
"processing": "Processing"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"readonly": "Lesemodus",
"readonly-archived": "Read only (archived)",
"redact-text": {
@ -2192,12 +2193,6 @@
"red-user-admin": "Benutzer-Admin",
"regular": "Regulär"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"search-screen": {
"cols": {
"assignee": "Bevollmächtigter",
@ -2221,6 +2216,12 @@
"no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.",
"table-header": "{length} {length, plural, one{Suchergebnis} other{Suchergebnisse}}"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"seconds": "seconds",
"size": "Size",
"smtp-auth-config": {
@ -2472,4 +2473,4 @@
}
},
"yesterday": "Gestern"
}
}

View File

@ -1260,7 +1260,8 @@
"generic": "Entity rules updated!"
},
"title": "Entity rule editor",
"warning-text": "Warning: experimental feature!"
"warning-text": "Warning: experimental feature!",
"warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules"
},
"entity": {
"info": {
@ -2472,4 +2473,4 @@
}
},
"yesterday": "Yesterday"
}
}

View File

@ -255,9 +255,6 @@
"watermarks": "Watermarks"
},
"analysis-disabled": "Analysis disabled",
"annotation": {
"pending": "(Pending analysis)"
},
"annotation-actions": {
"accept-recommendation": {
"label": "Empfehlung annehmen"
@ -316,14 +313,14 @@
"error": "Rekategorisierung des Bildes gescheitert: {error}",
"success": "Bild wurde einer neuen Kategorie zugeordnet."
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"remove-hint": {
"error": "Failed to remove hint: {error}",
"success": "Hint removed!"
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "erfolgreich Rückgängig gemacht"
@ -336,15 +333,15 @@
"remove-highlights": {
"label": "Remove selected earmarks"
},
"resize": {
"label": "Größe ändern"
},
"resize-accept": {
"label": "Größe speichern"
},
"resize-cancel": {
"label": "Größenänderung abbrechen"
},
"resize": {
"label": "Größe ändern"
},
"see-references": {
"label": "See references"
},
@ -377,6 +374,9 @@
"skipped": "Übersprungen",
"text-highlight": "Earmark"
},
"annotation": {
"pending": "(Pending analysis)"
},
"archived-dossiers-listing": {
"no-data": {
"title": "No archived dossiers."
@ -582,18 +582,14 @@
"warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!"
},
"confirmation-dialog": {
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-file-without-analysis": {
"confirmationText": "Approve without analysis",
"denyText": "Cancel",
"question": "Analysis required to detect new components.",
"title": "Warning!"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-multiple-files-without-analysis": {
@ -602,6 +598,10 @@
"question": "Analysis required to detect new components for at least one file.",
"title": "Warning"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"title": "Warnung!"
},
"assign-file-to-me": {
"question": {
"multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?",
@ -946,13 +946,13 @@
"recent": "Neu ({hours} h)",
"unassigned": "Niemandem zugewiesen"
},
"reanalyse": {
"action": "Datei analysieren"
},
"reanalyse-dossier": {
"error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.",
"success": "Dateien für Reanalyse vorgesehen."
},
"reanalyse": {
"action": "Datei analysieren"
},
"start-auto-analysis": "Enable auto-analysis",
"stop-auto-analysis": "Stop auto-analysis",
"table-col-names": {
@ -1021,14 +1021,6 @@
"total-documents": "Anzahl der Dokumente",
"total-people": "<strong>{count}</strong> {count, plural, one{user} other {users}}"
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-templates-listing": {
"action": {
"clone": "Clone template",
@ -1064,6 +1056,14 @@
"title": "{length} dossier {length, plural, one{template} other{templates}}"
}
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-watermark-selector": {
"heading": "Watermarks on documents",
"no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.",
@ -1249,15 +1249,6 @@
"title": "{length} {length, plural, one{entity} other{entities}}"
}
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"entity-rules-screen": {
"error": {
"generic": "Something went wrong... Entity rules update failed!"
@ -1269,7 +1260,17 @@
"generic": "Entity rules updated!"
},
"title": "Entity rule editor",
"warning-text": "Warning: experimental feature!"
"warning-text": "Warning: experimental feature!",
"warnings-found": ""
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"error": {
"deleted-entity": {
@ -1277,13 +1278,13 @@
"action": "Zurück zur Übersicht",
"label": "Dieses Dossier wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
},
"file-dossier": {
"action": "Zurück zur Übersicht",
"label": "Das Dossier dieser Datei wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
}
},
"file-preview": {
@ -1301,12 +1302,6 @@
},
"exact-date": "{day} {month} {year} um {hour}:{minute} Uhr",
"file": "Datei",
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attribute-encoding-types": {
"ascii": "ASCII",
"iso": "ISO-8859-1",
@ -1317,6 +1312,12 @@
"number": "Nummer",
"text": "Freier Text"
},
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attributes-configurations": {
"cancel": "Cancel",
"form": {
@ -1532,15 +1533,6 @@
"csv": "File attributes were imported successfully from uploaded CSV file."
}
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filter-menu": {
"filter-options": "Filteroptionen",
"filter-types": "Filter",
@ -1550,6 +1542,15 @@
"unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten",
"with-comments": "Nur Anmerkungen mit Kommentaren"
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filters": {
"assigned-people": "Beauftragt",
"documents-status": "Documents state",
@ -1820,13 +1821,6 @@
"user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!",
"user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"notifications-screen": {
"category": {
"email-notifications": "E-Mail Benachrichtigungen",
@ -1840,6 +1834,7 @@
"dossier": "Dossierbezogene Benachrichtigungen",
"other": "Andere Benachrichtigungen"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"options": {
"ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin",
"ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin",
@ -1857,7 +1852,6 @@
"USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde",
"USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"schedule": {
"daily": "Tägliche Zusammenfassung",
"instant": "Sofortig",
@ -1865,6 +1859,13 @@
},
"title": "Benachrichtigungseinstellungen"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"ocr": {
"confirmation-dialog": {
"cancel": "Cancel",
@ -1956,16 +1957,16 @@
"warnings-subtitle": "Do not show again options",
"warnings-title": "Prompts and dialogs settings"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"processing-status": {
"ocr": "OCR",
"pending": "Pending",
"processed": "Processed",
"processing": "Processing"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"readonly": "Lesemodus",
"readonly-archived": "Read only (archived)",
"redact-text": {
@ -2192,12 +2193,6 @@
"red-user-admin": "Benutzer-Admin",
"regular": "Regulär"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"search-screen": {
"cols": {
"assignee": "Bevollmächtigter",
@ -2221,6 +2216,12 @@
"no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.",
"table-header": "{length} search {length, plural, one{result} other{results}}"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"seconds": "seconds",
"size": "Size",
"smtp-auth-config": {
@ -2472,4 +2473,4 @@
}
},
"yesterday": "Gestern"
}
}

View File

@ -1260,7 +1260,8 @@
"generic": "Entity rules updated!"
},
"title": "Entity rule editor",
"warning-text": "Warning: experimental feature!"
"warning-text": "Warning: experimental feature!",
"warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules"
},
"entity": {
"info": {
@ -2472,4 +2473,4 @@
}
},
"yesterday": "Yesterday"
}
}

View File

@ -3,8 +3,8 @@
<title>warning</title>
<g id="User-Management" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="01.2-Bulk-Actions" transform="translate(-876.000000, -468.000000)">
<rect fill="#FFFFFF" x="0" y="0" width="1440" height="900"></rect>
<polygon id="Rectangle" fill="#FFFFFF" points="201 449 1087 449 1087 499 201 499"></polygon>
<rect fill="none" x="0" y="0" width="1440" height="900"></rect>
<polygon id="Rectangle" fill="none" points="201 449 1087 449 1087 499 201 499"></polygon>
<g id="Group-19" transform="translate(876.000000, 171.000000)" fill="#DD4D50">
<path d="M6.00002308,297 C9.30875217,297 12.0000462,299.690683 12.0000462,302.999359 C12.0000462,306.309082 9.30898674,309 6.00002308,309 C2.69105942,309 2.27373675e-13,306.309082 2.27373675e-13,302.999359 C2.27373675e-13,299.690683 2.69129399,297 6.00002308,297 Z M6.00002308,298.846154 C3.71080282,298.846154 1.84615385,300.71038 1.84615385,302.999359 C1.84615385,305.289458 3.71064029,307.153846 6.00002308,307.153846 C8.28940586,307.153846 10.1538923,305.289458 10.1538923,302.999359 C10.1538923,300.71038 8.28924333,298.846154 6.00002308,298.846154 Z M6.89921108,303.700197 L6.89921108,305.678219 L5.10100111,305.678219 L5.10100111,303.700197 L6.89921108,303.700197 Z M6.89921108,300.103957 L6.89921108,302.801137 L5.10100111,302.801137 L5.10100111,300.103957 L6.89921108,300.103957 Z" id="Combined-Shape"></path>
</g>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
<title>warning</title>
<g id="User-Management" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="01.2-Bulk-Actions" transform="translate(-876.000000, -468.000000)">
<rect fill="none" x="0" y="0" width="1440" height="900"></rect>
<polygon id="Rectangle" fill="none" points="201 449 1087 449 1087 499 201 499"></polygon>
<g id="Group-19" transform="translate(876.000000, 171.000000)" fill="#fdbd00">
<path d="M6.00002308,297 C9.30875217,297 12.0000462,299.690683 12.0000462,302.999359 C12.0000462,306.309082 9.30898674,309 6.00002308,309 C2.69105942,309 2.27373675e-13,306.309082 2.27373675e-13,302.999359 C2.27373675e-13,299.690683 2.69129399,297 6.00002308,297 Z M6.00002308,298.846154 C3.71080282,298.846154 1.84615385,300.71038 1.84615385,302.999359 C1.84615385,305.289458 3.71064029,307.153846 6.00002308,307.153846 C8.28940586,307.153846 10.1538923,305.289458 10.1538923,302.999359 C10.1538923,300.71038 8.28924333,298.846154 6.00002308,298.846154 Z M6.89921108,303.700197 L6.89921108,305.678219 L5.10100111,305.678219 L5.10100111,303.700197 L6.89921108,303.700197 Z M6.89921108,300.103957 L6.89921108,302.801137 L5.10100111,302.801137 L5.10100111,300.103957 L6.89921108,300.103957 Z" id="Combined-Shape"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -39,9 +39,29 @@
src: url('./assets/styles/fonts/Inter-VariableFont.ttf') format('truetype');
}
.error-glyph-margin {
background: url('./assets/icons/general/alert-circle.svg') no-repeat center;
.glyph-margin {
background-size: 80%;
&.error {
background: url('assets/icons/general/alert-circle.svg') no-repeat center;
}
&.warning {
background: url('assets/icons/general/alert-warning-circle.svg') no-repeat center;
}
}
.codicon-error {
background: url('assets/icons/general/alert-circle.svg') no-repeat center;
}
.codicon-warning {
background: url('assets/icons/general/alert-warning-circle.svg') no-repeat center;
}
.codicon-error::before,
.codicon-warning::before {
visibility: hidden;
}
@include common-variables.configureLight(