A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
added many localization markers to the front end #123
jonaswinkler95c4e77ae495
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.htmlindex 2458005f4..5fe42fc40 100644--- a/src-ui/src/app/components/app-frame/app-frame.component.html+++ b/src-ui/src/app/components/app-frame/app-frame.component.html@@ -1,7 +1,7 @@<nav class="navbar navbar-dark sticky-top bg-primary flex-md-nowrap p-0 shadow"><span class="navbar-brand col-md-3 col-lg-2 mr-0 px-3" href="#"><img src="assets/logo-dark-notext.svg" height="18px" class="mr-2">- Paperless-ng+ <ng-container i18n="app title">Paperless-ng</ng-container></span><button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-toggle="collapse"data-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation"@@ -9,8 +9,8 @@<span class="navbar-toggler-icon"></span></button><form (ngSubmit)="search()" class="w-100 m-1">- <input class="form-control form-control-dark" type="text" placeholder="Search" aria-label="Search"- [formControl]="searchField" [ngbTypeahead]="searchAutoComplete" (selectItem)="itemSelected($event)">+ <input class="form-control form-control-dark" type="text" placeholder="Search for documents" aria-label="Search"+ [formControl]="searchField" [ngbTypeahead]="searchAutoComplete" (selectItem)="itemSelected($event)" i18n-placeholder></form></nav>@@ -28,136 +28,122 @@<a class="nav-link" routerLink="dashboard" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#house"/>- </svg>- Dashboard+ </svg> <ng-container i18n>Dashboard</ng-container></a></li><li class="nav-item"><a class="nav-link" routerLink="documents" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#files"/>- </svg>- Documents+ </svg> <ng-container i18n>Documents</ng-container></a></li></ul><h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted" *ngIf='savedViewService.sidebarViews.length > 0'>- <span>Saved views</span>+ <ng-container i18n>Saved views</ng-container></h6><ul class="nav flex-column mb-2"><li class="nav-item w-100" *ngFor="let view of savedViewService.sidebarViews"><a class="nav-link text-truncate" routerLink="view/{{view.id}}" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#funnel"/>- </svg>- {{view.name}}+ </svg> {{view.name}}</a></li></ul><h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted" *ngIf='openDocuments.length > 0'>- <span>Open documents</span>+ <ng-container i18n>Open documents</ng-container></h6><ul class="nav flex-column mb-2"><li class="nav-item w-100" *ngFor='let d of openDocuments'><a class="nav-link text-truncate" routerLink="documents/{{d.id}}" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#file-text"/>- </svg>- {{d.title | documentTitle}}+ </svg> {{d.title | documentTitle}}</a></li><li class="nav-item w-100" *ngIf="openDocuments.length > 1"><a class="nav-link text-truncate" [routerLink]="" (click)="closeAll()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#x"/>- </svg>- Close all+ </svg> <ng-container i18n>Close all</ng-container></a></li></ul><h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">- <span>Manage</span>+ <ng-container i18n>Manage</ng-container></h6><ul class="nav flex-column mb-2"><li class="nav-item"><a class="nav-link" routerLink="correspondents" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#person"/>- </svg>- Correspondents+ </svg> <ng-container i18n>Correspondents</ng-container></a></li><li class="nav-item"><a class="nav-link" routerLink="tags" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#tags"/>- </svg>- Tags+ </svg> <ng-container i18n>Tags</ng-container></a></li><li class="nav-item"><a class="nav-link" routerLink="documenttypes" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#hash"/>- </svg>- Document types+ </svg> <ng-container i18n>Document types</ng-container></a></li><li class="nav-item"><a class="nav-link" routerLink="logs" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#text-left"/>- </svg>- Logs+ </svg> <ng-container i18n>Logs</ng-container></a></li><li class="nav-item"><a class="nav-link" routerLink="settings" routerLinkActive="active" (click)="closeMenu()"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#gear"/>- </svg>- Settings+ </svg> <ng-container i18n>Settings</ng-container></a></li><li class="nav-item"><a class="nav-link" href="admin/"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#toggles"/>- </svg>- Admin+ </svg> <ng-container i18n>Admin</ng-container></a></li></ul><h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">- <span>Misc</span>+ <ng-container i18n>Misc</ng-container></h6><ul class="nav flex-column mb-2"><li class="nav-item"><a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://paperless-ng.readthedocs.io/en/latest/"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#question-circle"/>- </svg>- Documentation+ </svg> <ng-container i18n>Documentation</ng-container></a></li><li class="nav-item"><a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://github.com/jonaswinkler/paperless-ng"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#link"/>- </svg>- GitHub+ </svg> <ng-container i18n>GitHub</ng-container></a></li><li class="nav-item"><a class="nav-link" href="accounts/logout/"><svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#door-open"/>- </svg>- Logout+ </svg> <ng-container i18n>Logout</ng-container></a></li></ul>diff --git a/src-ui/src/app/components/dashboard/dashboard.component.html b/src-ui/src/app/components/dashboard/dashboard.component.htmlindex 541255a68..5b76dd242 100644--- a/src-ui/src/app/components/dashboard/dashboard.component.html+++ b/src-ui/src/app/components/dashboard/dashboard.component.html@@ -1,4 +1,4 @@-<app-page-header title="Dashboard" [subTitle]="subtitle">+<app-page-header title="Dashboard" [subTitle]="subtitle" i18n-title><img src="assets/logo.svg" height="80" class="m-2 d-none d-md-block"></app-page-header>diff --git a/src-ui/src/app/components/dashboard/dashboard.component.ts b/src-ui/src/app/components/dashboard/dashboard.component.tsindex db9b5d425..0dca25d8a 100644--- a/src-ui/src/app/components/dashboard/dashboard.component.ts+++ b/src-ui/src/app/components/dashboard/dashboard.component.ts@@ -24,15 +24,15 @@ export class DashboardComponent implements OnInit {} else if (tagUsername && tagUsername.content) {return tagUsername.content} else {- return null+ return "null"}}get subtitle() {if (this.displayName) {- return `Hello ${this.displayName}, welcome to Paperless-ng!`+ return $localize`Hello ${this.displayName}, welcome to Paperless-ng!`} else {- return `Welcome to Paperless-ng!`+ return $localize`Welcome to Paperless-ng!`}}diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.htmlindex f50708af3..1bf06b60f 100644--- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html+++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html@@ -1,13 +1,13 @@<app-widget-frame [title]="savedView.name">- <a header-buttons [routerLink]="" (click)="showAll()">Show all</a>+ <a header-buttons [routerLink]="" (click)="showAll()" i18n>Show all</a><table content class="table table-sm table-hover table-borderless"><thead><tr>- <th>Created</th>- <th scope="col">Title</th>+ <th i18n>Created</th>+ <th scope="col" i18n>Title</th></tr></thead><tbody>diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.htmlindex 50d844b36..0ad0005ea 100644--- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html+++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html@@ -1,6 +1,6 @@-<app-widget-frame title="Statistics">+<app-widget-frame title="Statistics" i18n-title><ng-container content>- <p class="card-text">Documents in inbox: {{statistics.documents_inbox}}</p>- <p class="card-text">Total documents: {{statistics.documents_total}}</p>+ <p class="card-text" i18n>Documents in inbox: {{statistics.documents_inbox}}</p>+ <p class="card-text" i18n>Total documents: {{statistics.documents_total}}</p></ng-container></app-widget-frame>\ No newline at end of filediff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.htmlindex 013486a47..91fff4e83 100644--- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html+++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html@@ -1,16 +1,16 @@-<app-widget-frame title="Upload new documents">+<app-widget-frame title="Upload new documents" i18n-title><div content><form>- <ngx-file-drop dropZoneLabel="Drop documents here or" (onFileDrop)="dropped($event)"+ <ngx-file-drop dropZoneLabel="Drop documents here or" browseBtnLabel="Browse files" (onFileDrop)="dropped($event)"(onFileOver)="fileOver($event)" (onFileLeave)="fileLeave($event)" dropZoneClassName="bg-light card"multiple="true" contentClassName="justify-content-center d-flex align-items-center p-5" [showBrowseBtn]=true- browseBtnClassName="btn btn-sm btn-outline-primary ml-2">+ browseBtnClassName="btn btn-sm btn-outline-primary ml-2" i18n-dropZoneLabel i18n-browseBtnLabel></ngx-file-drop></form><div *ngIf="uploadVisible" class="mt-3">- <p>Uploading {{uploadStatus.length}} file(s)</p>+ <p i18n>Uploading {{uploadStatus.length}} file(s)</p><ngb-progressbar [value]="loadedSum" [max]="totalSum" [striped]="true" [animated]="uploadStatus.length > 0"></ngb-progressbar></div>diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.tsindex 2ea4825f1..b80f9544e 100644--- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts+++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts@@ -60,7 +60,7 @@ export class UploadFileWidgetComponent implements OnInit {} else if (event.type == HttpEventType.Response) {this.uploadStatus.splice(this.uploadStatus.indexOf(uploadStatusObject), 1)this.completedFiles += 1- this.toastService.showToast(Toast.make("Information", "The document has been uploaded and will be processed by the consumer shortly."))+ this.toastService.showToast(Toast.make("Information", $localize`The document has been uploaded and will be processed by the consumer shortly.`))}}, error => {@@ -68,11 +68,11 @@ export class UploadFileWidgetComponent implements OnInit {this.completedFiles += 1switch (error.status) {case 400: {- this.toastService.showToast(Toast.makeError(`There was an error while uploading the document: ${error.error.document}`))+ this.toastService.showToast(Toast.makeError($localize`There was an error while uploading the document: ${error.error.document}`))break;}default: {- this.toastService.showToast(Toast.makeError("An error has occurred while uploading the document. Sorry!"))+ this.toastService.showToast(Toast.makeError($localize`An error has occurred while uploading the document. Sorry!`))break;}}diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.htmlindex 0caf55f11..6c9c34d5b 100644--- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html+++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html@@ -1,16 +1,16 @@-<app-widget-frame title="First steps">+<app-widget-frame title="First steps" i18n-title><ng-container content><img src="assets/save-filter.png" class="float-right">- <p>Paperless is running! :)</p>- <p>You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list.+ <p i18n>Paperless is running! :)</p>+ <p i18n>You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list.After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have them displayed on the dashboard instead of this message.</p>- <p>Paperless offers some more features that try to make your life easier, such as:</p>+ <p i18n>Paperless offers some more features that try to make your life easier, such as:</p><ul>- <li>Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically.</li>- <li>You can configure paperless to read your mails and add documents from attached files.</li>+ <li i18n>Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically.</li>+ <li i18n>You can configure paperless to read your mails and add documents from attached files.</li></ul>- <p>Consult the documentation on how to use these features. The section on basic usage also has some information on how to use paperless in general.</p>+ <p i18n>Consult the documentation on how to use these features. The section on basic usage also has some information on how to use paperless in general.</p></ng-container></app-widget-frame>\ No newline at end of filediff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.htmlindex ae3fb0c0a..f569c1033 100644--- a/src-ui/src/app/components/document-detail/document-detail.component.html+++ b/src-ui/src/app/components/document-detail/document-detail.component.html@@ -1,19 +1,18 @@<app-page-header [(title)]="title"><div class="input-group input-group-sm mr-5" *ngIf="getContentType() == 'application/pdf'"><div class="input-group-prepend">- <div class="input-group-text">Page </div>+ <div class="input-group-text" i18n>Page</div></div><input class="form-control flex-grow-0 w-auto" type="number" min="1" [max]="previewNumPages" [(ngModel)]="previewCurrentPage" /><div class="input-group-append">- <div class="input-group-text">of {{previewNumPages}}</div>+ <div class="input-group-text" i18n>of {{previewNumPages}}</div></div></div><button type="button" class="btn btn-sm btn-outline-danger mr-2" (click)="delete()"><svg class="buttonicon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#trash" />- </svg>- <span class="d-none d-lg-inline"> Delete</span>+ </svg> <span class="d-none d-lg-inline" i18n>Delete</span></button><div class="btn-group mr-2">@@ -21,14 +20,13 @@<a [href]="downloadUrl" class="btn btn-sm btn-outline-primary"><svg class="buttonicon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#download" />- </svg>- <span class="d-none d-lg-inline"> Download</span>+ </svg> <span class="d-none d-lg-inline" i18n>Download</span></a><div class="btn-group" ngbDropdown role="group" *ngIf="metadata?.has_archive_version"><button class="btn btn-sm btn-outline-primary dropdown-toggle-split" ngbDropdownToggle></button><div class="dropdown-menu shadow" ngbDropdownMenu>- <a ngbDropdownItem [href]="downloadOriginalUrl">Download original</a>+ <a ngbDropdownItem [href]="downloadOriginalUrl" i18n>Download original</a></div></div>@@ -37,15 +35,13 @@<button type="button" class="btn btn-sm btn-outline-primary mr-2" (click)="moreLike()"><svg class="buttonicon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#three-dots" />- </svg>- <span class="d-none d-lg-inline"> More like this</span>+ </svg> <span class="d-none d-lg-inline" i18n>More like this</span></button><button type="button" class="btn btn-sm btn-outline-primary" (click)="close()"><svg class="buttonicon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#x" />- </svg>- <span class="d-none d-lg-inline"> Close</span>+ </svg> <span class="d-none d-lg-inline" i18n>Close</span></button></app-page-header>@@ -57,27 +53,27 @@<ul ngbNav #nav="ngbNav" class="nav-tabs"><li [ngbNavItem]="1">- <a ngbNavLink>Details</a>+ <a ngbNavLink i18n>Details</a><ng-template ngbNavContent>- <app-input-text title="Title" formControlName="title"></app-input-text>+ <app-input-text i18n-title title="Title" formControlName="title"></app-input-text><div class="form-group">- <label for="archive_serial_number">Archive Serial Number</label>+ <label for="archive_serial_number" i18n>Archive Serial Number</label><input type="number" class="form-control" id="archive_serial_number"formControlName='archive_serial_number'></div>- <app-input-date-time titleDate="Date created" formControlName="created"></app-input-date-time>- <app-input-select [items]="correspondents" title="Correspondent" formControlName="correspondent" [allowNull]="true"+ <app-input-date-time i18n-titleDate titleDate="Date created" formControlName="created"></app-input-date-time>+ <app-input-select [items]="correspondents" i18n-title title="Correspondent" formControlName="correspondent" [allowNull]="true"(createNew)="createCorrespondent()"></app-input-select>- <app-input-select [items]="documentTypes" title="Document type" formControlName="document_type" [allowNull]="true"+ <app-input-select [items]="documentTypes" i18n-title title="Document type" formControlName="document_type" [allowNull]="true"(createNew)="createDocumentType()"></app-input-select>- <app-input-tags formControlName="tags" title="Tags"></app-input-tags>+ <app-input-tags formControlName="tags" i18n-title title="Tags"></app-input-tags></ng-template></li><li [ngbNavItem]="2">- <a ngbNavLink>Content</a>+ <a ngbNavLink i18n>Content</a><ng-template ngbNavContent><div class="form-group"><textarea class="form-control" id="content" rows="20" formControlName='content'></textarea>@@ -86,48 +82,48 @@</li><li [ngbNavItem]="3">- <a ngbNavLink>Metadata</a>+ <a ngbNavLink i18n>Metadata</a><ng-template ngbNavContent><table class="table table-borderless"><tbody><tr>- <td>Date modified</td>+ <td i18n>Date modified</td><td>{{document.modified | date:'medium'}}</td></tr><tr>- <td>Date added</td>+ <td i18n>Date added</td><td>{{document.added | date:'medium'}}</td></tr><tr>- <td>Media filename</td>+ <td i18n>Media filename</td><td>{{metadata?.media_filename}}</td></tr><tr>- <td>Original MD5 Checksum</td>+ <td i18n>Original MD5 checksum</td><td>{{metadata?.original_checksum}}</td></tr><tr>- <td>Original file size</td>+ <td i18n>Original file size</td><td>{{metadata?.original_size | fileSize}}</td></tr><tr>- <td>Original mime type</td>+ <td i18n>Original mime type</td><td>{{metadata?.original_mime_type}}</td></tr><tr *ngIf="metadata?.has_archive_version">- <td>Archive MD5 Checksum</td>+ <td i18n>Archive MD5 checksum</td><td>{{metadata?.archive_checksum}}</td></tr><tr *ngIf="metadata?.has_archive_version">- <td>Archive file size</td>+ <td i18n>Archive file size</td><td>{{metadata?.archive_size | fileSize}}</td></tr></tbody></table>- <app-metadata-collapse title="Original document metadata" [metadata]="metadata.original_metadata" *ngIf="metadata?.original_metadata?.length > 0"></app-metadata-collapse>- <app-metadata-collapse title="Archived document metadata" [metadata]="metadata.archive_metadata" *ngIf="metadata?.archive_metadata?.length > 0"></app-metadata-collapse>+ <app-metadata-collapse i18n-title title="Original document metadata" [metadata]="metadata.original_metadata" *ngIf="metadata?.original_metadata?.length > 0"></app-metadata-collapse>+ <app-metadata-collapse i18n-title title="Archived document metadata" [metadata]="metadata.archive_metadata" *ngIf="metadata?.archive_metadata?.length > 0"></app-metadata-collapse></ng-template></li>@@ -135,10 +131,9 @@<div [ngbNavOutlet]="nav" class="mt-2"></div>- <button type="button" class="btn btn-outline-secondary" (click)="discard()">Discard</button> - <button type="button" class="btn btn-outline-primary" (click)="saveEditNext()" *ngIf="hasNext()">Save & edit- next</button> - <button type="submit" class="btn btn-primary">Save</button> + <button type="button" class="btn btn-outline-secondary" (click)="discard()" i18n>Discard</button> + <button type="button" class="btn btn-outline-primary" (click)="saveEditNext()" *ngIf="hasNext()" i18n>Save & edit next</button> + <button type="submit" class="btn btn-primary" i18n>Save</button> </form></div>diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.tsindex d705c3176..2efd32f27 100644--- a/src-ui/src/app/components/document-detail/document-detail.component.ts+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts@@ -158,11 +158,11 @@ export class DocumentDetailComponent implements OnInit {delete() {let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'})- modal.componentInstance.title = "Confirm delete"- modal.componentInstance.messageBold = `Do you really want to delete document '${this.document.title}'?`- modal.componentInstance.message = `The files for this document will be deleted permanently. This operation cannot be undone.`+ modal.componentInstance.title = $localize`Confirm delete`+ modal.componentInstance.messageBold = $localize`Do you really want to delete document '${this.document.title}'?`+ modal.componentInstance.message = $localize`The files for this document will be deleted permanently. This operation cannot be undone.`modal.componentInstance.btnClass = "btn-danger"- modal.componentInstance.btnCaption = "Delete document"+ modal.componentInstance.btnCaption = $localize`Delete document`modal.componentInstance.confirmClicked.subscribe(() => {this.documentsService.delete(this.document).subscribe(() => {modal.close()diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.htmlindex 8f52f707f..ac015cc52 100644--- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html+++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html@@ -17,11 +17,11 @@<div class="d-flex justify-content-between align-items-center"><h5 class="card-title"><ng-container *ngIf="document.correspondent">- <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="" title="Filter by correspondent" (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>+ <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a><ng-template #nolink>{{(document.correspondent$ | async)?.name}}</ng-template>:</ng-container>{{document.title | documentTitle}}- <app-tag [tag]="t" linkTitle="Filter by tag" *ngFor="let t of document.tags$ | async" class="ml-1" (click)="clickTag.emit(t.id)" [clickable]="clickTag.observers.length"></app-tag>+ <app-tag [tag]="t" linkTitle="Filter by tag" i18n-linkTitle *ngFor="let t of document.tags$ | async" class="ml-1" (click)="clickTag.emit(t.id)" [clickable]="clickTag.observers.length"></app-tag></h5><h5 class="card-title" *ngIf="document.archive_serial_number">#{{document.archive_serial_number}}</h5></div>@@ -36,37 +36,33 @@<a routerLink="/search" [queryParams]="{'more_like': document.id}" class="btn btn-sm btn-outline-secondary" *ngIf="moreLikeThis"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-three-dots" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>- </svg>- More like this+ </svg> <ng-container i18n>More like this</ng-container></a><a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>- </svg>- Edit+ </svg> <ng-container i18n>Edit</ng-container></a><a type="button" class="btn btn-sm btn-outline-secondary" [href]="getPreviewUrl()"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-search" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z"/><path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"/>- </svg>- View+ </svg> <ng-container i18n>View</ng-container></a><a type="button" class="btn btn-sm btn-outline-secondary" [href]="getDownloadUrl()"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-download" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"/><path fill-rule="evenodd" d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"/>- </svg>- Download+ </svg> <ng-container i18n>Download</ng-container></a></div>- <small class="text-muted ml-auto">Score:</small>+ <small class="text-muted ml-auto" i18n>Score:</small><ngb-progressbar *ngIf="searchScore" [type]="searchScoreClass" [value]="searchScore" class="search-score-bar mx-2" [max]="1"></ngb-progressbar>- <small class="text-muted">Created: {{document.created | date}}</small>+ <small class="text-muted" i18n>Created: {{document.created | date}}</small></div></div>diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.htmlindex 658aa1ea0..4fd155559 100644--- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html+++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html@@ -12,7 +12,7 @@<div style="top: 0; right: 0; font-size: large" class="text-right position-absolute mr-1"><div *ngFor="let t of getTagsLimited$() | async">- <app-tag [tag]="t" (click)="clickTag.emit(t.id)" [clickable]="true" linkTitle="Filter by tag"></app-tag>+ <app-tag [tag]="t" (click)="clickTag.emit(t.id)" [clickable]="true" linkTitle="Filter by tag" i18n-linkTitle></app-tag></div><div *ngIf="moreTags"><span class="badge badge-secondary">+ {{moreTags}}</span>@@ -23,7 +23,7 @@<div class="card-body p-2"><p class="card-text"><ng-container *ngIf="document.correspondent">- <a [routerLink]="" title="Filter by correspondent" (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>:+ <a [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>:</ng-container>{{document.title | documentTitle}}</p>@@ -32,18 +32,18 @@<div class="d-flex justify-content-between align-items-center mx-n2"><div class="btn-group">- <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" title="Edit">+ <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" title="Edit" i18n-title><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/></svg></a>- <a [href]="getPreviewUrl()" class="btn btn-sm btn-outline-secondary" title="View in browser">+ <a [href]="getPreviewUrl()" class="btn btn-sm btn-outline-secondary" title="View in browser" i18n-title><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-search" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z"/><path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"/></svg></a>- <a [href]="getDownloadUrl()" class="btn btn-sm btn-outline-secondary" title="Download">+ <a [href]="getDownloadUrl()" class="btn btn-sm btn-outline-secondary" title="Download" i18n-title><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-download" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"/><path fill-rule="evenodd" d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"/>diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.htmlindex 25bcb7468..888639b5e 100644--- a/src-ui/src/app/components/document-list/document-list.component.html+++ b/src-ui/src/app/components/document-list/document-list.component.html@@ -47,7 +47,7 @@<div class="btn-group btn-group-toggle ml-2" ngbRadioGroup [(ngModel)]="list.sortReverse"><div ngbDropdown class="btn-group">- <button class="btn btn-outline-primary btn-sm" id="dropdownBasic1" ngbDropdownToggle>Sort by</button>+ <button class="btn btn-outline-primary btn-sm" id="dropdownBasic1" ngbDropdownToggle i18n>Sort by</button><div ngbDropdownMenu aria-labelledby="dropdownBasic1" class="shadow"><button *ngFor="let f of getSortFields()" ngbDropdownItem (click)="list.sortField = f.field"[class.active]="list.sortField == f.field">{{f.name}}</button>@@ -70,15 +70,15 @@<div class="btn-group ml-2"><div class="btn-group" ngbDropdown role="group">- <button class="btn btn-sm btn-outline-primary dropdown-toggle" ngbDropdownToggle>Views</button>+ <button class="btn btn-sm btn-outline-primary dropdown-toggle" ngbDropdownToggle i18n>Views</button><div class="dropdown-menu shadow" ngbDropdownMenu><ng-container *ngIf="!list.savedViewId"><button ngbDropdownItem *ngFor="let view of savedViewService.allViews" (click)="loadViewConfig(view)">{{view.name}}</button><div class="dropdown-divider" *ngIf="savedViewService.allViews.length > 0"></div></ng-container>- <button ngbDropdownItem (click)="saveViewConfig()" *ngIf="list.savedViewId">Save "{{list.savedViewTitle}}"</button>- <button ngbDropdownItem (click)="saveViewConfigAs()">Save as...</button>+ <button ngbDropdownItem (click)="saveViewConfig()" *ngIf="list.savedViewId" i18n>Save "{{list.savedViewTitle}}"</button>+ <button ngbDropdownItem (click)="saveViewConfigAs()" i18n>Save as...</button></div></div>@@ -104,12 +104,12 @@<table class="table table-sm border shadow-sm" *ngIf="displayMode == 'details'"><thead><th></th>- <th class="d-none d-lg-table-cell">ASN</th>- <th class="d-none d-md-table-cell">Correspondent</th>- <th>Title</th>- <th class="d-none d-xl-table-cell">Document type</th>- <th>Created</th>- <th class="d-none d-xl-table-cell">Added</th>+ <th class="d-none d-lg-table-cell" i18n>ASN</th>+ <th class="d-none d-md-table-cell" i18n>Correspondent</th>+ <th i18n>Title</th>+ <th class="d-none d-xl-table-cell" i18n>Document type</th>+ <th i18n>Created</th>+ <th class="d-none d-xl-table-cell" i18n>Added</th></thead><tbody><tr *ngFor="let d of list.documents; trackBy: trackByDocumentId" [ngClass]="list.isSelected(d) ? 'table-row-selected' : ''">diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.tsindex f72a92aa9..cb0d09fe0 100644--- a/src-ui/src/app/components/document-list/document-list.component.ts+++ b/src-ui/src/app/components/document-list/document-list.component.ts@@ -48,7 +48,7 @@ export class DocumentListComponent implements OnInit {}getTitle() {- return this.list.savedViewTitle || "Documents"+ return this.list.savedViewTitle || $localize`Documents`}getSortFields() {@@ -90,7 +90,7 @@ export class DocumentListComponent implements OnInit {saveViewConfig() {this.savedViewService.update(this.list.savedView).subscribe(result => {- this.toastService.showToast(Toast.make("Information", `View "${this.list.savedView.name}" saved successfully.`))+ this.toastService.showToast(Toast.make("Information", $localize`View "${this.list.savedView.name}" saved successfully.`))})}@@ -109,7 +109,7 @@ export class DocumentListComponent implements OnInit {}this.savedViewService.create(savedView).subscribe(() => {modal.close()- this.toastService.showToast(Toast.make("Information", `View "${savedView.name}" created successfully.`))+ this.toastService.showToast(Toast.make("Information", $localize`View "${savedView.name}" created successfully.`))})})}diff --git a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.htmlindex 8819aa313..9a2a37e36 100644--- a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html+++ b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html@@ -1,17 +1,17 @@<form [formGroup]="saveViewConfigForm" class="needs-validation" novalidate (ngSubmit)="save()"><div class="modal-header">- <h4 class="modal-title" id="modal-basic-title">Save current view</h4>+ <h4 class="modal-title" id="modal-basic-title" i18n>Save current view</h4><button type="button" class="close" aria-label="Close" (click)="cancel()"><span aria-hidden="true">×</span></button></div><div class="modal-body">- <app-input-text title="Name" formControlName="name"></app-input-text>- <app-input-check title="Show in side bar" formControlName="showInSideBar"></app-input-check>- <app-input-check title="Show on dashboard" formControlName="showOnDashboard"></app-input-check>+ <app-input-text i18n-title title="Name" formControlName="name"></app-input-text>+ <app-input-check i18n-title title="Show in side bar" formControlName="showInSideBar"></app-input-check>+ <app-input-check i18n-title title="Show on dashboard" formControlName="showOnDashboard"></app-input-check></div><div class="modal-footer">- <button type="button" class="btn btn-outline-dark" (click)="cancel()">Cancel</button>- <button type="submit" class="btn btn-primary">Save</button>+ <button type="button" class="btn btn-outline-dark" (click)="cancel()" i18n>Cancel</button>+ <button type="submit" class="btn btn-primary" i18n>Save</button></div></form>diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html b/src-ui/src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.htmlindex e09ea38bf..bc3d1c88f 100644--- a/src-ui/src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html+++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html@@ -7,13 +7,13 @@</div><div class="modal-body">- <app-input-text title="Name" formControlName="name"></app-input-text>- <app-input-select title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>- <app-input-text title="Match" formControlName="match" hint="Auto matching does not require you to fill in this field."></app-input-text>- <app-input-check title="Case insensitive" formControlName="is_insensitive" hint="Auto matching ignores this option."></app-input-check>+ <app-input-text i18n-title title="Name" formControlName="name"></app-input-text>+ <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>+ <app-input-text i18n-title title="Match" formControlName="match" hint="Auto matching does not require you to fill in this field."></app-input-text>+ <app-input-check i18n-title title="Case insensitive" formControlName="is_insensitive" hint="Auto matching ignores this option."></app-input-check></div><div class="modal-footer">- <button type="button" class="btn btn-outline-dark" (click)="cancel()">Cancel</button>- <button type="submit" class="btn btn-primary">Save</button>+ <button type="button" class="btn btn-outline-dark" (click)="cancel()" i18n>Cancel</button>+ <button type="submit" class="btn btn-primary" i18n>Save</button></div></form>\ No newline at end of filediff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.html b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.htmlindex 2efd1c58d..4abc72037 100644--- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.html+++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.html@@ -1,7 +1,5 @@-<app-page-header title="Correspondents">- <button type="button" class="btn btn-sm btn-outline-primary" (click)="openCreateDialog()">- Create- </button>+<app-page-header title="Correspondents" i18n-title>+ <button type="button" class="btn btn-sm btn-outline-primary" (click)="openCreateDialog()" i18n>Create</button></app-page-header><div class="row m-0 justify-content-end">@@ -11,11 +9,11 @@<table class="table table-striped border shadow"><thead><tr>- <th scope="col" sortable="name" (sort)="onSort($event)">Name</th>- <th scope="col" sortable="matching_algorithm" (sort)="onSort($event)">Matching</th>- <th scope="col" sortable="document_count" (sort)="onSort($event)">Document count</th>- <th scope="col" sortable="last_correspondence" (sort)="onSort($event)">Last correspondence</th>- <th scope="col">Actions</th>+ <th scope="col" sortable="name" (sort)="onSort($event)" i18n>Name</th>+ <th scope="col" sortable="matching_algorithm" (sort)="onSort($event)" i18n>Matching</th>+ <th scope="col" sortable="document_count" (sort)="onSort($event)" i18n>Document count</th>+ <th scope="col" sortable="last_correspondence" (sort)="onSort($event)" i18n>Last correspondence</th>+ <th scope="col" i18n>Actions</th></tr></thead><tbody>@@ -29,21 +27,18 @@<button class="btn btn-sm btn-outline-secondary" (click)="filterDocuments(correspondent)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"/>- </svg>- Documents+ </svg> <ng-container i18n>Documents</ng-container></button><button class="btn btn-sm btn-outline-secondary" (click)="openEditDialog(correspondent)"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>- </svg>- Edit+ </svg> <ng-container i18n>Edit</ng-container></button><button class="btn btn-sm btn-outline-danger" (click)="openDeleteDialog(correspondent)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/><path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>- </svg>- Delete+ </svg> <ng-container i18n>Delete</ng-container></button></div></td>diff --git a/src-ui/src/app/components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component.html b/src-ui/src/app/components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component.htmlindex 3338c40c3..16c006051 100644--- a/src-ui/src/app/components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component.html+++ b/src-ui/src/app/components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component.html@@ -7,14 +7,14 @@</div><div class="modal-body">- <app-input-text title="Name" formControlName="name"></app-input-text>- <app-input-select title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>- <app-input-text title="Match" formControlName="match" hint="Auto matching does not require you to fill in this field."></app-input-text>- <app-input-check title="Case insensitive" formControlName="is_insensitive" hint="Auto matching ignores this option."></app-input-check>+ <app-input-text i18n-title title="Name" formControlName="name"></app-input-text>+ <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>+ <app-input-text i18n-title title="Match" formControlName="match" hint="Auto matching does not require you to fill in this field."></app-input-text>+ <app-input-check i18n-title title="Case insensitive" formControlName="is_insensitive" hint="Auto matching ignores this option."></app-input-check></div><div class="modal-footer">- <button type="button" class="btn btn-outline-dark" (click)="cancel()">Cancel</button>- <button type="submit" class="btn btn-primary">Save</button>+ <button type="button" class="btn btn-outline-dark" (click)="cancel()" i18n>Cancel</button>+ <button type="submit" class="btn btn-primary" i18n>Save</button></div></form>\ No newline at end of filediff --git a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.html b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.htmlindex d2ffab400..6de7e0595 100644--- a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.html+++ b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.html@@ -1,7 +1,5 @@<app-page-header title="Document types">- <button type="button" class="btn btn-sm btn-outline-primary" (click)="openCreateDialog()">- Create- </button>+ <button type="button" class="btn btn-sm btn-outline-primary" (click)="openCreateDialog()" i18n>Create</button></app-page-header><div class="row m-0 justify-content-end">@@ -12,10 +10,10 @@<table class="table table-striped border shadow"><thead><tr>- <th scope="col" sortable="name" (sort)="onSort($event)">Name</th>- <th scope="col" sortable="matching_algorithm" (sort)="onSort($event)">Matching</th>- <th scope="col" sortable="document_count" (sort)="onSort($event)">Document count</th>- <th scope="col">Actions</th>+ <th scope="col" sortable="name" (sort)="onSort($event)" i18n>Name</th>+ <th scope="col" sortable="matching_algorithm" (sort)="onSort($event)" i18n>Matching</th>+ <th scope="col" sortable="document_count" (sort)="onSort($event)" i18n>Document count</th>+ <th scope="col" i18n>Actions</th></tr></thead><tbody>@@ -28,21 +26,18 @@<button class="btn btn-sm btn-outline-secondary" (click)="filterDocuments(document_type)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"/>- </svg>- Documents+ </svg> <ng-container i18n>Documents</ng-container></button><button class="btn btn-sm btn-outline-secondary" (click)="openEditDialog(document_type)"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>- </svg>- Edit+ </svg> <ng-container i18n>Edit</ng-container></button><button class="btn btn-sm btn-outline-danger" (click)="openDeleteDialog(document_type)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/><path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>- </svg>- Delete+ </svg> <ng-container i18n>Delete</ng-container></button></div></td>diff --git a/src-ui/src/app/components/manage/generic-list/generic-list.component.ts b/src-ui/src/app/components/manage/generic-list/generic-list.component.tsindex 783c22b36..e1ef39428 100644--- a/src-ui/src/app/components/manage/generic-list/generic-list.component.ts+++ b/src-ui/src/app/components/manage/generic-list/generic-list.component.ts@@ -28,7 +28,7 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements OngetMatching(o: MatchingModel) {if (o.matching_algorithm == MATCH_AUTO) {- return "Automatic"+ return $localize`Automatic`} else if (o.match && o.match.length > 0) {return `${o.match} (${MATCHING_ALGORITHMS.find(a => a.id == o.matching_algorithm).name})`} else {@@ -90,11 +90,11 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements OnopenDeleteDialog(object: T) {var activeModal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'})- activeModal.componentInstance.title = "Confirm delete"- activeModal.componentInstance.messageBold = `Do you really want to delete ${this.getObjectName(object)}?`- activeModal.componentInstance.message = "Associated documents will not be deleted."+ activeModal.componentInstance.title = $localize`Confirm delete`+ activeModal.componentInstance.messageBold = $localize`Do you really want to delete ${this.getObjectName(object)}?`+ activeModal.componentInstance.message = $localize`Associated documents will not be deleted.`activeModal.componentInstance.btnClass = "btn-danger"- activeModal.componentInstance.btnCaption = "Delete"+ activeModal.componentInstance.btnCaption = $localize`Delete`activeModal.componentInstance.confirmClicked.subscribe(() => {this.service.delete(object).subscribe(_ => {activeModal.close()diff --git a/src-ui/src/app/components/manage/logs/logs.component.html b/src-ui/src/app/components/manage/logs/logs.component.htmlindex 6af482c66..8c2cbae34 100644--- a/src-ui/src/app/components/manage/logs/logs.component.html+++ b/src-ui/src/app/components/manage/logs/logs.component.html@@ -1,11 +1,12 @@-<app-page-header title="Logs">+<app-page-header title="Logs" i18n-title><div ngbDropdown class="btn-group"><button class="btn btn-outline-primary btn-sm" id="dropdownBasic1" ngbDropdownToggle><svg class="toolbaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#funnel" />- </svg>- Filter+ </svg> <ng-container i18n>Filter</ng-container>++</button><div ngbDropdownMenu aria-labelledby="dropdownBasic1"><button *ngFor="let f of getLevels()" ngbDropdownItem (click)="setLevel(f.id)"diff --git a/src-ui/src/app/components/manage/settings/settings.component.html b/src-ui/src/app/components/manage/settings/settings.component.htmlindex f71f12238..6c16cfaa8 100644--- a/src-ui/src/app/components/manage/settings/settings.component.html+++ b/src-ui/src/app/components/manage/settings/settings.component.html@@ -7,14 +7,14 @@<ul ngbNav #nav="ngbNav" class="nav-tabs"><li [ngbNavItem]="1">- <a ngbNavLink>General settings</a>+ <a ngbNavLink i18n>General settings</a><ng-template ngbNavContent>- <h4>Document list</h4>+ <h4 i18n>Document list</h4><div class="form-row form-group"><div class="col-md-3 col-form-label">- <span>Items per page</span>+ <span i18n>Items per page</span></div><div class="col">@@ -31,36 +31,36 @@</ng-template></li><li [ngbNavItem]="2">- <a ngbNavLink>Saved views</a>+ <a ngbNavLink i18n>Saved views</a><ng-template ngbNavContent><div formGroupName="savedViews"><div *ngFor="let view of savedViews" [formGroupName]="view.id" class="form-row"><div class="form-group col-4 mr-3">- <label for="name_{{view.id}}">Name</label>+ <label for="name_{{view.id}}" i18n>Name</label><input type="text" class="form-control" formControlName="name" id="name_{{view.id}}"></div><div class="form-group col-auto mr-3">- <label for="show_on_dashboard_{{view.id}}">Appears on</label>+ <label for="show_on_dashboard_{{view.id}}" i18n>Appears on</label><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" id="show_on_dashboard_{{view.id}}" formControlName="show_on_dashboard">- <label class="custom-control-label" for="show_on_dashboard_{{view.id}}">Show on dashboard</label>+ <label class="custom-control-label" for="show_on_dashboard_{{view.id}}" i18n>Show on dashboard</label></div><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" id="show_in_sidebar_{{view.id}}" formControlName="show_in_sidebar">- <label class="custom-control-label" for="show_in_sidebar_{{view.id}}">Show in sidebar</label>+ <label class="custom-control-label" for="show_in_sidebar_{{view.id}}" i18n>Show in sidebar</label></div></div><div class="form-group col-auto">- <label for="name_{{view.id}}">Actions</label>- <button type="button" class="btn btn-sm btn-outline-danger form-control" (click)="deleteSavedView(view)">Delete</button>+ <label for="name_{{view.id}}" i18n>Actions</label>+ <button type="button" class="btn btn-sm btn-outline-danger form-control" (click)="deleteSavedView(view)" i18n>Delete</button></div></div>- <div *ngIf="savedViews.length == 0">No saved views defined.</div>+ <div *ngIf="savedViews.length == 0" i18n>No saved views defined.</div></div>diff --git a/src-ui/src/app/components/manage/settings/settings.component.ts b/src-ui/src/app/components/manage/settings/settings.component.tsindex f839010b1..bec85e039 100644--- a/src-ui/src/app/components/manage/settings/settings.component.ts+++ b/src-ui/src/app/components/manage/settings/settings.component.ts@@ -46,14 +46,14 @@ export class SettingsComponent implements OnInit {this.savedViewService.delete(savedView).subscribe(() => {this.savedViewGroup.removeControl(savedView.id.toString())this.savedViews.splice(this.savedViews.indexOf(savedView), 1)- this.toastService.showToast(Toast.make("Information", `Saved view "${savedView.name} deleted.`))+ this.toastService.showToast(Toast.make("Information", $localize`Saved view "${savedView.name} deleted.`))})}private saveLocalSettings() {localStorage.setItem(GENERAL_SETTINGS.DOCUMENT_LIST_SIZE, this.settingsForm.value.documentListItemPerPage)this.documentListViewService.updatePageSize()- this.toastService.showToast(Toast.make("Information", "Settings saved successfully."))+ this.toastService.showToast(Toast.make("Information", $localize`Settings saved successfully.`))}saveSettings() {@@ -65,7 +65,7 @@ export class SettingsComponent implements OnInit {this.savedViewService.patchMany(x).subscribe(s => {this.saveLocalSettings()}, error => {- this.toastService.showToast(Toast.makeError(`Error while storing settings on server: ${JSON.stringify(error.error)}`))+ this.toastService.showToast(Toast.makeError($localize`Error while storing settings on server: ${JSON.stringify(error.error)}`))})} else {this.saveLocalSettings()diff --git a/src-ui/src/app/components/not-found/not-found.component.html b/src-ui/src/app/components/not-found/not-found.component.htmlindex 6b21cf3ba..4d7e0f7e0 100644--- a/src-ui/src/app/components/not-found/not-found.component.html+++ b/src-ui/src/app/components/not-found/not-found.component.html@@ -4,5 +4,5 @@<path fill-rule="evenodd" d="M4.285 12.433a.5.5 0 0 0 .683-.183A3.498 3.498 0 0 1 8 10.5c1.295 0 2.426.703 3.032 1.75a.5.5 0 0 0 .866-.5A4.498 4.498 0 0 0 8 9.5a4.5 4.5 0 0 0-3.898 2.25.5.5 0 0 0 .183.683z"/><path d="M7 6.5C7 7.328 6.552 8 6 8s-1-.672-1-1.5S5.448 5 6 5s1 .672 1 1.5zm4 0c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S9.448 5 10 5s1 .672 1 1.5z"/></svg>- <h1>404 Not Found</h1>+ <h1 i18n>404 Not Found</h1></div>\ No newline at end of filediff --git a/src-ui/src/app/components/search/search.component.html b/src-ui/src/app/components/search/search.component.htmlindex de6f0133f..ba2253401 100644--- a/src-ui/src/app/components/search/search.component.html+++ b/src-ui/src/app/components/search/search.component.html@@ -1,7 +1,7 @@<app-page-header title="Search results"></app-page-header>-<div *ngIf="errorMessage" class="alert alert-danger">Invalid search query: {{errorMessage}}</div>+<div *ngIf="errorMessage" class="alert alert-danger" i18n>Invalid search query: {{errorMessage}}</div><p *ngIf="more_like">Showing documents similar todiff --git a/src-ui/src/app/data/matching-model.ts b/src-ui/src/app/data/matching-model.tsindex 698c32da5..dd9ae95ff 100644--- a/src-ui/src/app/data/matching-model.ts+++ b/src-ui/src/app/data/matching-model.ts@@ -9,12 +9,12 @@ export const MATCH_FUZZY = 5export const MATCH_AUTO = 6export const MATCHING_ALGORITHMS = [- {id: MATCH_ANY, name: "Any"},- {id: MATCH_ALL, name: "All"},- {id: MATCH_LITERAL, name: "Literal"},- {id: MATCH_REGEX, name: "Regular Expression"},- {id: MATCH_FUZZY, name: "Fuzzy Match"},- {id: MATCH_AUTO, name: "Auto"},+ {id: MATCH_ANY, name: $localize`Any`},+ {id: MATCH_ALL, name: $localize`All`},+ {id: MATCH_LITERAL, name: $localize`Literal`},+ {id: MATCH_REGEX, name: $localize`Regular expression`},+ {id: MATCH_FUZZY, name: $localize`Fuzzy match`},+ {id: MATCH_AUTO, name: $localize`Auto`},]export interface MatchingModel extends ObjectWithId {diff --git a/src-ui/src/app/services/rest/document.service.ts b/src-ui/src/app/services/rest/document.service.tsindex c132fa856..ec5c7689b 100644--- a/src-ui/src/app/services/rest/document.service.ts+++ b/src-ui/src/app/services/rest/document.service.ts@@ -13,13 +13,13 @@ import { TagService } from './tag.service';import { FILTER_RULE_TYPES } from 'src/app/data/filter-rule-type';export const DOCUMENT_SORT_FIELDS = [- { field: "correspondent__name", name: "Correspondent" },- { field: "document_type__name", name: "Document type" },- { field: 'title', name: 'Title' },- { field: 'archive_serial_number', name: 'ASN' },- { field: 'created', name: 'Created' },- { field: 'added', name: 'Added' },- { field: 'modified', name: 'Modified' }+ { field: "correspondent__name", name: $localize`Correspondent` },+ { field: "document_type__name", name: $localize`Document type` },+ { field: 'title', name: $localize`Title` },+ { field: 'archive_serial_number', name: $localize`ASN` },+ { field: 'created', name: $localize`Created` },+ { field: 'added', name: $localize`Added` },+ { field: 'modified', name: $localize`Modified` }]@Injectable({