From 1855a1aa9156548170b6e4675b66d0aac8d4300d Mon Sep 17 00:00:00 2001
From: Tamara Steinwender <tamara.steinwender@tugraz.at>
Date: Mon, 8 Nov 2021 15:54:42 +0100
Subject: [PATCH] Small adaptions

---
 .../src/i18n/de/translation.json              | 34 ++++-----------
 .../src/i18n/en/translation.json              | 42 ++-----------------
 .../src/nextcloud-file-picker.js              |  2 +-
 3 files changed, 12 insertions(+), 66 deletions(-)

diff --git a/packages/file-handling/src/i18n/de/translation.json b/packages/file-handling/src/i18n/de/translation.json
index e4553618..3b866e64 100644
--- a/packages/file-handling/src/i18n/de/translation.json
+++ b/packages/file-handling/src/i18n/de/translation.json
@@ -1,18 +1,8 @@
 {
-  "error-head": "FEHLER: Information",
-  "is-forbidden": "ist verboten",
-  "troubled-server": "macht Probleme am Server",
-  "unknown-problems": "mit unbekanntem Problem",
-  "was-not-found": "wurde nicht gefunden",
-
   "demo-title": "Datei Abgabe Demo",
-  "server-required": "Es wird unter der URL <a href=\"{{- url}}\"><tt>{{- url}}</tt></a> ein Server benötigt um die Dateien zu empfangen.",
   "intro": "Sie können in diesem Bereich Dateien per Drag & Drop oder per Direktauswahl hochladen. Die Dateien dürfen sich auch in ZIP-Archiven befinden.",
   "upload-label": "Dateiauswahl",
-  "upload-disabled-title": "Die Dateiauswahl ist während dem Hochladvorgang gesperrt!",
-  "page-leaving-warn-dialogue": "Vorsicht! Es befinden sich noch ungenutzte Dateien in der Zwischenablage. Wenn Sie auf 'OK' klicken, wird die bestehende Zwischenablage automatisch verworfen!",
   "file-source": {
-    "modal-select-files": "Dateien auswählen",
     "modal-close": "Dialog schließen",
     "nav-local": "Lokaler Computer",
     "no-usable-files-in-zip": "ZIP Datei enthält keine verwendbaren Dateien",
@@ -21,25 +11,22 @@
     "mime-type-title": "Nicht unterstützes Dateiformat",
     "mime-type-body": "Das Dateiformat wird von dieser Applikation nicht unterstützt.",
     "too-big-file-title": "Datei ist zu groß!",
-    "too-big-file-body": "Die Datei darf maximal {{size}} haben."
+    "too-big-file-body": "Die Datei darf maximal {{size}} haben.",
+    "open-menu": ""
   },
   "file-sink": {
     "local-intro": "{{count}} Datei herunterladen",
-    "local-intro_plural": "{{count}} Dateien als ZIP-Datei herunterladen",
     "local-button": "Datei herunterladen",
-    "local-button_plural": "ZIP-Datei herunterladen",
     "modal-close": "Dialog schließen",
     "nav-local": "Lokaler Computer",
     "upload-success-title": "Erfolgreich hochgeladen",
     "upload-success-body": "Sie haben {{count}} Datei erfolgreich in {{name}} hochgeladen.",
     "upload-success-body_plural": "Sie haben {{count}} Dateien erfolgreich in {{name}} hochgeladen.",
-    "clipboard": "Zwischenablage"
+    "clipboard": "Zwischenablage",
+    "select-directory": ""
   },
   "nextcloud-file-picker": {
-    "open": "Nextcloud",
     "open-nextcloud-file-picker": "Dateien von {{name}} wählen",
-    "folder-last": "In das zuletzt ausgewählte Verzeichnis springen",
-    "folder-up": "In das übergeordnete Verzeichnis springen",
     "folder-home": "In das Home Verzeichnis springen",
     "select-files": "Dateien auswählen",
     "select-files-btn": "Datei auswählen",
@@ -56,10 +43,8 @@
     "init-text-2": "Sie müssen sich zuerst authentifizieren.",
     "auth-info": "Eine neue Seite wird geöffnet, um Ihr Konto zu verbinden.",
     "connect-nextcloud": "{{name}} verbinden",
-    "open-in-nextcloud": "In {{name}} öffnen",
     "no-data": "In diesem Ordner befinden sich keine Dateien.",
     "no-data-type": "In diesem Ordner befinden sich keine Daten vom benötigten Typ.",
-    "select-folder": "In diesem Ordner hochladen",
     "webdav-error": "Etwas ist schief gelaufen: {{error}}",
     "add-folder-error": "Die Ressource \"{{folder}}\", ist bereits vorhanden.",
     "add-folder-success": "Der Ordner \"{{folder}}\" wurde erfolgreich erstellt.",
@@ -83,10 +68,6 @@
     "readonly": "Sie dürfen in diesem Ordner nichts hochladen.",
     "onlycreate": "Sie dürfen in diesem Ordner nur neue Dateien erstellen.",
     "onlyedit": "Sie dürfen in diesem Ordner nur Dateien bearbeiten.",
-    "select-all": "Alle auswählen",
-    "select-all-title": "Alle verfügbaren Dateien in diesem Ordner auswählen",
-    "select-nothing": "Nichts auswählen",
-    "select-nothing-title": "Alle gewählten Dateien nicht mehr selektieren",
     "abort": "Vorgang abbrechen",
     "abort-message": "Vorgang wurde abgebrochen.",
     "remember-me": "Mit {{name}} verbunden bleiben",
@@ -112,7 +93,7 @@
     "file-size": "Größe",
     "file-type": "Art",
     "file-mod": "Geändert",
-    "no-data":  "Aktuell befinden sich keine Dateien in der Zwischenablage.",
+    "no-data": "Aktuell befinden sich keine Dateien in der Zwischenablage.",
     "saved-files-title": "Datei erfolgreich abgelegt",
     "saved-files-title_plural": "Dateien erfolgreich abgelegt",
     "saved-files-body": "Eine Datei wurde erfolgreich temporär in der Zwischenablage abgelegt und kann jetzt innerhalb dieser Applikation verwendet werden.",
@@ -130,15 +111,14 @@
     "upload-button-label": "Dateien auswählen",
     "warning": "Vorsicht! Wenn Sie den Browser schließen oder die Seite neu laden wird die bestehende Zwischenablage automatisch verworfen!",
     "source-title": "Von der Zwischenablage auswählen",
-    "source-body": "Hier können Sie zuvor temporär abgelegte Dateien auswählen.",
     "source-btn": "Datei auswählen",
     "source-btn_plural": "{{count}} Dateien auswählen",
     "source-btn-none": "Dateien auswählen",
     "sink-title": "Dateien in der Zwischenablage ablegen",
-    "sink-body": "Hier können Sie Dateien temporär in der Zwischenablage ablegen.",
     "sink-btn": "{{count}} Datei ablegen",
     "sink-btn_plural": "{{count}} Dateien ablegen",
     "select-all": "Alle auswählen",
     "select-nothing": "Nichts auswählen"
-  }
+  },
+  "required-server": ""
 }
diff --git a/packages/file-handling/src/i18n/en/translation.json b/packages/file-handling/src/i18n/en/translation.json
index 53e82b29..999d879b 100644
--- a/packages/file-handling/src/i18n/en/translation.json
+++ b/packages/file-handling/src/i18n/en/translation.json
@@ -1,59 +1,33 @@
 {
-  "error-head": "ERROR: information",
-  "is-forbidden": "is forbidden",
-  "troubled-server": "troubled server",
-  "unknown-problems": "with unknown problems",
-  "was-not-found": "was not found",
-
   "demo-title": "File Upload Demo",
   "required-server": "You need an upload server listening at <a href=\"{{- url}}\"><tt>{{- url}}</tt></a> to receive the files...",
   "intro": "Upload multiple files with the file dialog or by dragging and dropping images onto the dashed region.",
   "upload-label": "Select some files",
-  "upload-disabled-title": "The file selection is disabled while uploading!",
-  "page-leaving-warn-dialogue": "Attention! There are still unused files in the clipboard. If you click on 'OK', the existing clipboard is automatically discarded!",
   "file-source": {
-    "modal-select-files": "Select files",
     "modal-close": "Close dialog",
     "nav-local": "My device",
     "no-usable-files-in-zip": "ZIP file does not contain any usable files",
     "no-usable-files-hint": "Upload a ZIP file with file type(s) of ",
-    "clipboard-title": "Select files from clipboard",
-    "clipboard-body": "Here you can choose from the previously temporarily cached files.",
-    "clipboard-select-btn": "Select",
-    "clipboard-no-files": "There are currently no files in the clipboard.",
     "clipboard": "Clipboard",
     "mime-type-title": "Unsupported file format",
     "mime-type-body": "The file format is not supported by this application.",
     "too-big-file-title": "The file is too big!",
-    "too-big-file-body": "The file can have a maximum of {{size}}."
+    "too-big-file-body": "The file can have a maximum of {{size}}.",
+    "open-menu": ""
   },
   "file-sink": {
     "local-intro": "Download {{count}} file",
-    "local-intro_plural": "Download {{count}} files als ZIP",
     "local-button": "Download file",
-    "local-button_plural": "Download ZIP-file",
     "modal-close": "Close dialog",
     "nav-local": "My device",
     "upload-success-title": "Successful uploaded",
     "upload-success-body": "You have successfully uploaded {{count}} file to {{name}}.",
     "upload-success-body_plural": "You have successfully uploaded {{count}} files to {{name}}.",
-    "save-to-clipboard-title": "Cached successfully",
-    "save-to-clipboard-body": "You have temporarily stored {{count}} file in the clipboard. Don't forget to save it permanently.",
-    "save-to-clipboard-body_plural": "You have temporarily saved {{count}} files in the clipboard. Don't forget to save them permanently.",
-    "save-to-clipboard-btn": "{{count}} cache file",
-    "save-to-clipboard-btn_plural": "{{count}} cache files",
-    "save-to-clipboard-text": "Here you can cache files temporarily.",
-    "save-to-clipboard-warning": "Attention! When you close the browser, reload the page or add new files, the clipboard will automatically be emptied!",
-    "clipboard-files": "One file is currently available in the clipboard",
-    "clipboard-files_plural": "{{count}} files are currently available in the clipboard",
-    "clipboard-files-overwrite": "The following files will be overwritten:",
-    "clipboard": "Clipboard"
+    "clipboard": "Clipboard",
+    "select-directory": ""
   },
   "nextcloud-file-picker": {
-    "open": "Nextcloud",
     "open-nextcloud-file-picker": "Select files from your {{name}}",
-    "folder-last": "Jump to the last directory",
-    "folder-up": "Jump to the parent directory",
     "folder-home": "Jump to the home directory",
     "select-files": "Select files",
     "select-files-btn": "Select file",
@@ -70,10 +44,8 @@
     "init-text-2": "You need to authenticate first.",
     "auth-info": "A new page will open to connect your account.",
     "connect-nextcloud": "Connect {{name}}",
-    "open-in-nextcloud": "Open in {{name}}",
     "no-data": "No data avaible in this folder.",
     "no-data-type": "No data avaible in this folder.",
-    "select-folder": "Upload in selected folder",
     "webdav-error": "Something went wrong",
     "add-folder-error": "The resource \"{{folder}}\" you tried to create already exists.",
     "add-folder-success": "The folder '{{folder}}' was created successfully.",
@@ -97,10 +69,6 @@
     "readonly": "You are not allowed to uploade files in this directory.",
     "onlycreate": "You are only allowed to create new files in this directory.",
     "onlyedit": "You are only allowed to edit files in this directory.",
-    "select-all": "Select all",
-    "select-all-title": "Select all files in this folder",
-    "select-nothing": "Select none",
-    "select-nothing-title": "Select no files",
     "abort": "Cancel process",
     "abort-message": "The process was canceled.",
     "remember-me": "Stay connected with {{name}}",
@@ -144,12 +112,10 @@
     "upload-button-label": "Load to clipboard",
     "warning": "Attention! If you close the browser or reload the page the existing clipboard is automatically discarded!",
     "source-title": "Select files from clipboard",
-    "source-body": "Here you can select files which were previously stored temporarily.",
     "source-btn": "Select file",
     "source-btn_plural": "Select {{count}} files",
     "source-btn-none": "Select files",
     "sink-title": "Store files on the clipboard",
-    "sink-body": "Here you can temporarily store files on the clipboard.",
     "sink-btn": "Store {{count}} file",
     "sink-btn_plural": "Store {{count}} files",
     "select-all": "Select all",
diff --git a/packages/file-handling/src/nextcloud-file-picker.js b/packages/file-handling/src/nextcloud-file-picker.js
index 5de638fe..fc3c5b95 100644
--- a/packages/file-handling/src/nextcloud-file-picker.js
+++ b/packages/file-handling/src/nextcloud-file-picker.js
@@ -12,7 +12,7 @@ import Tabulator from 'tabulator-tables';
 import MicroModal from './micromodal.es';
 import {name as pkgName} from './../package.json';
 import * as fileHandlingStyles from './styles';
-import {encrypt, decrypt, parseJwt} from './crypto';
+import {encrypt, decrypt, parseJwt} from './crypto.js';
 
 /**
  * NextcloudFilePicker web component
-- 
GitLab