diff --git a/README.md b/README.md
index 8dc2cbaf..2af4d0a6 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ complicated installation.
* Configurable overrides for all defaults as well as filters and formats
* Multipage scanning (with collation for double sided scans)
* Light and dark mode
-* **NEW**: International translations: German; Spanish (**help requested**)
+* **NEW**: International translations: Czech, German, Italian, Spanish (**help requested**)
It supports any
[SANE compatible devices](http://www.sane-project.org/sane-supported-devices.html).
diff --git a/server/package-lock.json b/server/package-lock.json
index e7d4f474..6a05db6c 100644
--- a/server/package-lock.json
+++ b/server/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "scanservjs-server",
- "version": "2.8.1",
+ "version": "2.8.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/server/package.json b/server/package.json
index 11e9f978..d1d62e43 100644
--- a/server/package.json
+++ b/server/package.json
@@ -1,6 +1,6 @@
{
"name": "scanservjs-server",
- "version": "2.8.1",
+ "version": "2.8.2",
"description": "scanservjs is a simple web-based UI for SANE which allows you to share a scanner on a network without the need for drivers or complicated installation. scanserv does not do image conversion or manipulation (beyond the bare minimum necessary for the purposes of browser preview) or OCR.",
"scripts": {
"serve": "nodemon --exec 'vue-cli-service serve'",
diff --git a/server/src/context.js b/server/src/context.js
index 6a7c63f9..f3649d1b 100644
--- a/server/src/context.js
+++ b/server/src/context.js
@@ -3,8 +3,10 @@ const Config = require('./config');
const Devices = require('./devices');
const diagnostic = (path) => {
- const success = fs.existsSync(path);
- const message = success ? `Found ${path}` : `Unable to find ${path}`;
+ const exists = fs.existsSync(path);
+ const isDirectory = exists && fs.statSync(path).isDirectory();
+ const success = exists && !isDirectory;
+ const message = success ? `Found ${path}` : `Unable to find file ${path}`;
return {
success,
message
diff --git a/server/test/context.test.js b/server/test/context.test.js
new file mode 100644
index 00000000..a2c3a34b
--- /dev/null
+++ b/server/test/context.test.js
@@ -0,0 +1,15 @@
+/* eslint-env mocha */
+const assert = require('assert');
+const Config = require('../src/config');
+const Context = require('../src/context');
+
+describe('Context', () => {
+ it('missing files', () => {
+ const temp = Config.scanimage;
+ Config.scanimage = '/x';
+ const context = new Context([]);
+ assert.strictEqual(context.diagnostics.length, 2);
+ assert.strictEqual(context.diagnostics[0].success, false);
+ Config.scanimage = temp;
+ });
+});
\ No newline at end of file
diff --git a/webui/src/classes/constants.js b/webui/src/classes/constants.js
index 7e7d07a2..5ed4a8b7 100644
--- a/webui/src/classes/constants.js
+++ b/webui/src/classes/constants.js
@@ -2,9 +2,11 @@ const Constants = {
Version: process.env.VUE_APP_VERSION,
Locales: [
+ 'cz',
'de',
'en',
'es',
+ 'it',
'test'
],
diff --git a/webui/src/components/BatchDialog.vue b/webui/src/components/BatchDialog.vue
index aedcfee2..ce1fdacc 100644
--- a/webui/src/components/BatchDialog.vue
+++ b/webui/src/components/BatchDialog.vue
@@ -6,9 +6,9 @@
- Finish
- Rescan page
- Next
+ {{ $t('batch-dialog.btn-finish') }}
+ {{ $t('batch-dialog.btn-rescan') }}
+ {{ $t('batch-dialog.btn-next') }}
diff --git a/webui/src/locales/cz.json b/webui/src/locales/cz.json
new file mode 100644
index 00000000..bd1420b9
--- /dev/null
+++ b/webui/src/locales/cz.json
@@ -0,0 +1,89 @@
+{
+ "global": {
+ "application-name": "scanservjs"
+ },
+
+ "about": {
+ "main": "scanservjs je jednoduché webové uživatelské rozhraní pro váš skener. Umožňuje vám sdílet jeden nebo více skenerů (s využitím SANE) bez ovladačů nebo komplikované instalace. Umí ukládat do TIF, JPG, PNG, PDF a TXT (využívá Tesseract OCR) s různými nastaveními komprese, vše je možné konfigurovat. Podporuje vícestránkové skenování a všechna zařízení kompatibilní se SANE.",
+ "issue": "Ohlaste chybu nebo se podívejte na zdrojový kód:"
+ },
+
+ "batch-dialog": {
+ "btn-finish": "Dokončit",
+ "btn-rescan": "Znovu oskenovat stránku",
+ "btn-next": "Další"
+ },
+
+ "files": {
+ "filename": "Název souboru",
+ "date": "Datum",
+ "size": "Velikost",
+ "message:deleted": "Odstraněno"
+ },
+
+ "navigation": {
+ "scan": "Skenování",
+ "files": "Soubory",
+ "settings": "Nastavení",
+ "about": "Informace",
+ "version": "Verze"
+ },
+
+ "pipeline": {
+ "high-quality": "Vysoká kvalita",
+ "medium-quality": "Střední kvalita",
+ "low-quality": "Nízká kvalita",
+ "uncompressed": "Bez komprese",
+ "lzw-compressed": "S kompresí LZW",
+ "ocr": "OCR",
+ "text-file": "Textový soubor"
+ },
+
+ "scan": {
+ "device": "Zařízení",
+ "source": "Zdroj",
+ "resolution": "Rozlišení",
+ "mode": "Mód",
+ "dynamic-lineart": "Dynamická perokresba",
+ "dynamic-lineart:enabled": "Zapnuto",
+ "dynamic-lineart:disabled": "Vypnuto",
+ "batch": "Vícestránkový sken",
+ "batch:none": "Vypnuto",
+ "batch:manual": "Manuální (s výzvou)",
+ "batch:auto": "Automatický (Podavač dokumentů)",
+ "batch:auto-collate-standard": "Automatický (Kompletovat 1, 3... 4, 2)",
+ "batch:auto-collate-reverse": "Automatický (Obrátit 1, 3... 2, 4)",
+ "filters": "Filtry",
+ "filters:auto-level": "Automatické zarovnání",
+ "filters:threshold": "Prahová hodnota barev",
+ "filters:blur": "Rozmazané",
+ "format": "Formát",
+ "btn-preview": "Načíst náhled",
+ "btn-clear": "Vymazat",
+ "btn-scan": "Skenovat",
+ "btn-reset": "Resetovat",
+ "top": "Nahoře",
+ "left": "Vlevo",
+ "width": "Šířka",
+ "height": "Výška",
+ "brightness": "Jas",
+ "contrast": "Kontrast",
+ "message:loading-devices": "Načítání zařízení...",
+ "message:no-devices": "Nebyla nalezena žádná zařízení",
+ "message:deleted-preview": "Odstranit náhled",
+ "message:turn-documents": "Obrátit dokumenty",
+ "message:preview-of-page": "Náhled stránky"
+ },
+
+ "settings": {
+ "title": "@:navigation.settings",
+ "behaviour-ui": "Chování a uživatelské rozhraní",
+ "locale": "Lokalizace",
+ "locale:description": "Vyberte vaši lokalizaci",
+ "theme": "Motiv",
+ "theme:description": "Motiv. Pokud použijete systémový motiv a ten se změní, budete potřebovat přenačíst aplikaci.",
+ "theme:system": "Podle systému",
+ "theme:light": "Světlý",
+ "theme:dark": "Tmavý"
+ }
+}
\ No newline at end of file
diff --git a/webui/src/locales/it.json b/webui/src/locales/it.json
new file mode 100644
index 00000000..fdef18bf
--- /dev/null
+++ b/webui/src/locales/it.json
@@ -0,0 +1,89 @@
+{
+ "global": {
+ "application-name": "scanservjs"
+ },
+
+ "about": {
+ "main": "scanservjs è una semplice interfaccia web per il tuo scanner. Permette di condividere uno o più scanner (usando SANE) in una rete, senza necessità di driver o installazioni complicate. Può salvare nei formati TIF, JPG, PNG, PDF e TXT (via Tesseract OCR) con vari livelli di compressione. Supporta la scansione multi-pagina e tutti i dispositivi compatibili con SANE.",
+ "issue": "Segnala problemi o visualizza il codice sorgente:"
+ },
+
+ "batch-dialog": {
+ "btn-finish": "Finito",
+ "btn-rescan": "Ripeti scansione",
+ "btn-next": "Prossima pagina"
+ },
+
+ "files": {
+ "filename": "Nome file",
+ "date": "Data",
+ "size": "Dimensione",
+ "message:deleted": "Eliminato"
+ },
+
+ "navigation": {
+ "scan": "Scansiona",
+ "files": "File",
+ "settings": "Impostazioni",
+ "about": "Informazioni",
+ "version": "Versione"
+ },
+
+ "pipeline": {
+ "high-quality": "Qualità alta",
+ "medium-quality": "Qualità media",
+ "low-quality": "Qualità bassa",
+ "uncompressed": "Non compresso",
+ "lzw-compressed": "Conpresso con LZW",
+ "ocr": "OCR",
+ "text-file": "File di testo"
+ },
+
+ "scan": {
+ "device": "Dispositivo",
+ "source": "Sorgente",
+ "resolution": "Risoluzione",
+ "mode": "Modalità",
+ "dynamic-lineart": "Lineart dinamico",
+ "dynamic-lineart:enabled": "Abilitato",
+ "dynamic-lineart:disabled": "Disabilitato",
+ "batch": "Raggruppa",
+ "batch:none": "No",
+ "batch:manual": "Manuale (Con finestra guidata)",
+ "batch:auto": "Automatico (Cassetto dei documenti)",
+ "batch:auto-collate-standard": "Automatico (Fascicola 1, 3... 4, 2)",
+ "batch:auto-collate-reverse": "Automatico (Inverso 1, 3... 2, 4)",
+ "filters": "Filtri",
+ "filters:auto-level": "Livello automatico",
+ "filters:threshold": "Soglia",
+ "filters:blur": "Sfocatura",
+ "format": "Formato",
+ "btn-preview": "Anteprima",
+ "btn-clear": "Cancella",
+ "btn-scan": "Scansiona",
+ "btn-reset": "Ripristina",
+ "top": "Sopra",
+ "left": "Sinistra",
+ "width": "Larghezza",
+ "height": "Altezza",
+ "brightness": "Luminosità",
+ "contrast": "Contrasto",
+ "message:loading-devices": "Caricamento dispositivi...",
+ "message:no-devices": "Nessun dispositivo trovato",
+ "message:deleted-preview": "Anteprima eliminata",
+ "message:turn-documents": "Capovolgi i documenti",
+ "message:preview-of-page": "Anteprima della pagina"
+ },
+
+ "settings": {
+ "title": "@:navigation.settings",
+ "behaviour-ui": "Comportamento ed interfaccia",
+ "locale": "Lingua",
+ "locale:description": "Scegli la lingua",
+ "theme": "Tema",
+ "theme:description": "Tema. Se usi il tema Sistema e lo cambi, dovrai ricaricare l'app.",
+ "theme:system": "Sistema",
+ "theme:light": "Chiaro",
+ "theme:dark": "Scuro"
+ }
+}