├── l10n ├── .gitkeep ├── ko.json ├── si.json ├── sc.json ├── ko.js ├── is.json ├── sc.js ├── si.js ├── is.js ├── he.json ├── pt_PT.json ├── he.js ├── hr.json ├── pt_PT.js ├── hr.js ├── oc.json ├── oc.js ├── be.json ├── be.js ├── ast.json ├── ast.js ├── lt_LT.json ├── lt_LT.js ├── mk.json ├── vi.json ├── mk.js ├── vi.js ├── sl.json ├── fi.json ├── sl.js ├── it.json ├── fi.js ├── it.js ├── zh_CN.json ├── zh_CN.js ├── ja.json ├── ja.js ├── fa.json ├── fa.js ├── id.json ├── nb.json ├── da.json ├── id.js ├── uz.json ├── nb.js ├── da.js ├── uz.js ├── hu.json ├── bg.json ├── hu.js ├── ca.json ├── eu.json ├── nl.json ├── bg.js ├── ar.json ├── ca.js ├── es.json ├── eu.js ├── nl.js ├── es_CO.json ├── ar.js ├── es_EC.json ├── es.js ├── sr.json ├── el.json ├── sk.json ├── es_CO.js ├── es_EC.js ├── sr.js ├── el.js ├── fr.json ├── sk.js ├── fr.js ├── pl.json ├── ru.json ├── pl.js ├── ru.js ├── uk.json ├── zh_TW.json ├── uk.js ├── zh_TW.js ├── zh_HK.json ├── zh_HK.js ├── en_GB.json ├── en_GB.js ├── et_EE.json ├── sw.json ├── et_EE.js ├── sv.json ├── sw.js ├── sv.js ├── tr.json ├── ug.json ├── tr.js ├── de.json ├── ug.js ├── pt_BR.json ├── de.js ├── de_DE.json ├── pt_BR.js ├── de_DE.js ├── gl.json ├── ga.json ├── gl.js ├── ga.js ├── cs.json └── cs.js ├── .l10nignore ├── .eslintrc.cjs ├── screenshots └── checksum.gif ├── .gitignore ├── appinfo ├── routes.php └── info.xml ├── phpstan.neon ├── .exclude ├── .tx └── config ├── .php-cs-fixer.php ├── .php-cs-fixer.dist.php ├── bootstrap.php ├── vitest.config.ts ├── vite.config.js ├── src ├── Model │ └── Algorithms.ts ├── types │ └── index.ts ├── composables │ ├── useClipboard.ts │ ├── useChecksum.ts │ └── useByteRange.ts ├── main.ts └── views │ └── ChecksumTab.vue ├── psalm-baseline.xml ├── psalm.xml ├── tests ├── phpunit.xml └── Unit │ ├── useChecksum.spec.ts │ ├── useClipboard.spec.ts │ ├── useByteRange.spec.ts │ └── Controller │ └── ChecksumControllerTest.php ├── stylelint.config.js ├── tsconfig.json ├── README.md ├── composer.json ├── lib ├── Listener │ └── LoadSidebarListener.php ├── AppInfo │ └── Application.php └── Controller │ └── ChecksumController.php ├── scripts ├── README.md └── deploy.sh ├── package.json └── Changelog.md /l10n/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.l10nignore: -------------------------------------------------------------------------------- 1 | #webpack bundled files 2 | js/ 3 | README.md 4 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@nextcloud'], 3 | } 4 | -------------------------------------------------------------------------------- /screenshots/checksum.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westberliner/checksum/HEAD/screenshots/checksum.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | js/ 3 | *.lock 4 | *.cache 5 | tests/.phpunit.result.cache 6 | 7 | /vendor/ 8 | -------------------------------------------------------------------------------- /l10n/ko.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "파일을 찾을 수 없습니다." 3 | },"pluralForm" :"nplurals=1; plural=0;" 4 | } -------------------------------------------------------------------------------- /l10n/si.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "ගොනුව හමු නොවිණි." 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/sc.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "Archìviu no agatadu." 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/ko.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "파일을 찾을 수 없습니다." 5 | }, 6 | "nplurals=1; plural=0;"); 7 | -------------------------------------------------------------------------------- /l10n/is.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "Skrá fannst ekki." 3 | },"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);" 4 | } -------------------------------------------------------------------------------- /l10n/sc.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "Archìviu no agatadu." 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/si.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "ගොනුව හමු නොවිණි." 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/is.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "Skrá fannst ekki." 5 | }, 6 | "nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"); 7 | -------------------------------------------------------------------------------- /l10n/he.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "הקובץ לא נמצא." 3 | },"pluralForm" :"nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;" 4 | } -------------------------------------------------------------------------------- /appinfo/routes.php: -------------------------------------------------------------------------------- 1 | [ 7 | ['name' => 'checksum#check', 'url' => '/check', 'verb' => 'GET'] 8 | ]]; 9 | -------------------------------------------------------------------------------- /l10n/pt_PT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "Ficheiro não encontrado" 3 | },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 4 | } -------------------------------------------------------------------------------- /l10n/he.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "הקובץ לא נמצא." 5 | }, 6 | "nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;"); 7 | -------------------------------------------------------------------------------- /l10n/hr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "Datoteka nije pronađena." 3 | },"pluralForm" :"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;" 4 | } -------------------------------------------------------------------------------- /l10n/pt_PT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "Ficheiro não encontrado" 5 | }, 6 | "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 7 | -------------------------------------------------------------------------------- /l10n/hr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "Datoteka nije pronađena." 5 | }, 6 | "nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;"); 7 | -------------------------------------------------------------------------------- /phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 6 3 | paths: 4 | - lib 5 | - tests 6 | bootstrapFiles: 7 | - bootstrap.php 8 | checkGenericClassInNonGenericObjectType: false 9 | reportUnmatchedIgnoredErrors: false 10 | -------------------------------------------------------------------------------- /l10n/oc.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "Fichièr pas trobat", 3 | "Checksum" : "Contraròtle de soma", 4 | "Creating a hash checksum of a file." : "Creacion d’una emprenta de verificacion per un fichièr." 5 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 6 | } -------------------------------------------------------------------------------- /l10n/oc.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "Fichièr pas trobat", 5 | "Checksum" : "Contraròtle de soma", 6 | "Creating a hash checksum of a file." : "Creacion d’una emprenta de verificacion per un fichièr." 7 | }, 8 | "nplurals=2; plural=(n > 1);"); 9 | -------------------------------------------------------------------------------- /.exclude: -------------------------------------------------------------------------------- 1 | .* 2 | ./webpack.*.js 3 | ./stylelint.config.js 4 | ./vite.config.js 5 | ./vitest.config.ts 6 | ./*.json 7 | *.log 8 | *.lock 9 | ./node_modules 10 | ./src 11 | ./vendor 12 | ./tests 13 | ./bootstrap.php 14 | ./scripts 15 | *.neon 16 | *.spec.ts 17 | *.test.ts 18 | psalm.xml 19 | psalm-baseline.xml -------------------------------------------------------------------------------- /l10n/be.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "File not found." : "Файл не знойдзены.", 3 | "Checksum" : "Кантрольная сума", 4 | "Choose Algorithm" : "Выберыце алгарытм" 5 | },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" 6 | } -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | lang_map = sk_SK: sk, th_TH: th, ja_JP: ja, bg_BG: bg, cs_CZ: cs, fi_FI: fi, hu_HU: hu, nb_NO: nb 4 | 5 | [o:nextcloud:p:nextcloud:r:checksum] 6 | file_filter = translationfiles//checksum.po 7 | source_file = translationfiles/templates/checksum.pot 8 | source_lang = en 9 | type = PO 10 | 11 | -------------------------------------------------------------------------------- /l10n/be.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "File not found." : "Файл не знойдзены.", 5 | "Checksum" : "Кантрольная сума", 6 | "Choose Algorithm" : "Выберыце алгарытм" 7 | }, 8 | "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); 9 | -------------------------------------------------------------------------------- /l10n/ast.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipu d'algoritmu «%s» nun ye válidu nin compatible.", 3 | "File not found." : "Nun s'atopó'l ficheru.", 4 | "Checksum" : "Suma de comprobación", 5 | "Hash copied to clipboard." : "El hash copióse nel cartafueyu." 6 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 7 | } -------------------------------------------------------------------------------- /.php-cs-fixer.php: -------------------------------------------------------------------------------- 1 | getFinder() 12 | ->ignoreVCSIgnored(true) 13 | ->notPath('build') 14 | ->notPath('l10n') 15 | ->notPath('src') 16 | ->notPath('vendor') 17 | ->in(__DIR__); 18 | return $config; 19 | 20 | -------------------------------------------------------------------------------- /l10n/ast.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipu d'algoritmu «%s» nun ye válidu nin compatible.", 5 | "File not found." : "Nun s'atopó'l ficheru.", 6 | "Checksum" : "Suma de comprobación", 7 | "Hash copied to clipboard." : "El hash copióse nel cartafueyu." 8 | }, 9 | "nplurals=2; plural=(n != 1);"); 10 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | getFinder() 12 | ->notPath('js') 13 | ->notPath('l10n') 14 | ->notPath('src') 15 | ->notPath('node_modules') 16 | ->notPath('src') 17 | ->notPath('vendor') 18 | ->in(__DIR__); 19 | return $config; 20 | -------------------------------------------------------------------------------- /l10n/lt_LT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmo tipas „%s“ nėra tinkamas ar palaikomas algoritmo tipas.", 3 | "File not found." : "Failas nerastas.", 4 | "Checksum" : "Kontrolinė suma" 5 | },"pluralForm" :"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);" 6 | } -------------------------------------------------------------------------------- /l10n/lt_LT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmo tipas „%s“ nėra tinkamas ar palaikomas algoritmo tipas.", 5 | "File not found." : "Failas nerastas.", 6 | "Checksum" : "Kontrolinė suma" 7 | }, 8 | "nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);"); 9 | -------------------------------------------------------------------------------- /l10n/mk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Видот на алгоритмот \"%s\" не е валиден или поддржан вид.", 3 | "File not found." : "Датотеката не е пронајдена.", 4 | "Checksum" : "Контролна сума", 5 | "Creating a hash checksum of a file." : "Креирај контролна сума од датотека.", 6 | "Choose Algorithm" : "Избери алгоритам" 7 | },"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;" 8 | } -------------------------------------------------------------------------------- /l10n/vi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Loại thuật toán \"%s\" không khả dụng hoặc là một loại thuật toán không được hỗ trợ.", 3 | "File not found." : "Không tìm thấy tệp tin.", 4 | "Checksum" : "Giá trị tổng kiểm", 5 | "Creating a hash checksum of a file." : "Đang tạo một mã băm giá trị tổng kiểm của tệp tin. ", 6 | "Choose Algorithm" : "Chọn Thuật Toán" 7 | },"pluralForm" :"nplurals=1; plural=0;" 8 | } -------------------------------------------------------------------------------- /l10n/mk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Видот на алгоритмот \"%s\" не е валиден или поддржан вид.", 5 | "File not found." : "Датотеката не е пронајдена.", 6 | "Checksum" : "Контролна сума", 7 | "Creating a hash checksum of a file." : "Креирај контролна сума од датотека.", 8 | "Choose Algorithm" : "Избери алгоритам" 9 | }, 10 | "nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"); 11 | -------------------------------------------------------------------------------- /l10n/vi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Loại thuật toán \"%s\" không khả dụng hoặc là một loại thuật toán không được hỗ trợ.", 5 | "File not found." : "Không tìm thấy tệp tin.", 6 | "Checksum" : "Giá trị tổng kiểm", 7 | "Creating a hash checksum of a file." : "Đang tạo một mã băm giá trị tổng kiểm của tệp tin. ", 8 | "Choose Algorithm" : "Chọn Thuật Toán" 9 | }, 10 | "nplurals=1; plural=0;"); 11 | -------------------------------------------------------------------------------- /bootstrap.php: -------------------------------------------------------------------------------- 1 | addPsr4('OCP\\', $serverPath . '/lib/public', true); 13 | $classLoader->addPsr4('OC\\', $serverPath . '/lib/private', true); 14 | $classLoader->register(); 15 | -------------------------------------------------------------------------------- /l10n/sl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Vrsta algoritma »%s« ni veljavna oziroma podprta vrsta algoritma.", 3 | "File not found." : "Datoteke ni mogoče najti.", 4 | "Checksum" : "Nadzorna koda", 5 | "Creating a hash checksum of a file." : "Ustvarjanje nadzorne kode skladnosti datoteke.", 6 | "Choose Algorithm" : "Izbor algoritma" 7 | },"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" 8 | } -------------------------------------------------------------------------------- /l10n/fi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmityyppi \"%s\" ei ole kelvollinen tai tuettu algoritmityyppi.", 3 | "File not found." : "Tiedostoa ei löytynyt.", 4 | "Checksum" : "Tarkistussumma", 5 | "Creating a hash checksum of a file." : "Luodaan tarkistussumma tiedostolle.", 6 | "Hash copied to clipboard." : "Tarkistussumma kopioitu leikepöydälle.", 7 | "Choose Algorithm" : "Valitse algoritmi" 8 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 9 | } -------------------------------------------------------------------------------- /l10n/sl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Vrsta algoritma »%s« ni veljavna oziroma podprta vrsta algoritma.", 5 | "File not found." : "Datoteke ni mogoče najti.", 6 | "Checksum" : "Nadzorna koda", 7 | "Creating a hash checksum of a file." : "Ustvarjanje nadzorne kode skladnosti datoteke.", 8 | "Choose Algorithm" : "Izbor algoritma" 9 | }, 10 | "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"); 11 | -------------------------------------------------------------------------------- /l10n/it.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Il tipo di algoritmo \"%s\" non è valido o non è supportato.", 3 | "File not found." : "File non trovato.", 4 | "Checksum" : "Checksum", 5 | "Creating a hash checksum of a file." : "Creazione di un checksum hash di un file.", 6 | "Hash copied to clipboard." : "Hash copiato negli appunti.", 7 | "Choose Algorithm" : "Scegli algoritmo" 8 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 9 | } -------------------------------------------------------------------------------- /l10n/fi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmityyppi \"%s\" ei ole kelvollinen tai tuettu algoritmityyppi.", 5 | "File not found." : "Tiedostoa ei löytynyt.", 6 | "Checksum" : "Tarkistussumma", 7 | "Creating a hash checksum of a file." : "Luodaan tarkistussumma tiedostolle.", 8 | "Hash copied to clipboard." : "Tarkistussumma kopioitu leikepöydälle.", 9 | "Choose Algorithm" : "Valitse algoritmi" 10 | }, 11 | "nplurals=2; plural=(n != 1);"); 12 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config' 2 | import vue from '@vitejs/plugin-vue' 3 | import { resolve } from 'path' 4 | 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@': resolve(__dirname, 'src'), 10 | }, 11 | }, 12 | test: { 13 | globals: true, 14 | environment: 'happy-dom', 15 | coverage: { 16 | reporter: ['text', 'json', 'html'], 17 | exclude: [ 18 | 'node_modules/', 19 | 'tests/', 20 | '**/*.spec.ts', 21 | '**/*.test.ts', 22 | ], 23 | }, 24 | }, 25 | }) 26 | 27 | -------------------------------------------------------------------------------- /l10n/it.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Il tipo di algoritmo \"%s\" non è valido o non è supportato.", 5 | "File not found." : "File non trovato.", 6 | "Checksum" : "Checksum", 7 | "Creating a hash checksum of a file." : "Creazione di un checksum hash di un file.", 8 | "Hash copied to clipboard." : "Hash copiato negli appunti.", 9 | "Choose Algorithm" : "Scegli algoritmo" 10 | }, 11 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 12 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { createAppConfig } from "@nextcloud/vite-config"; 2 | import { join, resolve } from "path"; 3 | 4 | const customConfig = { 5 | resolve: { 6 | alias: { 7 | "@": resolve("src"), 8 | }, 9 | }, 10 | css: { 11 | preprocessorOptions: { 12 | scss: { 13 | api: "modern-compiler", 14 | }, 15 | }, 16 | }, 17 | }; 18 | export default createAppConfig( 19 | { 20 | main: resolve(join("src", "main.ts")), 21 | }, 22 | { 23 | inlineCSS: { relativeCSSInjection: true }, 24 | config: customConfig, 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/Model/Algorithms.ts: -------------------------------------------------------------------------------- 1 | import { translate as t } from "@nextcloud/l10n"; 2 | import type { Algorithm } from "@/types"; 3 | 4 | const algorithms: Algorithm[] = [ 5 | { id: "", label: t("checksum", "Choose Algorithm") }, 6 | { id: "md5", label: "MD5" }, 7 | { id: "sha1", label: "SHA1" }, 8 | { id: "sha256", label: "SHA256" }, 9 | { id: "sha384", label: "SHA384" }, 10 | { id: "sha512", label: "SHA512" }, 11 | { id: "sha3-256", label: "SHA3-256" }, 12 | { id: "sha3-512", label: "SHA3-512" }, 13 | { id: "crc32", label: "CRC32" }, 14 | { id: "crc32b", label: "CRC32b" }, 15 | ]; 16 | 17 | export default algorithms; 18 | -------------------------------------------------------------------------------- /psalm-baseline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /psalm.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | ../lib 17 | 18 | 19 | ../vendor 20 | 21 | 22 | 23 | 24 | ./Unit 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /stylelint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "stylelint-config-recommended-scss", 3 | rules: { 4 | indentation: "tab", 5 | "selector-type-no-unknown": null, 6 | "number-leading-zero": null, 7 | "rule-empty-line-before": [ 8 | "always", 9 | { 10 | ignore: ["after-comment", "inside-block"], 11 | }, 12 | ], 13 | "declaration-empty-line-before": [ 14 | "never", 15 | { 16 | ignore: ["after-declaration"], 17 | }, 18 | ], 19 | "comment-empty-line-before": null, 20 | "selector-type-case": null, 21 | "selector-list-comma-newline-after": null, 22 | "no-descending-specificity": null, 23 | "string-quotes": "single", 24 | "selector-pseudo-element-no-unknown": [ 25 | true, 26 | { 27 | ignorePseudoElements: ["v-deep"], 28 | }, 29 | ], 30 | }, 31 | plugins: ["stylelint-scss"], 32 | }; 33 | -------------------------------------------------------------------------------- /l10n/zh_CN.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "“%s”算法无效或不受支持", 3 | "File not found." : "未找到文件", 4 | "Checksum" : "校验和", 5 | "Creating a hash checksum of a file." : "创建文件的哈希校验和", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "允许用户为文件创建一个哈希校验和\n 可以使用 md5,sha1,sha256,sha384,sha512,sha3-256,sha3-512 以及 crc32 算法。\n\n 打开文件(侧边栏)的详情视图,将会看到一个新的“校验和”选项卡。\n 选择一个算法后将会生成哈希值。\n 如果你想使用其他算法,点击重载按钮即可。", 7 | "Hash copied to clipboard." : "哈希值已复制到剪贴板", 8 | "Choose Algorithm" : "选择算法" 9 | },"pluralForm" :"nplurals=1; plural=0;" 10 | } -------------------------------------------------------------------------------- /l10n/zh_CN.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "“%s”算法无效或不受支持", 5 | "File not found." : "未找到文件", 6 | "Checksum" : "校验和", 7 | "Creating a hash checksum of a file." : "创建文件的哈希校验和", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "允许用户为文件创建一个哈希校验和\n 可以使用 md5,sha1,sha256,sha384,sha512,sha3-256,sha3-512 以及 crc32 算法。\n\n 打开文件(侧边栏)的详情视图,将会看到一个新的“校验和”选项卡。\n 选择一个算法后将会生成哈希值。\n 如果你想使用其他算法,点击重载按钮即可。", 9 | "Hash copied to clipboard." : "哈希值已复制到剪贴板", 10 | "Choose Algorithm" : "选择算法" 11 | }, 12 | "nplurals=1; plural=0;"); 13 | -------------------------------------------------------------------------------- /l10n/ja.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "アルゴリズム \"%s\" は有効でないか、サポートされていません。", 3 | "File not found." : "ファイルが見つかりません", 4 | "Checksum" : "チェックサム", 5 | "Creating a hash checksum of a file." : "ファイルのハッシュ値を作成しています。", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "ファイルのハッシュチェックで使用可能なアルゴリズムは、md5、sha1、sha256、sha384、sha512、sha3-256、sha3-512、crc32です。\n\nファイルの詳細(サイドバー)を開いてください。チェックサムという新しいタブがあります。\nアルゴリズムを選択すると、ハッシュ値が生成されます。\n 他のアルゴリズムが必要な場合は、更新ボタンをクリックしてください。", 7 | "Hash copied to clipboard." : "ハッシュ値をクリップボードにコピー", 8 | "Choose Algorithm" : "アルゴリズムを選択" 9 | },"pluralForm" :"nplurals=1; plural=0;" 10 | } -------------------------------------------------------------------------------- /l10n/ja.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "アルゴリズム \"%s\" は有効でないか、サポートされていません。", 5 | "File not found." : "ファイルが見つかりません", 6 | "Checksum" : "チェックサム", 7 | "Creating a hash checksum of a file." : "ファイルのハッシュ値を作成しています。", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "ファイルのハッシュチェックで使用可能なアルゴリズムは、md5、sha1、sha256、sha384、sha512、sha3-256、sha3-512、crc32です。\n\nファイルの詳細(サイドバー)を開いてください。チェックサムという新しいタブがあります。\nアルゴリズムを選択すると、ハッシュ値が生成されます。\n 他のアルゴリズムが必要な場合は、更新ボタンをクリックしてください。", 9 | "Hash copied to clipboard." : "ハッシュ値をクリップボードにコピー", 10 | "Choose Algorithm" : "アルゴリズムを選択" 11 | }, 12 | "nplurals=1; plural=0;"); 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | "compilerOptions": { 4 | "target": "ES2020", 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "jsx": "preserve", 8 | "moduleResolution": "bundler", 9 | "resolveJsonModule": true, 10 | "allowImportingTsExtensions": true, 11 | "allowJs": true, 12 | "checkJs": false, 13 | "strict": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noFallthroughCasesInSwitch": true, 17 | "skipLibCheck": true, 18 | "esModuleInterop": true, 19 | "allowSyntheticDefaultImports": true, 20 | "forceConsistentCasingInFileNames": true, 21 | "isolatedModules": true, 22 | "noEmit": true, 23 | "types": ["vite/client"], 24 | "baseUrl": ".", 25 | "paths": { 26 | "@/*": ["./src/*"] 27 | } 28 | }, 29 | "include": [ 30 | "src/**/*.ts", 31 | "src/**/*.tsx", 32 | "src/**/*.vue" 33 | ], 34 | "exclude": [ 35 | "node_modules", 36 | "dist" 37 | ] 38 | } 39 | 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Checksum 2 | 3 | **Plugin for [Nextcloud](https://nextcloud.com) to create hashes of files.** 4 | 5 | ![animation](screenshots/checksum.gif) 6 | 7 | ## Installation 8 | 9 | In your Instance, simply navigate to »Apps«, choose the category »Files«, find the Checksum app and enable it. 10 | 11 | ## Usage 12 | 13 | Just open the details view of the file (Sidebar). There should be a new tab called "Checksum". Select a algorithm and it will try to generate a hash. If you want an other algorithm, just click on the reload button. 14 | 15 | Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32. 16 | 17 | ## Translation 18 | 19 | If your language is missing, feel free to translate your language under [transifex](https://www.transifex.com/nextcloud/nextcloud/checksum/). 20 | 21 | If you are not already a member of the transifex nextcloud project create an account and join the project. 22 | 23 | ## Compatibility 24 | 25 | - This app was only tested on Nextcloud v20 to v21 and php v7.(2|4). 26 | - For older nextcloud versions check older releases. 27 | -------------------------------------------------------------------------------- /src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2021 Patrick Herzberg 3 | * 4 | * @author Patrick Herzberg 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | export interface Algorithm { 24 | id: string; 25 | label: string; 26 | } 27 | 28 | export interface FileInfo { 29 | path: string; 30 | name: string; 31 | size?: number; 32 | type?: string; 33 | } 34 | 35 | export interface ChecksumResponse { 36 | response: "success" | "error"; 37 | msg: string; 38 | } 39 | -------------------------------------------------------------------------------- /l10n/fa.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "نوع الگوریتم \"%s\" معتبر نیست یا پشتیبانی نمی‌شود.", 3 | "File not found." : "فایل یافت نشد.", 4 | "Checksum" : "جمع‌آزما", 5 | "Creating a hash checksum of a file." : "در حال ساخت هش جمع‌آزمای فایل", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button.", 7 | "Hash copied to clipboard." : "Hash copied to clipboard.", 8 | "Choose Algorithm" : "انتخاب الگوریتم" 9 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 10 | } -------------------------------------------------------------------------------- /l10n/fa.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "نوع الگوریتم \"%s\" معتبر نیست یا پشتیبانی نمی‌شود.", 5 | "File not found." : "فایل یافت نشد.", 6 | "Checksum" : "جمع‌آزما", 7 | "Creating a hash checksum of a file." : "در حال ساخت هش جمع‌آزمای فایل", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button.", 9 | "Hash copied to clipboard." : "Hash copied to clipboard.", 10 | "Choose Algorithm" : "انتخاب الگوریتم" 11 | }, 12 | "nplurals=2; plural=(n > 1);"); 13 | -------------------------------------------------------------------------------- /l10n/id.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Tipe algoritma \"%s\" bukan tipe algoritma yang valid atau didukung.", 3 | "File not found." : "Berkas tidak ditemukan.", 4 | "Checksum" : "Checksum", 5 | "Creating a hash checksum of a file." : "Membuat checksum hash berkas.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Izinkan pengguna untuk membuat checksum hash berkas.\n Algoritma yang dapat digunakan adalah md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512, dan crc32.\n\n Cukup buka tampilan detail dari berkas (Bilah Sisi). Harus ada tab baru yang disebut \"Checksum\".\n Pilih algoritma dan hash akan dihasilkan.\n Jika Anda ingin algoritma lain, cukup klik tombol muat ulang.", 7 | "Hash copied to clipboard." : "Hash disalin ke papan klip.", 8 | "Choose Algorithm" : "Pilih Algoritma" 9 | },"pluralForm" :"nplurals=1; plural=0;" 10 | } -------------------------------------------------------------------------------- /l10n/nb.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmetypen \"%s\" er ikke en gyldig eller støttet algoritmetype.", 3 | "File not found." : "Filen ble ikke funnet.", 4 | "Checksum" : "Sjekksum", 5 | "Creating a hash checksum of a file." : "Oppretter en hash-sjekksum for en fil.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Lar brukere opprette en hash-sjekksum for en fil.\n Mulige algoritmer er md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 og crc32.\n\n Bare åpne detaljvisningen av filen (sidefelt). Det skal være en ny fane kalt \"Sjekksum\".\n Velg en algoritme og den vil prøve å generere en hash.\n Hvis du vil ha en annen algoritme, klikker du bare på reload-knappen. ", 7 | "Hash copied to clipboard." : "Hash kopiert til utklippstavlen.", 8 | "Choose Algorithm" : "Velg Algoritme" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/da.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmetypen \"%s\" er ikke en gyldig eller ikke understøttet algoritmetype.", 3 | "File not found." : "Fil ikke fundet.", 4 | "Checksum" : "Checksum", 5 | "Creating a hash checksum of a file." : "Oprettelse af en hash-checksum af en fil.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Tillader brugere at oprette en hash-checksum af en fil.\nMulige algoritmer er md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 og crc32.\n\nÅbn blot detaljeringsvisningen af ​​filen (sidebjælke). Der skulle være en ny fane kaldet \"Checksum\".\nVælg en algoritme, og den vil forsøge at generere en hash.\nHvis du vil have en anden algoritme, skal du blot klikke på genindlæs-knappen.", 7 | "Hash copied to clipboard." : "Hash kopieret til udklipsholder.", 8 | "Choose Algorithm" : "Vælg algoritme" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/id.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Tipe algoritma \"%s\" bukan tipe algoritma yang valid atau didukung.", 5 | "File not found." : "Berkas tidak ditemukan.", 6 | "Checksum" : "Checksum", 7 | "Creating a hash checksum of a file." : "Membuat checksum hash berkas.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Izinkan pengguna untuk membuat checksum hash berkas.\n Algoritma yang dapat digunakan adalah md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512, dan crc32.\n\n Cukup buka tampilan detail dari berkas (Bilah Sisi). Harus ada tab baru yang disebut \"Checksum\".\n Pilih algoritma dan hash akan dihasilkan.\n Jika Anda ingin algoritma lain, cukup klik tombol muat ulang.", 9 | "Hash copied to clipboard." : "Hash disalin ke papan klip.", 10 | "Choose Algorithm" : "Pilih Algoritma" 11 | }, 12 | "nplurals=1; plural=0;"); 13 | -------------------------------------------------------------------------------- /l10n/uz.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : " \"%s\" algoritm turi haqiqiy yoki qo'llab-quvvatlanadigan algoritm turi emas.", 3 | "File not found." : "Fayl topilmadi.", 4 | "Checksum" : "Tekshirish summasi", 5 | "Creating a hash checksum of a file." : "Faylning Xash summasini yaratish.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Foydalanuvchilarga faylning Xash summasini yaratishga imkon beradi.\nMumkin algoritmlar md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 va crc32 bor.\n\nFaqat faylning tafsilotlar ko'rinishini oching (yon Panel). \"Checksum\"deb nomlangan yangi yorliq bo'lishi kerak.\nAlgoritmni tanlang va u Xash yaratishga harakat qiladi.\nAgar siz boshqa algoritmni xohlasangiz, qayta yuklash tugmasini bosing.", 7 | "Hash copied to clipboard." : "Xash buferga ko'chirilmoqda.", 8 | "Choose Algorithm" : "Algoritmni Tanlang" 9 | },"pluralForm" :"nplurals=1; plural=0;" 10 | } -------------------------------------------------------------------------------- /l10n/nb.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmetypen \"%s\" er ikke en gyldig eller støttet algoritmetype.", 5 | "File not found." : "Filen ble ikke funnet.", 6 | "Checksum" : "Sjekksum", 7 | "Creating a hash checksum of a file." : "Oppretter en hash-sjekksum for en fil.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Lar brukere opprette en hash-sjekksum for en fil.\n Mulige algoritmer er md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 og crc32.\n\n Bare åpne detaljvisningen av filen (sidefelt). Det skal være en ny fane kalt \"Sjekksum\".\n Velg en algoritme og den vil prøve å generere en hash.\n Hvis du vil ha en annen algoritme, klikker du bare på reload-knappen. ", 9 | "Hash copied to clipboard." : "Hash kopiert til utklippstavlen.", 10 | "Choose Algorithm" : "Velg Algoritme" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /l10n/da.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmetypen \"%s\" er ikke en gyldig eller ikke understøttet algoritmetype.", 5 | "File not found." : "Fil ikke fundet.", 6 | "Checksum" : "Checksum", 7 | "Creating a hash checksum of a file." : "Oprettelse af en hash-checksum af en fil.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Tillader brugere at oprette en hash-checksum af en fil.\nMulige algoritmer er md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 og crc32.\n\nÅbn blot detaljeringsvisningen af ​​filen (sidebjælke). Der skulle være en ny fane kaldet \"Checksum\".\nVælg en algoritme, og den vil forsøge at generere en hash.\nHvis du vil have en anden algoritme, skal du blot klikke på genindlæs-knappen.", 9 | "Hash copied to clipboard." : "Hash kopieret til udklipsholder.", 10 | "Choose Algorithm" : "Vælg algoritme" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /l10n/uz.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : " \"%s\" algoritm turi haqiqiy yoki qo'llab-quvvatlanadigan algoritm turi emas.", 5 | "File not found." : "Fayl topilmadi.", 6 | "Checksum" : "Tekshirish summasi", 7 | "Creating a hash checksum of a file." : "Faylning Xash summasini yaratish.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Foydalanuvchilarga faylning Xash summasini yaratishga imkon beradi.\nMumkin algoritmlar md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 va crc32 bor.\n\nFaqat faylning tafsilotlar ko'rinishini oching (yon Panel). \"Checksum\"deb nomlangan yangi yorliq bo'lishi kerak.\nAlgoritmni tanlang va u Xash yaratishga harakat qiladi.\nAgar siz boshqa algoritmni xohlasangiz, qayta yuklash tugmasini bosing.", 9 | "Hash copied to clipboard." : "Xash buferga ko'chirilmoqda.", 10 | "Choose Algorithm" : "Algoritmni Tanlang" 11 | }, 12 | "nplurals=1; plural=0;"); 13 | -------------------------------------------------------------------------------- /l10n/hu.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "A(z) „%s” algoritmustípus nem érvényes vagy nem támogatott.", 3 | "File not found." : "A fájl nem található.", 4 | "Checksum" : "Ellenőrzőösszeg", 5 | "Creating a hash checksum of a file." : "Fájlok ellenőrzőösszegének előállítása.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Lehetővé teszi, hogy előállítsa egy fájl ellenőrzőösszegét.\n A lehetséges algoritmusok: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 és crc32.\n\n Csak nyissa meg a fájl részleteit (oldalsáv). Ott kell lennie egy új „Ellenőrzőösszeg” lapnak.\n Válasszon egy algoritmust, és megpróbálja előállítani az ellenőrzőösszeget.\n Ha másik algoritmust szeretne, csak kattintson az újratöltés gombra.", 7 | "Hash copied to clipboard." : "Ellenőrzőösszeg a vágólapra másolva.", 8 | "Choose Algorithm" : "Válasszon algoritmust" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/bg.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Алгоритъм тип \"%s\" е невалиден или е тип алгоритъм, който не се поддържа.", 3 | "File not found." : "Файлът не е намерен", 4 | "Checksum" : "Контролна сума", 5 | "Creating a hash checksum of a file." : "Създаване на контролна хеш сума на файл.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Позволява на потребителите да създават контролна хеш сума на файл.\n Възможните алгоритми са md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 и crc32. \n\n Просто отворете изглед с подробности за файла (страничната лента). Там трябва да има нов раздел, наречен „Контролна сума“. \n Изберете алгоритъм и той ще се опита да генерира хеш. \n Ако искате друг алгоритъм, просто щракнете върху бутон за презареждане.", 7 | "Hash copied to clipboard." : "Хешът е копиран в клипборда.", 8 | "Choose Algorithm" : "Изберете Алгоритъм" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/hu.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "A(z) „%s” algoritmustípus nem érvényes vagy nem támogatott.", 5 | "File not found." : "A fájl nem található.", 6 | "Checksum" : "Ellenőrzőösszeg", 7 | "Creating a hash checksum of a file." : "Fájlok ellenőrzőösszegének előállítása.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Lehetővé teszi, hogy előállítsa egy fájl ellenőrzőösszegét.\n A lehetséges algoritmusok: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 és crc32.\n\n Csak nyissa meg a fájl részleteit (oldalsáv). Ott kell lennie egy új „Ellenőrzőösszeg” lapnak.\n Válasszon egy algoritmust, és megpróbálja előállítani az ellenőrzőösszeget.\n Ha másik algoritmust szeretne, csak kattintson az újratöltés gombra.", 9 | "Hash copied to clipboard." : "Ellenőrzőösszeg a vágólapra másolva.", 10 | "Choose Algorithm" : "Válasszon algoritmust" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "westberliner/checksum", 3 | "description": "Nextcloud app - Creating a hash checksum of a file.", 4 | "license": "AGPL", 5 | "authors": [ 6 | { 7 | "name": "Patrick", 8 | "email": "patrick@westberliner.net" 9 | } 10 | ], 11 | "require-dev": { 12 | "nextcloud/coding-standard": "^1.2", 13 | "nextcloud/ocp": "dev-master", 14 | "phpunit/phpunit": "^9.5", 15 | "vimeo/psalm": "^5.0" 16 | }, 17 | "config": { 18 | "optimize-autoloader": true, 19 | "classmap-authoritative": true, 20 | "platform": { 21 | "php": "8.1" 22 | }, 23 | "allow-plugins": { 24 | "php-http/discovery": true 25 | } 26 | }, 27 | "autoload-dev": { 28 | "psr-4": { 29 | "OCA\\Checksum\\": "lib/" 30 | } 31 | }, 32 | "minimum-stability": "stable", 33 | "scripts": { 34 | "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l", 35 | "cs:check": "php-cs-fixer fix --dry-run --diff", 36 | "cs:fix": "php-cs-fixer fix", 37 | "psalm": "psalm --no-diff", 38 | "psalm:update-baseline": "psalm --update-baseline", 39 | "psalm:clear": "psalm --clear-cache && psalm --clear-global-cache", 40 | "psalm:fix": "psalm --alter --issues=all --dry-run", 41 | "test:unit": "phpunit --configuration tests/phpunit.xml" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /l10n/ca.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipus d'algoritme \"%s\" no és un tipus vàlid o suportat.", 3 | "File not found." : "No s'ha trobat el fitxer.", 4 | "Checksum" : "Resum de verificació", 5 | "Creating a hash checksum of a file." : "Creant una suma de verificació de un fitxer", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permet als usuaris crear un resum de verificació (hash) d'un fitxer.\n Els algorismes possibles són md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 i crc32.\n\n Només heu d'obrir la vista de detalls del fitxer (barra lateral). Hi hauria d'haver una pestanya nova anomenada \"Resum de verificació\".\n Seleccioneu un algorisme i intentarà generar un resum.\n Si voleu un altre algorisme, feu clic al botó de recarregar.", 7 | "Hash copied to clipboard." : "Resum copiat al porta-retalls.", 8 | "Choose Algorithm" : "Trieu Algoritme" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/eu.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : " \"%s\" algoritmo mota ez da baliozko edo onartzen den algoritmo mota bat.", 3 | "File not found." : "Ez da fitxategirik aurkitu.", 4 | "Checksum" : "Egiaztapeneko batura", 5 | "Creating a hash checksum of a file." : "Fitxategiaren egiaztapeneko batura sortzen.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Erabiltzaileei fitxategi baten egiaztapeneko batura sortzeko aukera ematen die.\nAlgoritmo posibleak md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 eta crc32 dira.\n\n Ireki fitxategiaren xehetasunen ikuspegia (alboko barran). \"Egiaztapeneko batura\" izeneko fitxa berri bat egon beharko litzateke.\n  Hautatu algoritmo bat eta hash bat sortzen saiatuko da.\n  Beste algoritmo bat nahi baduzu, egin klik berriro kargatu botoian.", 7 | "Hash copied to clipboard." : "Batura arbelera kopiatu da.", 8 | "Choose Algorithm" : "Aukeratu algoritmoa" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/nl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Het algoritmetype \"%s\" is geen geldig of ondersteund algoritmetype.", 3 | "File not found." : "Bestand niet gevonden.", 4 | "Checksum" : "Controlesom", 5 | "Creating a hash checksum of a file." : "Een hash-controlesom van het bestand maken.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Hiermee kunnen gebruikers een hash-controlesom van een bestand maken.\n Mogelijke algoritmes zijn md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 en crc32.\n\n Open simpelweg de detailweergave van het bestand (Zijbalk). Er zou een nieuw tabblad moeten zijn met de naam \"Controlesom\".\n Selecteer een algoritme en het zal proberen een hash te genereren.\n Als u een ander algoritme wilt, klikt u simpelweg op de herlaadknop.", 7 | "Hash copied to clipboard." : "Hash gekopieerd naar het klembord.", 8 | "Choose Algorithm" : "Kies Algoritme" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/bg.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Алгоритъм тип \"%s\" е невалиден или е тип алгоритъм, който не се поддържа.", 5 | "File not found." : "Файлът не е намерен", 6 | "Checksum" : "Контролна сума", 7 | "Creating a hash checksum of a file." : "Създаване на контролна хеш сума на файл.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Позволява на потребителите да създават контролна хеш сума на файл.\n Възможните алгоритми са md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 и crc32. \n\n Просто отворете изглед с подробности за файла (страничната лента). Там трябва да има нов раздел, наречен „Контролна сума“. \n Изберете алгоритъм и той ще се опита да генерира хеш. \n Ако искате друг алгоритъм, просто щракнете върху бутон за презареждане.", 9 | "Hash copied to clipboard." : "Хешът е копиран в клипборда.", 10 | "Choose Algorithm" : "Изберете Алгоритъм" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /l10n/ar.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "نوع الخوارزمية \"%s\" غير صحيح أو غير مدعوم.", 3 | "File not found." : "الملف غير موجود", 4 | "Checksum" : "المجموع الاختباري Checksum", 5 | "Creating a hash checksum of a file." : "توليد مجموع اختباري لمستخلص hash checksum ملف.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "تمكين المستخدمين من توليد \"مجموع اختبار لمستخلص ملف\" file hash checksum باستخدام إحدى خوارزميات التشفير التالية: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\nبكل بساطة، فتح تفاصيل الملف (في الشريط الجانبي) و ستظهر لك تبويبة جديدة باسم \"Checksum\". إختر خوارزميةً و سيظهر لك المستخلص hash الذي تمّ توليده. إذا رغبت في تغيير الخوارزمية، إضغط زر إعادة التحميل \"reload\".", 7 | "Hash copied to clipboard." : "تمّ نسخ المستخلص hash إلى الحافظة.", 8 | "Choose Algorithm" : "إختر خوارزميةً" 9 | },"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" 10 | } -------------------------------------------------------------------------------- /l10n/ca.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipus d'algoritme \"%s\" no és un tipus vàlid o suportat.", 5 | "File not found." : "No s'ha trobat el fitxer.", 6 | "Checksum" : "Resum de verificació", 7 | "Creating a hash checksum of a file." : "Creant una suma de verificació de un fitxer", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permet als usuaris crear un resum de verificació (hash) d'un fitxer.\n Els algorismes possibles són md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 i crc32.\n\n Només heu d'obrir la vista de detalls del fitxer (barra lateral). Hi hauria d'haver una pestanya nova anomenada \"Resum de verificació\".\n Seleccioneu un algorisme i intentarà generar un resum.\n Si voleu un altre algorisme, feu clic al botó de recarregar.", 9 | "Hash copied to clipboard." : "Resum copiat al porta-retalls.", 10 | "Choose Algorithm" : "Trieu Algoritme" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /l10n/es.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipo de algoritmo \"%s\" no es válido o no está sorportado.", 3 | "File not found." : "Archivo no encontrado.", 4 | "Checksum" : "Checksum", 5 | "Creating a hash checksum of a file." : "Creando el hash checksum de un archivo.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite a los usuarios crear el hash de checksum de un archivo.\n Los posibles algoritmos son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 y crc32.\n\n Simplemente abra la vista de detalles de un archivo (barra lateral). Debería aparecer una nueva pestaña llamada \"Checksum\".\n Seleccione un algoritmo y la app intentará generar el hash.\n Si quiere otro algoritmo, simplemente pulse el botón para recargar.", 7 | "Hash copied to clipboard." : "Hash copiado al portapapeles.", 8 | "Choose Algorithm" : "Elija un algoritmo" 9 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 10 | } -------------------------------------------------------------------------------- /l10n/eu.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : " \"%s\" algoritmo mota ez da baliozko edo onartzen den algoritmo mota bat.", 5 | "File not found." : "Ez da fitxategirik aurkitu.", 6 | "Checksum" : "Egiaztapeneko batura", 7 | "Creating a hash checksum of a file." : "Fitxategiaren egiaztapeneko batura sortzen.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Erabiltzaileei fitxategi baten egiaztapeneko batura sortzeko aukera ematen die.\nAlgoritmo posibleak md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 eta crc32 dira.\n\n Ireki fitxategiaren xehetasunen ikuspegia (alboko barran). \"Egiaztapeneko batura\" izeneko fitxa berri bat egon beharko litzateke.\n  Hautatu algoritmo bat eta hash bat sortzen saiatuko da.\n  Beste algoritmo bat nahi baduzu, egin klik berriro kargatu botoian.", 9 | "Hash copied to clipboard." : "Batura arbelera kopiatu da.", 10 | "Choose Algorithm" : "Aukeratu algoritmoa" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /l10n/nl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Het algoritmetype \"%s\" is geen geldig of ondersteund algoritmetype.", 5 | "File not found." : "Bestand niet gevonden.", 6 | "Checksum" : "Controlesom", 7 | "Creating a hash checksum of a file." : "Een hash-controlesom van het bestand maken.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Hiermee kunnen gebruikers een hash-controlesom van een bestand maken.\n Mogelijke algoritmes zijn md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 en crc32.\n\n Open simpelweg de detailweergave van het bestand (Zijbalk). Er zou een nieuw tabblad moeten zijn met de naam \"Controlesom\".\n Selecteer een algoritme en het zal proberen een hash te genereren.\n Als u een ander algoritme wilt, klikt u simpelweg op de herlaadknop.", 9 | "Hash copied to clipboard." : "Hash gekopieerd naar het klembord.", 10 | "Choose Algorithm" : "Kies Algoritme" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /l10n/es_CO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipo de algoritmo \"%s\" no es válido o no es compatible.\n ", 3 | "File not found." : "Archivo no encontrado.", 4 | "Checksum" : "suma de verificación", 5 | "Creating a hash checksum of a file." : "Creando un hash de suma de verificación de un archivo.\n ", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite a los usuarios crear una suma de verificación hash de un archivo. Los algoritmos posibles son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 y crc32.\n\nSimplemente abre la vista de detalles del archivo (barra lateral). Debería haber una nueva pestaña llamada \"Checksum\". Selecciona un algoritmo y se intentará generar un hash. Si deseas utilizar otro algoritmo, simplemente haz clic en el botón de recarga.", 7 | "Hash copied to clipboard." : "Hash copiado al portapapeles.", 8 | "Choose Algorithm" : "Elija un algoritmo" 9 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 10 | } -------------------------------------------------------------------------------- /l10n/ar.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "نوع الخوارزمية \"%s\" غير صحيح أو غير مدعوم.", 5 | "File not found." : "الملف غير موجود", 6 | "Checksum" : "المجموع الاختباري Checksum", 7 | "Creating a hash checksum of a file." : "توليد مجموع اختباري لمستخلص hash checksum ملف.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "تمكين المستخدمين من توليد \"مجموع اختبار لمستخلص ملف\" file hash checksum باستخدام إحدى خوارزميات التشفير التالية: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\nبكل بساطة، فتح تفاصيل الملف (في الشريط الجانبي) و ستظهر لك تبويبة جديدة باسم \"Checksum\". إختر خوارزميةً و سيظهر لك المستخلص hash الذي تمّ توليده. إذا رغبت في تغيير الخوارزمية، إضغط زر إعادة التحميل \"reload\".", 9 | "Hash copied to clipboard." : "تمّ نسخ المستخلص hash إلى الحافظة.", 10 | "Choose Algorithm" : "إختر خوارزميةً" 11 | }, 12 | "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"); 13 | -------------------------------------------------------------------------------- /l10n/es_EC.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipo de algoritmo \"%s\" no es válido o no es compatible.\n ", 3 | "File not found." : "Archivo no encontrado.", 4 | "Checksum" : "suma de verificación", 5 | "Creating a hash checksum of a file." : "Creando un hash de suma de verificación de un archivo.\n ", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite a los usuarios crear una suma de verificación hash de un archivo. Los algoritmos posibles son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 y crc32.\n\nSimplemente abre la vista de detalles del archivo (barra lateral). Debería haber una nueva pestaña llamada \"Checksum\". Selecciona un algoritmo y se intentará generar un hash. Si deseas utilizar otro algoritmo, simplemente haz clic en el botón de recarga.", 7 | "Hash copied to clipboard." : "Hash copiado al portapapeles.", 8 | "Choose Algorithm" : "Seleccionar algoritmo." 9 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 10 | } -------------------------------------------------------------------------------- /l10n/es.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipo de algoritmo \"%s\" no es válido o no está sorportado.", 5 | "File not found." : "Archivo no encontrado.", 6 | "Checksum" : "Checksum", 7 | "Creating a hash checksum of a file." : "Creando el hash checksum de un archivo.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite a los usuarios crear el hash de checksum de un archivo.\n Los posibles algoritmos son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 y crc32.\n\n Simplemente abra la vista de detalles de un archivo (barra lateral). Debería aparecer una nueva pestaña llamada \"Checksum\".\n Seleccione un algoritmo y la app intentará generar el hash.\n Si quiere otro algoritmo, simplemente pulse el botón para recargar.", 9 | "Hash copied to clipboard." : "Hash copiado al portapapeles.", 10 | "Choose Algorithm" : "Elija un algoritmo" 11 | }, 12 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 13 | -------------------------------------------------------------------------------- /l10n/sr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Тип алгоритма „%s” није исправан или подржани тип алгоритма.", 3 | "File not found." : "Фајл није нађен.", 4 | "Checksum" : "Контролна сума", 5 | "Creating a hash checksum of a file." : "Креирање хеш контролне суме фајла.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Омогућава да корисници креирају хеш контролну суму фајла.\n Могући су следећи алгоритми md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Једноставно отворите погледа на детаље о фајлу (Бочни панел). Требало би да видите нову картицу са именом „Контролна сума”.\n Изаберите алгоритам и покушаће да генерише хеш..\n Ако желите неки други алгоритам, само кликните на дугме за поновно учитавање.", 7 | "Hash copied to clipboard." : "Хеш је копиран у клипборд.", 8 | "Choose Algorithm" : "Изаберите алгоритам" 9 | },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" 10 | } -------------------------------------------------------------------------------- /l10n/el.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Ο τύπος αλγορίθμου «%s» δεν είναι έγκυρος ή υποστηριζόμενος τύπος αλγορίθμου.", 3 | "File not found." : "Το αρχείο δεν βρέθηκε.", 4 | "Checksum" : "Άθροισμα ελέγχου", 5 | "Creating a hash checksum of a file." : "Δημιουργία αθροίσματος ελέγχου κατακερματισμού αρχείου.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Επιτρέπει στους χρήστες να δημιουργούν ένα hash checksum ενός αρχείου.\n Πιθανοί αλγόριθμοι είναι md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 και crc32.\n\n Απλά ανοίξτε την προβολή λεπτομερειών του αρχείου (Πλαϊνή μπάρα). Θα πρέπει να υπάρχει μια νέα καρτέλα με το όνομα \"Checksum\".\n Επιλέξτε έναν αλγόριθμο και θα προσπαθήσει να δημιουργήσει ένα hash.\n Εάν θέλετε έναν άλλο αλγόριθμο, απλά κάντε κλικ στο κουμπί ανανέωσης.", 7 | "Hash copied to clipboard." : "Το hash αντιγράφηκε στο πρόχειρο.", 8 | "Choose Algorithm" : "Επιλογή αλγορίθμου" 9 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 10 | } -------------------------------------------------------------------------------- /l10n/sk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Typ algoritmu \"%s\" nie je platným alebo podporovaným typom algoritmu.", 3 | "File not found." : "Súbor nenájdený.", 4 | "Checksum" : "Kontrolný súčet", 5 | "Creating a hash checksum of a file." : "Vytváram hash kontrolného súčtu súboru.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Umožňuje používateľom vytvoriť kontrolný súčet (hash) súboru.\n Možné algoritmy sú md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 a crc32.\n\n Stačí otvoriť zobrazenie podrobností o súbore (bočný panel). Mala by sa zobraziť nová karta s názvom \"Kontrolný súčet\".\n Vyberte algoritmus a aplikácia sa pokúsi vygenerovať hash.\n Ak chcete iný algoritmus, stačí kliknúť na tlačidlo znovu načítať.", 7 | "Hash copied to clipboard." : "Hash skopírovaný do schránky.", 8 | "Choose Algorithm" : "Vybrať algoritmus" 9 | },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);" 10 | } -------------------------------------------------------------------------------- /l10n/es_CO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipo de algoritmo \"%s\" no es válido o no es compatible.\n ", 5 | "File not found." : "Archivo no encontrado.", 6 | "Checksum" : "suma de verificación", 7 | "Creating a hash checksum of a file." : "Creando un hash de suma de verificación de un archivo.\n ", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite a los usuarios crear una suma de verificación hash de un archivo. Los algoritmos posibles son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 y crc32.\n\nSimplemente abre la vista de detalles del archivo (barra lateral). Debería haber una nueva pestaña llamada \"Checksum\". Selecciona un algoritmo y se intentará generar un hash. Si deseas utilizar otro algoritmo, simplemente haz clic en el botón de recarga.", 9 | "Hash copied to clipboard." : "Hash copiado al portapapeles.", 10 | "Choose Algorithm" : "Elija un algoritmo" 11 | }, 12 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 13 | -------------------------------------------------------------------------------- /l10n/es_EC.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "El tipo de algoritmo \"%s\" no es válido o no es compatible.\n ", 5 | "File not found." : "Archivo no encontrado.", 6 | "Checksum" : "suma de verificación", 7 | "Creating a hash checksum of a file." : "Creando un hash de suma de verificación de un archivo.\n ", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite a los usuarios crear una suma de verificación hash de un archivo. Los algoritmos posibles son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 y crc32.\n\nSimplemente abre la vista de detalles del archivo (barra lateral). Debería haber una nueva pestaña llamada \"Checksum\". Selecciona un algoritmo y se intentará generar un hash. Si deseas utilizar otro algoritmo, simplemente haz clic en el botón de recarga.", 9 | "Hash copied to clipboard." : "Hash copiado al portapapeles.", 10 | "Choose Algorithm" : "Seleccionar algoritmo." 11 | }, 12 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 13 | -------------------------------------------------------------------------------- /l10n/sr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Тип алгоритма „%s” није исправан или подржани тип алгоритма.", 5 | "File not found." : "Фајл није нађен.", 6 | "Checksum" : "Контролна сума", 7 | "Creating a hash checksum of a file." : "Креирање хеш контролне суме фајла.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Омогућава да корисници креирају хеш контролну суму фајла.\n Могући су следећи алгоритми md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Једноставно отворите погледа на детаље о фајлу (Бочни панел). Требало би да видите нову картицу са именом „Контролна сума”.\n Изаберите алгоритам и покушаће да генерише хеш..\n Ако желите неки други алгоритам, само кликните на дугме за поновно учитавање.", 9 | "Hash copied to clipboard." : "Хеш је копиран у клипборд.", 10 | "Choose Algorithm" : "Изаберите алгоритам" 11 | }, 12 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); 13 | -------------------------------------------------------------------------------- /l10n/el.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Ο τύπος αλγορίθμου «%s» δεν είναι έγκυρος ή υποστηριζόμενος τύπος αλγορίθμου.", 5 | "File not found." : "Το αρχείο δεν βρέθηκε.", 6 | "Checksum" : "Άθροισμα ελέγχου", 7 | "Creating a hash checksum of a file." : "Δημιουργία αθροίσματος ελέγχου κατακερματισμού αρχείου.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Επιτρέπει στους χρήστες να δημιουργούν ένα hash checksum ενός αρχείου.\n Πιθανοί αλγόριθμοι είναι md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 και crc32.\n\n Απλά ανοίξτε την προβολή λεπτομερειών του αρχείου (Πλαϊνή μπάρα). Θα πρέπει να υπάρχει μια νέα καρτέλα με το όνομα \"Checksum\".\n Επιλέξτε έναν αλγόριθμο και θα προσπαθήσει να δημιουργήσει ένα hash.\n Εάν θέλετε έναν άλλο αλγόριθμο, απλά κάντε κλικ στο κουμπί ανανέωσης.", 9 | "Hash copied to clipboard." : "Το hash αντιγράφηκε στο πρόχειρο.", 10 | "Choose Algorithm" : "Επιλογή αλγορίθμου" 11 | }, 12 | "nplurals=2; plural=(n != 1);"); 13 | -------------------------------------------------------------------------------- /l10n/fr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Le type d'algorithme \"%s\" est invalide ou n'est pas un algorithme supporté.", 3 | "File not found." : "Fichier non trouvé.", 4 | "Checksum" : "Somme de contrôle", 5 | "Creating a hash checksum of a file." : "Créer la somme de contrôle d'un fichier.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permet aux utilisateurs de créer une somme de contrôle par hachage d'un fichier.\nLes algorithmes possibles sont md5, sha1, sha256, sha384, sha512, sha3-256 et crc32.\n\nOuvrez simplement la vue détaillée du fichier (panneau latéral). Un nouvel onglet \"Somme de contrôle\" devrait être présent.\nSélectionnez un algorithme qui tentera de générer un hachage.\nSi vous voulez utiliser un autre algorithme, sélectionnez simplement le bouton recharger", 7 | "Hash copied to clipboard." : "Hachage copié dans le presse-papier", 8 | "Choose Algorithm" : "Sélectionnez un algorithme" 9 | },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 10 | } -------------------------------------------------------------------------------- /l10n/sk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Typ algoritmu \"%s\" nie je platným alebo podporovaným typom algoritmu.", 5 | "File not found." : "Súbor nenájdený.", 6 | "Checksum" : "Kontrolný súčet", 7 | "Creating a hash checksum of a file." : "Vytváram hash kontrolného súčtu súboru.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Umožňuje používateľom vytvoriť kontrolný súčet (hash) súboru.\n Možné algoritmy sú md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 a crc32.\n\n Stačí otvoriť zobrazenie podrobností o súbore (bočný panel). Mala by sa zobraziť nová karta s názvom \"Kontrolný súčet\".\n Vyberte algoritmus a aplikácia sa pokúsi vygenerovať hash.\n Ak chcete iný algoritmus, stačí kliknúť na tlačidlo znovu načítať.", 9 | "Hash copied to clipboard." : "Hash skopírovaný do schránky.", 10 | "Choose Algorithm" : "Vybrať algoritmus" 11 | }, 12 | "nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);"); 13 | -------------------------------------------------------------------------------- /lib/Listener/LoadSidebarListener.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * @author Richard Steinmetz 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Affero General Public License as 12 | * published by the Free Software Foundation, either version 3 of the 13 | * License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Affero General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Affero General Public License 21 | * along with this program. If not, see . 22 | */ 23 | 24 | namespace OCA\Checksum\Listener; 25 | 26 | use OCA\Checksum\AppInfo\Application; 27 | use OCA\Files\Event\LoadSidebar; 28 | use OCP\EventDispatcher\Event; 29 | use OCP\EventDispatcher\IEventListener; 30 | use OCP\Util; 31 | 32 | class LoadSidebarListener implements IEventListener { 33 | public function handle(Event $event): void { 34 | if (!($event instanceof LoadSidebar)) { 35 | return; 36 | } 37 | 38 | Util::addScript(Application::APP_ID, 'checksum-main'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /l10n/fr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Le type d'algorithme \"%s\" est invalide ou n'est pas un algorithme supporté.", 5 | "File not found." : "Fichier non trouvé.", 6 | "Checksum" : "Somme de contrôle", 7 | "Creating a hash checksum of a file." : "Créer la somme de contrôle d'un fichier.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permet aux utilisateurs de créer une somme de contrôle par hachage d'un fichier.\nLes algorithmes possibles sont md5, sha1, sha256, sha384, sha512, sha3-256 et crc32.\n\nOuvrez simplement la vue détaillée du fichier (panneau latéral). Un nouvel onglet \"Somme de contrôle\" devrait être présent.\nSélectionnez un algorithme qui tentera de générer un hachage.\nSi vous voulez utiliser un autre algorithme, sélectionnez simplement le bouton recharger", 9 | "Hash copied to clipboard." : "Hachage copié dans le presse-papier", 10 | "Choose Algorithm" : "Sélectionnez un algorithme" 11 | }, 12 | "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 13 | -------------------------------------------------------------------------------- /l10n/pl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Typ algorytmu \"%s\" nie jest prawidłowym ani obsługiwanym typem algorytmu.", 3 | "File not found." : "Nie znaleziono pliku.", 4 | "Checksum" : "Suma kontrolna", 5 | "Creating a hash checksum of a file." : "Tworzenie sumy kontrolnej (hash) pliku.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Umożliwia użytkownikom tworzenie sumy kontrolnej (hash) pliku.\n Możliwe algorytmy to md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 i crc32.\n\n Wystarczy otworzyć widok szczegółów pliku (pasek boczny), w którym powinna pojawić się nowa zakładka o nazwie \"Suma kontrolna\".\n Wybierz algorytm i spróbuj wygenerować hash.\nJeśli chcesz inny algorytm, po prostu kliknij przycisk przeładuj.", 7 | "Hash copied to clipboard." : "Hash skopiowany do schowka.", 8 | "Choose Algorithm" : "Wybierz algorytm" 9 | },"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);" 10 | } -------------------------------------------------------------------------------- /l10n/ru.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Тип алгоритма \"%s\" не является допустимым или поддерживаемым типом алгоритма.", 3 | "File not found." : "Файл не найден.", 4 | "Checksum" : "Контр. сумма", 5 | "Creating a hash checksum of a file." : "Создание хэша контрольной суммы файла.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Позволяет пользователям создавать хэш контрольной суммы файла.\n Поддерживаемые алгоритмы: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 и crc32.\n\n Просто откройте представление сведений о файле (боковая панель). Там будет новая вкладка под названием \"Контр. сумма\".\n Выберите алгоритм, и он попытается сгенерировать хэш.\n Если вам нужен другой алгоритм, просто нажмите на кнопку перезагрузки.", 7 | "Hash copied to clipboard." : "Хэш скопирован в буфер обмена.", 8 | "Choose Algorithm" : "Выберите алгоритм" 9 | },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" 10 | } -------------------------------------------------------------------------------- /l10n/pl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Typ algorytmu \"%s\" nie jest prawidłowym ani obsługiwanym typem algorytmu.", 5 | "File not found." : "Nie znaleziono pliku.", 6 | "Checksum" : "Suma kontrolna", 7 | "Creating a hash checksum of a file." : "Tworzenie sumy kontrolnej (hash) pliku.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Umożliwia użytkownikom tworzenie sumy kontrolnej (hash) pliku.\n Możliwe algorytmy to md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 i crc32.\n\n Wystarczy otworzyć widok szczegółów pliku (pasek boczny), w którym powinna pojawić się nowa zakładka o nazwie \"Suma kontrolna\".\n Wybierz algorytm i spróbuj wygenerować hash.\nJeśli chcesz inny algorytm, po prostu kliknij przycisk przeładuj.", 9 | "Hash copied to clipboard." : "Hash skopiowany do schowka.", 10 | "Choose Algorithm" : "Wybierz algorytm" 11 | }, 12 | "nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"); 13 | -------------------------------------------------------------------------------- /l10n/ru.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Тип алгоритма \"%s\" не является допустимым или поддерживаемым типом алгоритма.", 5 | "File not found." : "Файл не найден.", 6 | "Checksum" : "Контр. сумма", 7 | "Creating a hash checksum of a file." : "Создание хэша контрольной суммы файла.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Позволяет пользователям создавать хэш контрольной суммы файла.\n Поддерживаемые алгоритмы: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 и crc32.\n\n Просто откройте представление сведений о файле (боковая панель). Там будет новая вкладка под названием \"Контр. сумма\".\n Выберите алгоритм, и он попытается сгенерировать хэш.\n Если вам нужен другой алгоритм, просто нажмите на кнопку перезагрузки.", 9 | "Hash copied to clipboard." : "Хэш скопирован в буфер обмена.", 10 | "Choose Algorithm" : "Выберите алгоритм" 11 | }, 12 | "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); 13 | -------------------------------------------------------------------------------- /l10n/uk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Тип алгоритму \"%s\" не є дійсним або не підтримується.", 3 | "File not found." : "Файл не знайдено.", 4 | "Checksum" : "Контрольна сума", 5 | "Creating a hash checksum of a file." : "Створення хеш-контрольної суми файлу.", 6 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Дозволяє користувачам створювати контрольну суму хешу файлу.\nМожливі алгоритми: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 та crc32.\n\nПросто відкрийте детальний перегляд файлу (бічна панель). Там має з'явитися нова вкладка \"Контрольна сума\".\nВиберіть алгоритм, і він спробує згенерувати хеш.\nЯкщо ви хочете використовувати інший алгоритм, просто натисніть на кнопку перезавантажити.", 7 | "Hash copied to clipboard." : "Хеш скопійовано до буферу обміну", 8 | "Choose Algorithm" : "Виберіть Алгоритм" 9 | },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);" 10 | } -------------------------------------------------------------------------------- /l10n/zh_TW.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "「%s」並非有效或支援的演算法類型。", 3 | "Start byte must be 0 or greater." : "開始位元組必須為 0 或更大。", 4 | "End byte must be 0 or greater." : "結束位元組必須為 0 或更大。", 5 | "Start byte must be less than end byte." : "開始位元組必須小於結束位元組。", 6 | "File not found." : "找不到檔案。", 7 | "Checksum" : "檢查碼", 8 | "Creating a hash checksum of a file." : "產生此檔案的檢查碼。", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "允許使用者為檔案產生檢查碼。\n可用的演算法包含 md5、sha1、sha256、sha384、sha512、sha3-256、sha3-512 以及 crc32。\n打開檔案內容(為於側邊欄),將會看到一個名為「檢查碼」的新選項。\n嘗試選擇一個演算法生成檢查碼。\n若要挑選其他演算法,僅需按下重新整理按鈕。", 10 | "Hash copied to clipboard." : "已複製雜湊值至剪貼簿", 11 | "Start Byte" : "開始位元組", 12 | "End Byte" : "結束位元組", 13 | "e.g., 0" : "例如 0", 14 | "e.g., 1024" : "例如 1024", 15 | "Advanced: Byte Range" : "進階:位元組範圍", 16 | "Hide Byte Range" : "隱藏位元組範圍", 17 | "Choose Algorithm" : "選擇演算法", 18 | "Start byte must be a valid number." : "開始位元組必須為有效數字。", 19 | "End byte must be a valid number." : "結束位元組必須為有效數字。", 20 | "Error calculating checksum." : "計算雜湊碼時發生錯誤。" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /l10n/uk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Тип алгоритму \"%s\" не є дійсним або не підтримується.", 5 | "File not found." : "Файл не знайдено.", 6 | "Checksum" : "Контрольна сума", 7 | "Creating a hash checksum of a file." : "Створення хеш-контрольної суми файлу.", 8 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Дозволяє користувачам створювати контрольну суму хешу файлу.\nМожливі алгоритми: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 та crc32.\n\nПросто відкрийте детальний перегляд файлу (бічна панель). Там має з'явитися нова вкладка \"Контрольна сума\".\nВиберіть алгоритм, і він спробує згенерувати хеш.\nЯкщо ви хочете використовувати інший алгоритм, просто натисніть на кнопку перезавантажити.", 9 | "Hash copied to clipboard." : "Хеш скопійовано до буферу обміну", 10 | "Choose Algorithm" : "Виберіть Алгоритм" 11 | }, 12 | "nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"); 13 | -------------------------------------------------------------------------------- /l10n/zh_TW.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "「%s」並非有效或支援的演算法類型。", 5 | "Start byte must be 0 or greater." : "開始位元組必須為 0 或更大。", 6 | "End byte must be 0 or greater." : "結束位元組必須為 0 或更大。", 7 | "Start byte must be less than end byte." : "開始位元組必須小於結束位元組。", 8 | "File not found." : "找不到檔案。", 9 | "Checksum" : "檢查碼", 10 | "Creating a hash checksum of a file." : "產生此檔案的檢查碼。", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "允許使用者為檔案產生檢查碼。\n可用的演算法包含 md5、sha1、sha256、sha384、sha512、sha3-256、sha3-512 以及 crc32。\n打開檔案內容(為於側邊欄),將會看到一個名為「檢查碼」的新選項。\n嘗試選擇一個演算法生成檢查碼。\n若要挑選其他演算法,僅需按下重新整理按鈕。", 12 | "Hash copied to clipboard." : "已複製雜湊值至剪貼簿", 13 | "Start Byte" : "開始位元組", 14 | "End Byte" : "結束位元組", 15 | "e.g., 0" : "例如 0", 16 | "e.g., 1024" : "例如 1024", 17 | "Advanced: Byte Range" : "進階:位元組範圍", 18 | "Hide Byte Range" : "隱藏位元組範圍", 19 | "Choose Algorithm" : "選擇演算法", 20 | "Start byte must be a valid number." : "開始位元組必須為有效數字。", 21 | "End byte must be a valid number." : "結束位元組必須為有效數字。", 22 | "Error calculating checksum." : "計算雜湊碼時發生錯誤。" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /l10n/zh_HK.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "算法類型“%s”不是有效的或受支持的算法類型。", 3 | "Start byte must be 0 or greater." : "開始位元組必須為 0 或更大。", 4 | "End byte must be 0 or greater." : "結束位元組必須為 0 或更大。", 5 | "Start byte must be less than end byte." : "開始位元組必須小於結束位元組。", 6 | "File not found." : "未找到文件", 7 | "Checksum" : "校驗和", 8 | "Creating a hash checksum of a file." : "創建檔案的哈希校驗和。", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "允許用戶創建檔案的散列校驗和。\n 可能的算法有 md5、sha1、sha256、sha384、sha512、sha3-256、sha3-512 和 crc32。\n\n 只需打開文件的詳細信息視圖(側邊欄)。 應該有一個名為“校驗和”的新選項卡。\n 選擇一個算法,它會嘗試生成一個哈希。\n 如果您想要其他算法,只需單擊重新加載按鈕。", 10 | "Hash copied to clipboard." : "已複製散列至剪貼板。", 11 | "Start Byte" : "開始位元組", 12 | "End Byte" : "結束位元組", 13 | "e.g., 0" : "例如 0", 14 | "e.g., 1024" : "例如 1024", 15 | "Advanced: Byte Range" : "進階:位元組範圍", 16 | "Hide Byte Range" : "隱藏位元組範圍", 17 | "Choose Algorithm" : "選擇算法", 18 | "Start byte must be a valid number." : "開始位元組必須為有效數字。", 19 | "End byte must be a valid number." : "結束位元組必須為有效數字。", 20 | "Error calculating checksum." : "計算雜湊碼時發生錯誤。" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /l10n/zh_HK.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "算法類型“%s”不是有效的或受支持的算法類型。", 5 | "Start byte must be 0 or greater." : "開始位元組必須為 0 或更大。", 6 | "End byte must be 0 or greater." : "結束位元組必須為 0 或更大。", 7 | "Start byte must be less than end byte." : "開始位元組必須小於結束位元組。", 8 | "File not found." : "未找到文件", 9 | "Checksum" : "校驗和", 10 | "Creating a hash checksum of a file." : "創建檔案的哈希校驗和。", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "允許用戶創建檔案的散列校驗和。\n 可能的算法有 md5、sha1、sha256、sha384、sha512、sha3-256、sha3-512 和 crc32。\n\n 只需打開文件的詳細信息視圖(側邊欄)。 應該有一個名為“校驗和”的新選項卡。\n 選擇一個算法,它會嘗試生成一個哈希。\n 如果您想要其他算法,只需單擊重新加載按鈕。", 12 | "Hash copied to clipboard." : "已複製散列至剪貼板。", 13 | "Start Byte" : "開始位元組", 14 | "End Byte" : "結束位元組", 15 | "e.g., 0" : "例如 0", 16 | "e.g., 1024" : "例如 1024", 17 | "Advanced: Byte Range" : "進階:位元組範圍", 18 | "Hide Byte Range" : "隱藏位元組範圍", 19 | "Choose Algorithm" : "選擇算法", 20 | "Start byte must be a valid number." : "開始位元組必須為有效數字。", 21 | "End byte must be a valid number." : "結束位元組必須為有效數字。", 22 | "Error calculating checksum." : "計算雜湊碼時發生錯誤。" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | checksum 5 | Checksum 6 | Creating a hash checksum of a file. 7 | 8 | Allows users to create a hash checksum of a file. 9 | Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32. 10 | 11 | Just open the details view of the file (Sidebar). There should be a new tab called "Checksum". 12 | Select a algorithm and it will try to generate a hash. 13 | If you want an other algorithm, just click on the reload button. 14 | 15 | 2.0.3 16 | agpl 17 | westberliner 18 | 19 | 20 | 21 | 22 | https://github.com/westberliner/checksum/blob/master/README.md 23 | https://github.com/westberliner/checksum/blob/master/README.md 24 | 25 | files 26 | tools 27 | https://github.com/westberliner/checksum/ 28 | https://github.com/westberliner/checksum/issues 29 | https://raw.githubusercontent.com/westberliner/checksum/master/screenshots/checksum.gif 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /lib/AppInfo/Application.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * @author Richard Steinmetz 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Affero General Public License as 12 | * published by the Free Software Foundation, either version 3 of the 13 | * License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Affero General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Affero General Public License 21 | * along with this program. If not, see . 22 | */ 23 | 24 | namespace OCA\Checksum\AppInfo; 25 | 26 | use OCA\Checksum\Listener\LoadSidebarListener; 27 | use OCA\Files\Event\LoadSidebar; 28 | use OCP\AppFramework\App; 29 | use OCP\AppFramework\Bootstrap\IBootContext; 30 | use OCP\AppFramework\Bootstrap\IBootstrap; 31 | use OCP\AppFramework\Bootstrap\IRegistrationContext; 32 | 33 | class Application extends App implements IBootstrap { 34 | public const APP_ID = 'checksum'; 35 | 36 | /** 37 | * @param array $urlParams 38 | */ 39 | public function __construct(array $urlParams = []) { 40 | parent::__construct(self::APP_ID, $urlParams); 41 | } 42 | 43 | public function register(IRegistrationContext $context): void { 44 | // Load scripts for sidebar. 45 | $context->registerEventListener( 46 | LoadSidebar::class, 47 | LoadSidebarListener::class 48 | ); 49 | } 50 | 51 | public function boot(IBootContext $context): void { 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Deployment Scripts 2 | 3 | This directory contains scripts for building and deploying the Checksum app. 4 | 5 | ## deploy.sh 6 | 7 | Comprehensive deployment script that: 8 | 9 | ### Checks Performed (in order): 10 | 11 | 1. **PHP Syntax Check** - Validates all PHP files for syntax errors 12 | 2. **PHP Code Style** - Checks code style with PHP-CS-Fixer (auto-fixes if needed) 13 | 3. **PHP Static Analysis** - Runs Psalm to catch potential bugs 14 | 4. **PHP Unit Tests** - Runs PHPUnit tests (8 tests) 15 | 5. **TypeScript Type Check** - Validates TypeScript types with vue-tsc 16 | 6. **JavaScript Linting** - Checks code quality with ESLint (auto-fixes if needed) 17 | 7. **Code Formatting** - Validates formatting with Prettier (auto-fixes if needed) 18 | 8. **Node Unit Tests** - Runs Vitest tests (32 tests) 19 | 9. **Production Build** - Builds optimized production assets 20 | 21 | ### Package Creation 22 | 23 | After all checks pass, the script: 24 | - Cleans the `js/` directory 25 | - Installs dependencies 26 | - Builds production assets with Vite 27 | - Creates `checksum.tar.gz` in the parent directory 28 | 29 | ### Usage 30 | 31 | ```bash 32 | # From project root 33 | npm run deploy 34 | 35 | # Or directly 36 | ./scripts/deploy.sh 37 | ``` 38 | 39 | ### Exit Codes 40 | 41 | - `0` - Success: All checks passed and package created 42 | - `1` - Failure: One or more checks failed 43 | 44 | ### Features 45 | 46 | - ✨ Color-coded output for easy reading 47 | - 🛑 Stops on first error 48 | - 🔧 Auto-fixes code style and formatting issues when possible 49 | - 📊 Summary of all checks at the end 50 | - 📦 Automated package creation 51 | 52 | ### Notes 53 | 54 | - The script must be run from the project root or will change to it automatically 55 | - All checks must pass before the build proceeds 56 | - The created package excludes development files (node_modules, src, tests, etc.) 57 | 58 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checksum", 3 | "description": "Checksum app for Nextcloud", 4 | "version": "2.0.3", 5 | "author": "westberliner", 6 | "license": "agpl", 7 | "private": true, 8 | "type": "module", 9 | "engines": { 10 | "node": "^24.0.0", 11 | "npm": "^11.3.0" 12 | }, 13 | "scripts": { 14 | "build": "vite build", 15 | "dev": "vite build --mode development", 16 | "watch": "vite build --mode development --watch", 17 | "deploy": "./scripts/deploy.sh", 18 | "format": "prettier --check ./src", 19 | "format:fix": "prettier --write ./src", 20 | "lint": "eslint --ext .js,.ts src", 21 | "lint:fix": "eslint --ext .js,.ts src --fix", 22 | "stylelint": "stylelint src/**/*{.scss,.vue,.css}", 23 | "stylelint:fix": "stylelint src --fix", 24 | "type-check": "vue-tsc --noEmit", 25 | "test": "vitest run", 26 | "test:watch": "vitest", 27 | "test:coverage": "vitest run --coverage" 28 | }, 29 | "dependencies": { 30 | "@nextcloud/axios": "^2.4.0", 31 | "@nextcloud/l10n": "^2.2.0", 32 | "@nextcloud/router": "^2.0.0", 33 | "@nextcloud/vue": "^9.0.0-rc.2", 34 | "vue": "^3.5.16" 35 | }, 36 | "devDependencies": { 37 | "@nextcloud/browserslist-config": "^1.0.0", 38 | "@nextcloud/eslint-config": "^8.4.2", 39 | "@nextcloud/prettier-config": "^1.2.0", 40 | "@nextcloud/stylelint-config": "^3.1.1", 41 | "@nextcloud/vite-config": "^2.5.2", 42 | "@vitejs/plugin-vue": "^6.0.1", 43 | "@vue/test-utils": "^2.4.6", 44 | "@vue/tsconfig": "^0.8.1", 45 | "@vitest/coverage-v8": "^3.2.1", 46 | "eslint-config-prettier": "^10.1.5", 47 | "eslint-plugin-prettier": "^5.5.4", 48 | "happy-dom": "^20.0.10", 49 | "prettier": "^3.6.1", 50 | "typescript": "^5.9.3", 51 | "vite": "^7.2.2", 52 | "vitest": "^3.2.1", 53 | "vue-tsc": "^3.1.4" 54 | }, 55 | "browserslist": [ 56 | "extends @nextcloud/browserslist-config" 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /l10n/en_GB.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "The algorithm type \"%s\" is not a valid or supported algorithm type.", 3 | "Start byte must be 0 or greater." : "Start byte must be 0 or greater.", 4 | "End byte must be 0 or greater." : "End byte must be 0 or greater.", 5 | "Start byte must be less than end byte." : "Start byte must be less than end byte.", 6 | "File not found." : "File not found.", 7 | "Checksum" : "Checksum", 8 | "Creating a hash checksum of a file." : "Creating a hash checksum of a file.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button.", 10 | "Hash copied to clipboard." : "Hash copied to clipboard.", 11 | "Start Byte" : "Start Byte", 12 | "End Byte" : "End Byte", 13 | "e.g., 0" : "e.g., 0", 14 | "e.g., 1024" : "e.g., 1024", 15 | "Advanced: Byte Range" : "Advanced: Byte Range", 16 | "Hide Byte Range" : "Hide Byte Range", 17 | "Choose Algorithm" : "Choose Algorithm", 18 | "Start byte must be a valid number." : "Start byte must be a valid number.", 19 | "End byte must be a valid number." : "End byte must be a valid number.", 20 | "Error calculating checksum." : "Error calculating checksum." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/en_GB.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "The algorithm type \"%s\" is not a valid or supported algorithm type.", 5 | "Start byte must be 0 or greater." : "Start byte must be 0 or greater.", 6 | "End byte must be 0 or greater." : "End byte must be 0 or greater.", 7 | "Start byte must be less than end byte." : "Start byte must be less than end byte.", 8 | "File not found." : "File not found.", 9 | "Checksum" : "Checksum", 10 | "Creating a hash checksum of a file." : "Creating a hash checksum of a file.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button.", 12 | "Hash copied to clipboard." : "Hash copied to clipboard.", 13 | "Start Byte" : "Start Byte", 14 | "End Byte" : "End Byte", 15 | "e.g., 0" : "e.g., 0", 16 | "e.g., 1024" : "e.g., 1024", 17 | "Advanced: Byte Range" : "Advanced: Byte Range", 18 | "Hide Byte Range" : "Hide Byte Range", 19 | "Choose Algorithm" : "Choose Algorithm", 20 | "Start byte must be a valid number." : "Start byte must be a valid number.", 21 | "End byte must be a valid number." : "End byte must be a valid number.", 22 | "Error calculating checksum." : "Error calculating checksum." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/et_EE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmi tüüp „%s“ ei ole korrektne ega toetatud algoritmi tüüp.", 3 | "Start byte must be 0 or greater." : "Esimene bait peab olema 0 või sellest suurem number.", 4 | "End byte must be 0 or greater." : "Viimane bait peab olema 0 või sellest suurem number.", 5 | "Start byte must be less than end byte." : "Esimene bait peab olema viimasest baidist väiksem.", 6 | "File not found." : "Faili ei leitud.", 7 | "Checksum" : "Kontrollsumma", 8 | "Creating a hash checksum of a file." : "Faili kontrollräsi arvutamine.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Võimaldab kasutajatel luua failist räsi kontrollsumma.\nVõimalikud algoritmid on md5, sha1, sha256, sha384, sha512, sha3-256, sh3-512 ja crc32.\nLihtsalt ava faili detailide vaade (külgriba). Seal peaks olema uus vahekaart „Kontrollsumma“.\nVali algoritm ja see proovib arvutada vastava räsi.\nKui soovid teist algoritmi, siis kliki värskenda nuppu.", 10 | "Hash copied to clipboard." : "Räsi on kopeeritud lõikelauale.", 11 | "Start Byte" : "Esimene bait", 12 | "End Byte" : "Viimane bait", 13 | "e.g., 0" : "nt. 0", 14 | "e.g., 1024" : "nt 1924", 15 | "Advanced: Byte Range" : "Täiendav seadistus: baidivahemik", 16 | "Hide Byte Range" : "Peida baitide vahemik", 17 | "Choose Algorithm" : "Vali algoritm", 18 | "Start byte must be a valid number." : "Esimene bait peab olema korrektne number.", 19 | "End byte must be a valid number." : "Viimane bait peab olema korrektne number.", 20 | "Error calculating checksum." : "Viga kontrollsumma arvutamisel." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/sw.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Aina ya algoriti \"%s\" si aina ya algoriti halali au inayotumika.", 3 | "Start byte must be 0 or greater." : "Byte ya kuanzia lazima iwe 0 au kubwa zaidi", 4 | "End byte must be 0 or greater." : "Byte ya kumalizia lazima iwe 0 au kubwa zaidi", 5 | "Start byte must be less than end byte." : "Byte ya kuanzia lazima iwe ndogo ya byte ya kumalizia", 6 | "File not found." : "Faili halipo", 7 | "Checksum" : "Hundi", 8 | "Creating a hash checksum of a file." : "Inatengeneza hundi ya hash ya faili", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Inaruhusu watumiaji kuunda hundi ya hash ya faili.\nAlgorithms zinazowezekana ni md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 na crc32.\n\nFungua tu mtazamo wa maelezo ya faili (Sidebar). Lazima kuwe na tabo mpya inayoitwa \"Checksum\".\nChagua algorithm na itajaribu kutoa heshi.\nIkiwa unataka algorithm nyingine, bonyeza tu kwenye kitufe cha kupakia upya.", 10 | "Hash copied to clipboard." : "Hash imenakiliwa kwenye ubao wa kunakili", 11 | "Start Byte" : "Byte ya kuanzia", 12 | "End Byte" : "Byte ya kumalizia", 13 | "e.g., 0" : "e.g., 0", 14 | "e.g., 1024" : "e.g., 1024", 15 | "Advanced: Byte Range" : "Ya juu: Safu ya Byte", 16 | "Hide Byte Range" : "Ficha Safu ya Byte", 17 | "Choose Algorithm" : "Chagua Algorithm", 18 | "Start byte must be a valid number." : "Byte ya kuanzia lazima iwe nambari halali.", 19 | "End byte must be a valid number." : "Byte ya kumalizia lazima iwe nambari halali.", 20 | "Error calculating checksum." : "Hitilafu katika kuhesabu hundi." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/et_EE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmi tüüp „%s“ ei ole korrektne ega toetatud algoritmi tüüp.", 5 | "Start byte must be 0 or greater." : "Esimene bait peab olema 0 või sellest suurem number.", 6 | "End byte must be 0 or greater." : "Viimane bait peab olema 0 või sellest suurem number.", 7 | "Start byte must be less than end byte." : "Esimene bait peab olema viimasest baidist väiksem.", 8 | "File not found." : "Faili ei leitud.", 9 | "Checksum" : "Kontrollsumma", 10 | "Creating a hash checksum of a file." : "Faili kontrollräsi arvutamine.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Võimaldab kasutajatel luua failist räsi kontrollsumma.\nVõimalikud algoritmid on md5, sha1, sha256, sha384, sha512, sha3-256, sh3-512 ja crc32.\nLihtsalt ava faili detailide vaade (külgriba). Seal peaks olema uus vahekaart „Kontrollsumma“.\nVali algoritm ja see proovib arvutada vastava räsi.\nKui soovid teist algoritmi, siis kliki värskenda nuppu.", 12 | "Hash copied to clipboard." : "Räsi on kopeeritud lõikelauale.", 13 | "Start Byte" : "Esimene bait", 14 | "End Byte" : "Viimane bait", 15 | "e.g., 0" : "nt. 0", 16 | "e.g., 1024" : "nt 1924", 17 | "Advanced: Byte Range" : "Täiendav seadistus: baidivahemik", 18 | "Hide Byte Range" : "Peida baitide vahemik", 19 | "Choose Algorithm" : "Vali algoritm", 20 | "Start byte must be a valid number." : "Esimene bait peab olema korrektne number.", 21 | "End byte must be a valid number." : "Viimane bait peab olema korrektne number.", 22 | "Error calculating checksum." : "Viga kontrollsumma arvutamisel." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/sv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmtypen \"%s\" är inte giltig eller så stöds den inte.", 3 | "Start byte must be 0 or greater." : "Startposition måste vara 0 eller större.", 4 | "End byte must be 0 or greater." : "Slutposition måste vara 0 eller större", 5 | "Start byte must be less than end byte." : "Startposition måste vara mindre än slutposition.", 6 | "File not found." : "Filen hittades inte.", 7 | "Checksum" : "Checksumma", 8 | "Creating a hash checksum of a file." : "Skapar en hash-checksumma för filen.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Tillåter användare att skapa en hash-checksumma för en fil.\n Möjliga algoritmer är md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 och crc32.\n\n Öppna detaljvyn för filen (sidopanelen). Där finns en ny flik som heter \"Checksumma\".\n Välj en algoritm och den kommer att försöka generera en hash.\nOm du vill ha en annan algoritm klickar du bara på ladda om-knappen.", 10 | "Hash copied to clipboard." : "Hash kopierad till urklipp.", 11 | "Start Byte" : "Startposition", 12 | "End Byte" : "Slutposition", 13 | "e.g., 0" : "t.ex. 0", 14 | "e.g., 1024" : "t.ex. 1024", 15 | "Advanced: Byte Range" : "Avancerat: Positionsintervall", 16 | "Hide Byte Range" : "Dölj positionsintervall", 17 | "Choose Algorithm" : "Välj algoritm", 18 | "Start byte must be a valid number." : "Startposition måste vara ett giltigt tal.", 19 | "End byte must be a valid number." : "Slutposition måste vara ett giltigt tal.", 20 | "Error calculating checksum." : "Fel vid beräkning av kontrollsumma." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/sw.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Aina ya algoriti \"%s\" si aina ya algoriti halali au inayotumika.", 5 | "Start byte must be 0 or greater." : "Byte ya kuanzia lazima iwe 0 au kubwa zaidi", 6 | "End byte must be 0 or greater." : "Byte ya kumalizia lazima iwe 0 au kubwa zaidi", 7 | "Start byte must be less than end byte." : "Byte ya kuanzia lazima iwe ndogo ya byte ya kumalizia", 8 | "File not found." : "Faili halipo", 9 | "Checksum" : "Hundi", 10 | "Creating a hash checksum of a file." : "Inatengeneza hundi ya hash ya faili", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Inaruhusu watumiaji kuunda hundi ya hash ya faili.\nAlgorithms zinazowezekana ni md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 na crc32.\n\nFungua tu mtazamo wa maelezo ya faili (Sidebar). Lazima kuwe na tabo mpya inayoitwa \"Checksum\".\nChagua algorithm na itajaribu kutoa heshi.\nIkiwa unataka algorithm nyingine, bonyeza tu kwenye kitufe cha kupakia upya.", 12 | "Hash copied to clipboard." : "Hash imenakiliwa kwenye ubao wa kunakili", 13 | "Start Byte" : "Byte ya kuanzia", 14 | "End Byte" : "Byte ya kumalizia", 15 | "e.g., 0" : "e.g., 0", 16 | "e.g., 1024" : "e.g., 1024", 17 | "Advanced: Byte Range" : "Ya juu: Safu ya Byte", 18 | "Hide Byte Range" : "Ficha Safu ya Byte", 19 | "Choose Algorithm" : "Chagua Algorithm", 20 | "Start byte must be a valid number." : "Byte ya kuanzia lazima iwe nambari halali.", 21 | "End byte must be a valid number." : "Byte ya kumalizia lazima iwe nambari halali.", 22 | "Error calculating checksum." : "Hitilafu katika kuhesabu hundi." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/sv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmtypen \"%s\" är inte giltig eller så stöds den inte.", 5 | "Start byte must be 0 or greater." : "Startposition måste vara 0 eller större.", 6 | "End byte must be 0 or greater." : "Slutposition måste vara 0 eller större", 7 | "Start byte must be less than end byte." : "Startposition måste vara mindre än slutposition.", 8 | "File not found." : "Filen hittades inte.", 9 | "Checksum" : "Checksumma", 10 | "Creating a hash checksum of a file." : "Skapar en hash-checksumma för filen.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Tillåter användare att skapa en hash-checksumma för en fil.\n Möjliga algoritmer är md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 och crc32.\n\n Öppna detaljvyn för filen (sidopanelen). Där finns en ny flik som heter \"Checksumma\".\n Välj en algoritm och den kommer att försöka generera en hash.\nOm du vill ha en annan algoritm klickar du bara på ladda om-knappen.", 12 | "Hash copied to clipboard." : "Hash kopierad till urklipp.", 13 | "Start Byte" : "Startposition", 14 | "End Byte" : "Slutposition", 15 | "e.g., 0" : "t.ex. 0", 16 | "e.g., 1024" : "t.ex. 1024", 17 | "Advanced: Byte Range" : "Avancerat: Positionsintervall", 18 | "Hide Byte Range" : "Dölj positionsintervall", 19 | "Choose Algorithm" : "Välj algoritm", 20 | "Start byte must be a valid number." : "Startposition måste vara ett giltigt tal.", 21 | "End byte must be a valid number." : "Slutposition måste vara ett giltigt tal.", 22 | "Error calculating checksum." : "Fel vid beräkning av kontrollsumma." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/tr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "\"%s\" algoritma türü geçersiz ya da desteklenmiyor.", 3 | "Start byte must be 0 or greater." : "Başlangıç baytı 0 ya da daha büyük bir değer olmalıdır.", 4 | "End byte must be 0 or greater." : "Bitiş baytı 0 ya da daha büyük bir değer olmalıdır.", 5 | "Start byte must be less than end byte." : "Başlangıç baytı bitiş baytından küçük bir değer olmalıdır.", 6 | "File not found." : "Dosya bulunamadı.", 7 | "Checksum" : "Sağlama", 8 | "Creating a hash checksum of a file." : "Bir dosyanın karma sağlaması oluşturuluyor.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Kullanıcıların bir dosya karmasının sağlamasını oluşturmasını sağlar.\n Kullanılabilecek algoritmalar: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 ve crc32.\n\n Bir dosyanın ayrıntılarını açtıktan sonra (kenar çubuğundan). \"Sağlama\" sekmesini görmelisiniz.\n Bir algoritma seçtiğinizde karma oluşturulmaya çalışılır.\n Başka bir algoritma kullanmak isterseniz yeniden yükle düğmesine tıklayın.", 10 | "Hash copied to clipboard." : "Karma panoya kopyalandı.", 11 | "Start Byte" : "Başlangıç baytı", 12 | "End Byte" : "Bitiş baytı", 13 | "e.g., 0" : "Örnek: 0", 14 | "e.g., 1024" : "Örnek: 1024", 15 | "Advanced: Byte Range" : "Gelişmiş: Bayt aralığı", 16 | "Hide Byte Range" : "Bayt aralığını gizle", 17 | "Choose Algorithm" : "Algoritma seçin", 18 | "Start byte must be a valid number." : "Başlangıç baytı geçerli bir sayı olmalıdır.", 19 | "End byte must be a valid number." : "Bitiş baytı geçerli bir sayı olmalıdır.", 20 | "Error calculating checksum." : "Sağlama hesaplanırken sorun çıktı." 21 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 22 | } -------------------------------------------------------------------------------- /l10n/ug.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "ئالگورىزىم تىپى «%s» ئىناۋەتلىك ياكى قوللايدىغان ئالگورىزىم تىپى ئەمەس.", 3 | "Start byte must be 0 or greater." : "باشلىنىش بايتى 0 ياكى چوڭ بولىشى كېرەك", 4 | "End byte must be 0 or greater." : "ئاخىرلىشىش بايتى 0 ياكى چوڭ بولىشى كېرەك", 5 | "Start byte must be less than end byte." : "باشلىنىش بايتى ئاخىرلىشىش بايتىدىن كىچىك بولىشى كېرەك", 6 | "File not found." : "ھۆججەت تېپىلمىدى.", 7 | "Checksum" : "تەكشۈرۈش يىغىندىسى", 8 | "Creating a hash checksum of a file." : "ھۆججەتنىڭ Hash تەكشۈرۈشى قۇرۇش.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "ئىشلەتكۈچىلەرنىڭ ھۆججەتنىڭ hash تەكشۈرۈشىنى قۇرۇشىغا يول قويىدۇ.\n مۇمكىن بولغان ئالگورىزىملار md5 ، sha1 ، sha256 ، sha384 ، sha512 ، sha3-256 ، sha3-512 ۋە crc32.\n\n ھۆججەتنىڭ تەپسىلاتىنى كۆرۈڭ. «Checksum» دەپ ئاتىلىدىغان يېڭى بەتكۈچ بولۇشى كېرەك.\n ئالگورىزىمنى تاللاڭ ، ئۇ ھەش ھاسىل قىلىشقا تىرىشىدۇ.\n باشقا ئالگورىزىمغا ئېھتىياجلىق بولسىڭىز ، قايتا يۈكلەش كۇنۇپكىسىنى بېسىڭ.", 10 | "Hash copied to clipboard." : "Hash چاپلاش تاختىسىغا كۆچۈرۈلدى.", 11 | "Start Byte" : "باشلىنىش بايتى", 12 | "End Byte" : "ئاخىرلىشىش بايتى", 13 | "e.g., 0" : "مەسىلەن 0.4", 14 | "e.g., 1024" : "مەسىلەن 1024", 15 | "Advanced: Byte Range" : "ئىلغار: بايت دائىرىسى", 16 | "Hide Byte Range" : "بايت دائىرىسىنى يوشۇر", 17 | "Choose Algorithm" : "ئالگورىزىمنى تاللاڭ", 18 | "Start byte must be a valid number." : "باشلىنىش بايتى چوقۇم بىر ئىناۋەتلىك سان بولىشى كېرەك.", 19 | "End byte must be a valid number." : "ئاخىرلىشىش بايتى چوقۇم بىر ئىناۋەتلىك سان بولىشى كېرەك.", 20 | "Error calculating checksum." : "تەكشۈرۈش يىغىندىسىنى ھېسابلاش خاتالىقى" 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/tr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "\"%s\" algoritma türü geçersiz ya da desteklenmiyor.", 5 | "Start byte must be 0 or greater." : "Başlangıç baytı 0 ya da daha büyük bir değer olmalıdır.", 6 | "End byte must be 0 or greater." : "Bitiş baytı 0 ya da daha büyük bir değer olmalıdır.", 7 | "Start byte must be less than end byte." : "Başlangıç baytı bitiş baytından küçük bir değer olmalıdır.", 8 | "File not found." : "Dosya bulunamadı.", 9 | "Checksum" : "Sağlama", 10 | "Creating a hash checksum of a file." : "Bir dosyanın karma sağlaması oluşturuluyor.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Kullanıcıların bir dosya karmasının sağlamasını oluşturmasını sağlar.\n Kullanılabilecek algoritmalar: md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 ve crc32.\n\n Bir dosyanın ayrıntılarını açtıktan sonra (kenar çubuğundan). \"Sağlama\" sekmesini görmelisiniz.\n Bir algoritma seçtiğinizde karma oluşturulmaya çalışılır.\n Başka bir algoritma kullanmak isterseniz yeniden yükle düğmesine tıklayın.", 12 | "Hash copied to clipboard." : "Karma panoya kopyalandı.", 13 | "Start Byte" : "Başlangıç baytı", 14 | "End Byte" : "Bitiş baytı", 15 | "e.g., 0" : "Örnek: 0", 16 | "e.g., 1024" : "Örnek: 1024", 17 | "Advanced: Byte Range" : "Gelişmiş: Bayt aralığı", 18 | "Hide Byte Range" : "Bayt aralığını gizle", 19 | "Choose Algorithm" : "Algoritma seçin", 20 | "Start byte must be a valid number." : "Başlangıç baytı geçerli bir sayı olmalıdır.", 21 | "End byte must be a valid number." : "Bitiş baytı geçerli bir sayı olmalıdır.", 22 | "Error calculating checksum." : "Sağlama hesaplanırken sorun çıktı." 23 | }, 24 | "nplurals=2; plural=(n > 1);"); 25 | -------------------------------------------------------------------------------- /l10n/de.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Der Algorithmus-Typ \"%s\" ist kein gültiger oder unterstützter Algorithmus-Typ.", 3 | "Start byte must be 0 or greater." : "Startbyte muss 0 oder größer sein.", 4 | "End byte must be 0 or greater." : "Endbyte muss 0 oder größer sein.", 5 | "Start byte must be less than end byte." : "Das Startbyte muss kleiner als das Endbyte sein.", 6 | "File not found." : "Datei nicht gefunden.", 7 | "Checksum" : "Prüfsumme", 8 | "Creating a hash checksum of a file." : "Erstellen einer Hash-Prüfsumme einer Datei.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Ermöglicht den Benutzern, eine Hash-Prüfsumme über eine Datei zu erstellen.\n  Mögliche Algorithmen sind md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n  Öffne einfach die Detailansicht der Datei (Seitenleiste). Es sollte eine neue Registerkarte mit der Bezeichnung \"Prüfsumme\" geben.\n  Wähle einen Algorithmus aus und es wird versucht, einen Hash zu erzeugen. \n Wenn du einen anderen Algorithmus wünschst, klicke einfach auf die Schaltfläche \"Neu laden\".", 10 | "Hash copied to clipboard." : "Hash in die Zwischenablage kopiert.", 11 | "Start Byte" : "Startbyte", 12 | "End Byte" : "Endbyte", 13 | "e.g., 0" : "z. B. 0", 14 | "e.g., 1024" : "z. B. 1024", 15 | "Advanced: Byte Range" : "Erweitert: Bytebereich", 16 | "Hide Byte Range" : "Bytebereich verbergen", 17 | "Choose Algorithm" : "Algorithmus auswählen", 18 | "Start byte must be a valid number." : "Startbyte muss eine gültige Zahl sein.", 19 | "End byte must be a valid number." : "Endbyte muss eine gültige Zahl sein.", 20 | "Error calculating checksum." : "Fehler beim Berechnen der Prüfsumme." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/ug.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "ئالگورىزىم تىپى «%s» ئىناۋەتلىك ياكى قوللايدىغان ئالگورىزىم تىپى ئەمەس.", 5 | "Start byte must be 0 or greater." : "باشلىنىش بايتى 0 ياكى چوڭ بولىشى كېرەك", 6 | "End byte must be 0 or greater." : "ئاخىرلىشىش بايتى 0 ياكى چوڭ بولىشى كېرەك", 7 | "Start byte must be less than end byte." : "باشلىنىش بايتى ئاخىرلىشىش بايتىدىن كىچىك بولىشى كېرەك", 8 | "File not found." : "ھۆججەت تېپىلمىدى.", 9 | "Checksum" : "تەكشۈرۈش يىغىندىسى", 10 | "Creating a hash checksum of a file." : "ھۆججەتنىڭ Hash تەكشۈرۈشى قۇرۇش.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "ئىشلەتكۈچىلەرنىڭ ھۆججەتنىڭ hash تەكشۈرۈشىنى قۇرۇشىغا يول قويىدۇ.\n مۇمكىن بولغان ئالگورىزىملار md5 ، sha1 ، sha256 ، sha384 ، sha512 ، sha3-256 ، sha3-512 ۋە crc32.\n\n ھۆججەتنىڭ تەپسىلاتىنى كۆرۈڭ. «Checksum» دەپ ئاتىلىدىغان يېڭى بەتكۈچ بولۇشى كېرەك.\n ئالگورىزىمنى تاللاڭ ، ئۇ ھەش ھاسىل قىلىشقا تىرىشىدۇ.\n باشقا ئالگورىزىمغا ئېھتىياجلىق بولسىڭىز ، قايتا يۈكلەش كۇنۇپكىسىنى بېسىڭ.", 12 | "Hash copied to clipboard." : "Hash چاپلاش تاختىسىغا كۆچۈرۈلدى.", 13 | "Start Byte" : "باشلىنىش بايتى", 14 | "End Byte" : "ئاخىرلىشىش بايتى", 15 | "e.g., 0" : "مەسىلەن 0.4", 16 | "e.g., 1024" : "مەسىلەن 1024", 17 | "Advanced: Byte Range" : "ئىلغار: بايت دائىرىسى", 18 | "Hide Byte Range" : "بايت دائىرىسىنى يوشۇر", 19 | "Choose Algorithm" : "ئالگورىزىمنى تاللاڭ", 20 | "Start byte must be a valid number." : "باشلىنىش بايتى چوقۇم بىر ئىناۋەتلىك سان بولىشى كېرەك.", 21 | "End byte must be a valid number." : "ئاخىرلىشىش بايتى چوقۇم بىر ئىناۋەتلىك سان بولىشى كېرەك.", 22 | "Error calculating checksum." : "تەكشۈرۈش يىغىندىسىنى ھېسابلاش خاتالىقى" 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/pt_BR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "O tipo de algoritmo \"%s\" não é um tipo de algoritmo válido ou compatível.", 3 | "Start byte must be 0 or greater." : "O byte inicial deve ser 0 ou maior.", 4 | "End byte must be 0 or greater." : "O byte final deve ser 0 ou maior.", 5 | "Start byte must be less than end byte." : "O byte inicial deve ser menor que o byte final.", 6 | "File not found." : "Arquivo não encontrado.", 7 | "Checksum" : "Checksum", 8 | "Creating a hash checksum of a file." : "Criando uma soma de verificação hash de um arquivo.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite que os usuários criem uma soma de verificação hash de um arquivo.\nOs algoritmos possíveis são md5, sha1, sha256, sha384, sha512, sha3-512 e crc32.\n\nBasta abrir a visualização de detalhes do arquivo (barra lateral). Deve haver uma nova aba chamada \"Checksum\".\nSelecione um algoritmo e ele tentará gerar um hash.\nSe você quiser um outro algoritmo, basta clicar no botão recarregar.", 10 | "Hash copied to clipboard." : "Hash copiado para a área de transferência.", 11 | "Start Byte" : "Byte Inicial", 12 | "End Byte" : "Byte Final", 13 | "e.g., 0" : "p. ex., 0", 14 | "e.g., 1024" : "p. ex., 1024", 15 | "Advanced: Byte Range" : "Avançado: Intervalo de Bytes", 16 | "Hide Byte Range" : "Ocultar Intervalo de Bytes", 17 | "Choose Algorithm" : "Escolha Algoritmo", 18 | "Start byte must be a valid number." : "O byte inicial deve ser um número válido.", 19 | "End byte must be a valid number." : "O byte final deve ser um número válido.", 20 | "Error calculating checksum." : "Erro ao calcular a soma de verificação." 21 | },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 22 | } -------------------------------------------------------------------------------- /l10n/de.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Der Algorithmus-Typ \"%s\" ist kein gültiger oder unterstützter Algorithmus-Typ.", 5 | "Start byte must be 0 or greater." : "Startbyte muss 0 oder größer sein.", 6 | "End byte must be 0 or greater." : "Endbyte muss 0 oder größer sein.", 7 | "Start byte must be less than end byte." : "Das Startbyte muss kleiner als das Endbyte sein.", 8 | "File not found." : "Datei nicht gefunden.", 9 | "Checksum" : "Prüfsumme", 10 | "Creating a hash checksum of a file." : "Erstellen einer Hash-Prüfsumme einer Datei.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Ermöglicht den Benutzern, eine Hash-Prüfsumme über eine Datei zu erstellen.\n  Mögliche Algorithmen sind md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n  Öffne einfach die Detailansicht der Datei (Seitenleiste). Es sollte eine neue Registerkarte mit der Bezeichnung \"Prüfsumme\" geben.\n  Wähle einen Algorithmus aus und es wird versucht, einen Hash zu erzeugen. \n Wenn du einen anderen Algorithmus wünschst, klicke einfach auf die Schaltfläche \"Neu laden\".", 12 | "Hash copied to clipboard." : "Hash in die Zwischenablage kopiert.", 13 | "Start Byte" : "Startbyte", 14 | "End Byte" : "Endbyte", 15 | "e.g., 0" : "z. B. 0", 16 | "e.g., 1024" : "z. B. 1024", 17 | "Advanced: Byte Range" : "Erweitert: Bytebereich", 18 | "Hide Byte Range" : "Bytebereich verbergen", 19 | "Choose Algorithm" : "Algorithmus auswählen", 20 | "Start byte must be a valid number." : "Startbyte muss eine gültige Zahl sein.", 21 | "End byte must be a valid number." : "Endbyte muss eine gültige Zahl sein.", 22 | "Error calculating checksum." : "Fehler beim Berechnen der Prüfsumme." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/de_DE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Der Algorithmus-Typ \"%s\" ist kein gültiger oder unterstützter Algorithmus-Typ.", 3 | "Start byte must be 0 or greater." : "Startbyte muss 0 oder größer sein.", 4 | "End byte must be 0 or greater." : "Endbyte muss 0 oder größer sein.", 5 | "Start byte must be less than end byte." : "Das Startbyte muss kleiner als das Endbyte sein.", 6 | "File not found." : "Datei nicht gefunden.", 7 | "Checksum" : "Prüfsumme", 8 | "Creating a hash checksum of a file." : "Erstellen einer Hash-Prüfsumme über eine Datei.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Ermöglicht den Benutzern, eine Hash-Prüfsumme über eine Datei zu erstellen.\n  Mögliche Algorithmen sind md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 und crc32.\n\n  Öffnen Sie einfach die Detailansicht der Datei (Seitenleiste). Es sollte eine neue Registerkarte mit der Bezeichnung \"Prüfsumme\" geben.\n  Wählen Sie einen Algorithmus aus und es wird versucht, einen Hash zu erzeugen. \n Wenn Sie einen anderen Algorithmus wünschen, klicken Sie einfach auf die Schaltfläche \"Neu laden\".", 10 | "Hash copied to clipboard." : "Hash in die Zwischenablage kopiert.", 11 | "Start Byte" : "Startbyte", 12 | "End Byte" : "Endbyte", 13 | "e.g., 0" : "z. B. 0", 14 | "e.g., 1024" : "z. B. 1024", 15 | "Advanced: Byte Range" : "Erweitert: Bytebereich", 16 | "Hide Byte Range" : "Bytebereich verbergen", 17 | "Choose Algorithm" : "Algorithmus auswählen", 18 | "Start byte must be a valid number." : "Startbyte muss eine gültige Zahl sein.", 19 | "End byte must be a valid number." : "Endbyte muss eine gültige Zahl sein.", 20 | "Error calculating checksum." : "Fehler beim Berechnen der Prüfsumme." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/pt_BR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "O tipo de algoritmo \"%s\" não é um tipo de algoritmo válido ou compatível.", 5 | "Start byte must be 0 or greater." : "O byte inicial deve ser 0 ou maior.", 6 | "End byte must be 0 or greater." : "O byte final deve ser 0 ou maior.", 7 | "Start byte must be less than end byte." : "O byte inicial deve ser menor que o byte final.", 8 | "File not found." : "Arquivo não encontrado.", 9 | "Checksum" : "Checksum", 10 | "Creating a hash checksum of a file." : "Criando uma soma de verificação hash de um arquivo.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite que os usuários criem uma soma de verificação hash de um arquivo.\nOs algoritmos possíveis são md5, sha1, sha256, sha384, sha512, sha3-512 e crc32.\n\nBasta abrir a visualização de detalhes do arquivo (barra lateral). Deve haver uma nova aba chamada \"Checksum\".\nSelecione um algoritmo e ele tentará gerar um hash.\nSe você quiser um outro algoritmo, basta clicar no botão recarregar.", 12 | "Hash copied to clipboard." : "Hash copiado para a área de transferência.", 13 | "Start Byte" : "Byte Inicial", 14 | "End Byte" : "Byte Final", 15 | "e.g., 0" : "p. ex., 0", 16 | "e.g., 1024" : "p. ex., 1024", 17 | "Advanced: Byte Range" : "Avançado: Intervalo de Bytes", 18 | "Hide Byte Range" : "Ocultar Intervalo de Bytes", 19 | "Choose Algorithm" : "Escolha Algoritmo", 20 | "Start byte must be a valid number." : "O byte inicial deve ser um número válido.", 21 | "End byte must be a valid number." : "O byte final deve ser um número válido.", 22 | "Error calculating checksum." : "Erro ao calcular a soma de verificação." 23 | }, 24 | "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 25 | -------------------------------------------------------------------------------- /l10n/de_DE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Der Algorithmus-Typ \"%s\" ist kein gültiger oder unterstützter Algorithmus-Typ.", 5 | "Start byte must be 0 or greater." : "Startbyte muss 0 oder größer sein.", 6 | "End byte must be 0 or greater." : "Endbyte muss 0 oder größer sein.", 7 | "Start byte must be less than end byte." : "Das Startbyte muss kleiner als das Endbyte sein.", 8 | "File not found." : "Datei nicht gefunden.", 9 | "Checksum" : "Prüfsumme", 10 | "Creating a hash checksum of a file." : "Erstellen einer Hash-Prüfsumme über eine Datei.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Ermöglicht den Benutzern, eine Hash-Prüfsumme über eine Datei zu erstellen.\n  Mögliche Algorithmen sind md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 und crc32.\n\n  Öffnen Sie einfach die Detailansicht der Datei (Seitenleiste). Es sollte eine neue Registerkarte mit der Bezeichnung \"Prüfsumme\" geben.\n  Wählen Sie einen Algorithmus aus und es wird versucht, einen Hash zu erzeugen. \n Wenn Sie einen anderen Algorithmus wünschen, klicken Sie einfach auf die Schaltfläche \"Neu laden\".", 12 | "Hash copied to clipboard." : "Hash in die Zwischenablage kopiert.", 13 | "Start Byte" : "Startbyte", 14 | "End Byte" : "Endbyte", 15 | "e.g., 0" : "z. B. 0", 16 | "e.g., 1024" : "z. B. 1024", 17 | "Advanced: Byte Range" : "Erweitert: Bytebereich", 18 | "Hide Byte Range" : "Bytebereich verbergen", 19 | "Choose Algorithm" : "Algorithmus auswählen", 20 | "Start byte must be a valid number." : "Startbyte muss eine gültige Zahl sein.", 21 | "End byte must be a valid number." : "Endbyte muss eine gültige Zahl sein.", 22 | "Error calculating checksum." : "Fehler beim Berechnen der Prüfsumme." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/gl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "O tipo de algoritmo «%s» non é un tipo de algoritmo válido nin admitido.", 3 | "Start byte must be 0 or greater." : "O byte inicial debe ser 0 ou maior.", 4 | "End byte must be 0 or greater." : "O byte final debe ser 0 ou maior.", 5 | "Start byte must be less than end byte." : "O byte inicial debe ser menor que o byte final.", 6 | "File not found." : "Non se atopou o ficheiro", 7 | "Checksum" : "Suma de comprobación", 8 | "Creating a hash checksum of a file." : "Creando un resumo de suma de comprobación dun ficheiro.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite aos usuarios crear un resumo de suma de comprobación dun ficheiro.\n Os algoritmos posíbeis son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 e crc32.\n\n Só ten que abrir a vista de detalles do ficheiro (Barra lateral). Debería haber unha nova lapela chamada «Suma de comprobación».\n Seleccione un algoritmo e tentará xerar un resumo criptográfico.\n Se quere outro algoritmo, prema no botón de recargar.", 10 | "Hash copied to clipboard." : "O resumo criptográfico foi copiado no portapapeis.", 11 | "Start Byte" : "Byte inicial", 12 | "End Byte" : "Byte final", 13 | "e.g., 0" : "p. ex., 0", 14 | "e.g., 1024" : "p. ex., 1024", 15 | "Advanced: Byte Range" : "Avanzado: Intervalo de bytes", 16 | "Hide Byte Range" : "Agochar o intervalo de bytes", 17 | "Choose Algorithm" : "Escoller o algoritmo", 18 | "Start byte must be a valid number." : "O byte inicial debe ser un número válido.", 19 | "End byte must be a valid number." : "O byte final debe ser un número válido.", 20 | "Error calculating checksum." : "Produciuse un erro ao calcular a suma de comprobación." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/ga.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Ní cineál algartam bailí nó tacaithe é an cineál algartam \"%s\".", 3 | "Start byte must be 0 or greater." : "Ní mór don bheart tosaigh a bheith 0 nó níos mó.", 4 | "End byte must be 0 or greater." : "Ní mór don bheart deiridh a bheith 0 nó níos mó.", 5 | "Start byte must be less than end byte." : "Ní mór don chéad bheart a bheith níos lú ná don deiridh bheart.", 6 | "File not found." : "Comhad gan aimsiú.", 7 | "Checksum" : "Seiceam", 8 | "Creating a hash checksum of a file." : "Ag cruthú seiceála hash de chomhad.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Ligeann sé d'úsáideoirí seiceála hash comhaid a chruthú.\nIs iad na halgartaim a d’fhéadfadh a bheith ann ná md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 agus crc32.\n\nNíl le déanamh ach radharc sonraí an chomhaid a oscailt (Bar Taoibh). Ba chóir go mbeadh cluaisín nua ar a dtugtar \"Seiceáil\".\nRoghnaigh algartam agus déanfaidh sé iarracht hash a ghiniúint.\nMás mian leat algartam eile, níl le déanamh ach cliceáil ar an gcnaipe athlódála.", 10 | "Hash copied to clipboard." : "Chóipeáil Hash chuig an ngearrthaisce.", 11 | "Start Byte" : "Beart Tosaigh", 12 | "End Byte" : "Deireadh Beart", 13 | "e.g., 0" : "m.sh., 0", 14 | "e.g., 1024" : "m.sh., 1024", 15 | "Advanced: Byte Range" : "Ardleibhéal: Raon Beart", 16 | "Hide Byte Range" : "Folaigh Raon Beart", 17 | "Choose Algorithm" : "Roghnaigh Algartam", 18 | "Start byte must be a valid number." : "Ní mór don chéad bheart a bheith ina uimhir bhailí.", 19 | "End byte must be a valid number." : "Ní mór don bheart deiridh a bheith ina uimhir bhailí.", 20 | "Error calculating checksum." : "Earráid ag ríomh suim seiceála." 21 | },"pluralForm" :"nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);" 22 | } -------------------------------------------------------------------------------- /l10n/gl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "O tipo de algoritmo «%s» non é un tipo de algoritmo válido nin admitido.", 5 | "Start byte must be 0 or greater." : "O byte inicial debe ser 0 ou maior.", 6 | "End byte must be 0 or greater." : "O byte final debe ser 0 ou maior.", 7 | "Start byte must be less than end byte." : "O byte inicial debe ser menor que o byte final.", 8 | "File not found." : "Non se atopou o ficheiro", 9 | "Checksum" : "Suma de comprobación", 10 | "Creating a hash checksum of a file." : "Creando un resumo de suma de comprobación dun ficheiro.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Permite aos usuarios crear un resumo de suma de comprobación dun ficheiro.\n Os algoritmos posíbeis son md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 e crc32.\n\n Só ten que abrir a vista de detalles do ficheiro (Barra lateral). Debería haber unha nova lapela chamada «Suma de comprobación».\n Seleccione un algoritmo e tentará xerar un resumo criptográfico.\n Se quere outro algoritmo, prema no botón de recargar.", 12 | "Hash copied to clipboard." : "O resumo criptográfico foi copiado no portapapeis.", 13 | "Start Byte" : "Byte inicial", 14 | "End Byte" : "Byte final", 15 | "e.g., 0" : "p. ex., 0", 16 | "e.g., 1024" : "p. ex., 1024", 17 | "Advanced: Byte Range" : "Avanzado: Intervalo de bytes", 18 | "Hide Byte Range" : "Agochar o intervalo de bytes", 19 | "Choose Algorithm" : "Escoller o algoritmo", 20 | "Start byte must be a valid number." : "O byte inicial debe ser un número válido.", 21 | "End byte must be a valid number." : "O byte final debe ser un número válido.", 22 | "Error calculating checksum." : "Produciuse un erro ao calcular a suma de comprobación." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/ga.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Ní cineál algartam bailí nó tacaithe é an cineál algartam \"%s\".", 5 | "Start byte must be 0 or greater." : "Ní mór don bheart tosaigh a bheith 0 nó níos mó.", 6 | "End byte must be 0 or greater." : "Ní mór don bheart deiridh a bheith 0 nó níos mó.", 7 | "Start byte must be less than end byte." : "Ní mór don chéad bheart a bheith níos lú ná don deiridh bheart.", 8 | "File not found." : "Comhad gan aimsiú.", 9 | "Checksum" : "Seiceam", 10 | "Creating a hash checksum of a file." : "Ag cruthú seiceála hash de chomhad.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Ligeann sé d'úsáideoirí seiceála hash comhaid a chruthú.\nIs iad na halgartaim a d’fhéadfadh a bheith ann ná md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 agus crc32.\n\nNíl le déanamh ach radharc sonraí an chomhaid a oscailt (Bar Taoibh). Ba chóir go mbeadh cluaisín nua ar a dtugtar \"Seiceáil\".\nRoghnaigh algartam agus déanfaidh sé iarracht hash a ghiniúint.\nMás mian leat algartam eile, níl le déanamh ach cliceáil ar an gcnaipe athlódála.", 12 | "Hash copied to clipboard." : "Chóipeáil Hash chuig an ngearrthaisce.", 13 | "Start Byte" : "Beart Tosaigh", 14 | "End Byte" : "Deireadh Beart", 15 | "e.g., 0" : "m.sh., 0", 16 | "e.g., 1024" : "m.sh., 1024", 17 | "Advanced: Byte Range" : "Ardleibhéal: Raon Beart", 18 | "Hide Byte Range" : "Folaigh Raon Beart", 19 | "Choose Algorithm" : "Roghnaigh Algartam", 20 | "Start byte must be a valid number." : "Ní mór don chéad bheart a bheith ina uimhir bhailí.", 21 | "End byte must be a valid number." : "Ní mór don bheart deiridh a bheith ina uimhir bhailí.", 22 | "Error calculating checksum." : "Earráid ag ríomh suim seiceála." 23 | }, 24 | "nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);"); 25 | -------------------------------------------------------------------------------- /l10n/cs.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmus typu „%s“ není platným nebo podporovaným typem algoritmu.", 3 | "Start byte must be 0 or greater." : "Je třeba, aby počáteční bajt byl 0 nebo vyšší.", 4 | "End byte must be 0 or greater." : "Je třeba, aby koncový bajt byl 0 nebo vyšší.", 5 | "Start byte must be less than end byte." : "Je třeba, aby počáteční bajt byl nižší než ten koncový.", 6 | "File not found." : "Soubor nenalezen.", 7 | "Checksum" : "Kontrolní součet", 8 | "Creating a hash checksum of a file." : "Vytváří se otisk kontrolního součtu souboru.", 9 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Umožňuje uživatelům vytvářet otisky kontrolních součtů a vytvářet tak kontrolní součty souborů.\n Možné algoritmy jsou md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 a crc32.\n\n Stačí pouze otevřít zobrazení podrobností o souboru (postranní panel). Měla by se zde nacházet nová karta nazvaná „Kontrolní součet“\n Vyberte algoritmus a pokusí se vytvořit otisk.\n Pokud chcete použít jiný algoritmus, stačí kliknout na tlačítko „Načíst znovu“.", 10 | "Hash copied to clipboard." : "Otisk zkopírován do schránky.", 11 | "Start Byte" : "Počáteční bajt", 12 | "End Byte" : "Koncový bajt", 13 | "e.g., 0" : "např. 0", 14 | "e.g., 1024" : "např. 1024", 15 | "Advanced: Byte Range" : "Pokročilé: rozsah bajtů", 16 | "Hide Byte Range" : "Skrýt rozsah bajtů", 17 | "Choose Algorithm" : "Zvolte algoritmus", 18 | "Start byte must be a valid number." : "Je třeba, aby počáteční bajt bylo platné číslo.", 19 | "End byte must be a valid number." : "Je třeba, aby koncový bajt bylo platné číslo.", 20 | "Error calculating checksum." : "Chyba při vypočítávání kontrolního součtu." 21 | },"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;" 22 | } -------------------------------------------------------------------------------- /l10n/cs.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "checksum", 3 | { 4 | "The algorithm type \"%s\" is not a valid or supported algorithm type." : "Algoritmus typu „%s“ není platným nebo podporovaným typem algoritmu.", 5 | "Start byte must be 0 or greater." : "Je třeba, aby počáteční bajt byl 0 nebo vyšší.", 6 | "End byte must be 0 or greater." : "Je třeba, aby koncový bajt byl 0 nebo vyšší.", 7 | "Start byte must be less than end byte." : "Je třeba, aby počáteční bajt byl nižší než ten koncový.", 8 | "File not found." : "Soubor nenalezen.", 9 | "Checksum" : "Kontrolní součet", 10 | "Creating a hash checksum of a file." : "Vytváří se otisk kontrolního součtu souboru.", 11 | "Allows users to create a hash checksum of a file.\n Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.\n\n Just open the details view of the file (Sidebar). There should be a new tab called \"Checksum\".\n Select a algorithm and it will try to generate a hash.\n If you want an other algorithm, just click on the reload button." : "Umožňuje uživatelům vytvářet otisky kontrolních součtů a vytvářet tak kontrolní součty souborů.\n Možné algoritmy jsou md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 a crc32.\n\n Stačí pouze otevřít zobrazení podrobností o souboru (postranní panel). Měla by se zde nacházet nová karta nazvaná „Kontrolní součet“\n Vyberte algoritmus a pokusí se vytvořit otisk.\n Pokud chcete použít jiný algoritmus, stačí kliknout na tlačítko „Načíst znovu“.", 12 | "Hash copied to clipboard." : "Otisk zkopírován do schránky.", 13 | "Start Byte" : "Počáteční bajt", 14 | "End Byte" : "Koncový bajt", 15 | "e.g., 0" : "např. 0", 16 | "e.g., 1024" : "např. 1024", 17 | "Advanced: Byte Range" : "Pokročilé: rozsah bajtů", 18 | "Hide Byte Range" : "Skrýt rozsah bajtů", 19 | "Choose Algorithm" : "Zvolte algoritmus", 20 | "Start byte must be a valid number." : "Je třeba, aby počáteční bajt bylo platné číslo.", 21 | "End byte must be a valid number." : "Je třeba, aby koncový bajt bylo platné číslo.", 22 | "Error calculating checksum." : "Chyba při vypočítávání kontrolního součtu." 23 | }, 24 | "nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"); 25 | -------------------------------------------------------------------------------- /src/composables/useClipboard.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2021 Patrick Herzberg 3 | * 4 | * @author Patrick Herzberg 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | import { ref, type Ref } from "vue"; 24 | 25 | export interface UseClipboardReturn { 26 | copied: Ref; 27 | copyToClipboard: (text: string, fallbackSelector?: string) => Promise; 28 | resetCopied: () => void; 29 | } 30 | 31 | /** 32 | * Composable for clipboard operations 33 | */ 34 | export function useClipboard(): UseClipboardReturn { 35 | const copied = ref(false); 36 | 37 | /** 38 | * Copy text to clipboard. 39 | * @param text - The text to copy. 40 | * @param fallbackSelector - DOM selector for fallback method. 41 | */ 42 | const copyToClipboard = async ( 43 | text: string, 44 | fallbackSelector: string = "#checksum-hash", 45 | ): Promise => { 46 | try { 47 | if (navigator?.clipboard?.writeText) { 48 | await navigator.clipboard.writeText(text); 49 | } else { 50 | // Fallback for older browsers 51 | const copyText = 52 | document.querySelector(fallbackSelector); 53 | if (copyText) { 54 | copyText.select(); 55 | document.execCommand("copy"); 56 | } 57 | } 58 | copied.value = true; 59 | 60 | // Auto-reset after 3 seconds 61 | setTimeout(() => { 62 | copied.value = false; 63 | }, 3000); 64 | } catch (err) { 65 | console.error("Failed to copy to clipboard:", err); 66 | } 67 | }; 68 | 69 | /** 70 | * Reset the copied state. 71 | */ 72 | const resetCopied = (): void => { 73 | copied.value = false; 74 | }; 75 | 76 | return { 77 | copied, 78 | copyToClipboard, 79 | resetCopied, 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /Changelog.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | **2.0.3** 4 | - fixes 5 | 6 | **2.0.0** 7 | 8 | - vue3 upgrade (thx to @st3iny) 9 | - switched to vite build 10 | - switch to typescript 11 | - implemented byte range option 12 | 13 | **1.2.7** 14 | 15 | - Updated info.xml > removed max version. (thx to @cociweb) 16 | 17 | **1.2.6** 18 | 19 | - Updated info.xml > bump nextcloud support to version 31. 20 | 21 | **1.2.5** 22 | 23 | - Updated info.xml > bump nextcloud support to version 30. 24 | 25 | **1.2.4** 26 | 27 | - Updated info.xml > bump nextcloud support to version 29. 28 | 29 | **1.2.3** 30 | 31 | - Updated info.xml > bump nextcloud support to version 28. 32 | 33 | **1.2.2** 34 | 35 | - Updated info.xml > bump nextcloud support to version 27. 36 | 37 | **1.2.1** 38 | 39 | - Updated info.xml > bump nextcloud support to version 26. 40 | 41 | **1.2.0** 42 | 43 | - Fix failed release - present development files. 44 | - Adding sha3. (thx for mentioning @tuxmaster5000) 45 | - Adding copy to clipboard. 46 | - Removed Nextcloud support for version 20 and older. 47 | 48 | **1.1.5** 49 | 50 | - Updated info.xml > bump nextcloud support to version 25. 51 | 52 | **1.1.4** 53 | 54 | - Updated info.xml > bump nextcloud support to version 24. 55 | - Updated node dependencies. 56 | 57 | **1.1.3** 58 | 59 | - Updated info.xml > bump nextcloud support to version 23. 60 | - Updated node dependencies. 61 | 62 | **1.1.2** 63 | 64 | - Fixes wrong label for sha512 checksum. (thx to @st3iny) 65 | - Refactor checksum controller to appropriate nc folder class. (thx to @st3iny) 66 | - Centralize algorithms in javascript. 67 | 68 | **1.1.1** 69 | 70 | - NC 20|21: Fixes issue on checksum files in folders not working. 71 | - NC 21: Fixed issue on fileinfo change not resetting view. 72 | 73 | **1.1.0** 74 | 75 | - Upgrade frontend to vue. (thx to @st3iny for the basics) 76 | - Added possibility to translate via transifex. 77 | - Added crc32b algorithm. 78 | 79 | **1.0.1** 80 | 81 | - Updated controller for backwards compatibility down to php7.2. 82 | 83 | **1.0.0** 84 | 85 | - Checksum app with this version is now nextcloud only. Breaking changes enforcing this. (thx to @st3iny) 86 | 87 | **0.4.5** 88 | 89 | - Updated info.xml > bump nextcloud support to version 19. (thx to @enoch85) 90 | - Changed app icon. (thx to @The-EDev) 91 | 92 | **0.4.4** 93 | 94 | - Updated info.xml > bump nextcloud support to version 18. (thx to @xXpc-freakXx) 95 | 96 | **0.4.3** 97 | 98 | - Add tab icon. (thx to @confusedguy9) 99 | 100 | **0.4.2** 101 | 102 | - Updated info.xml > bump nextcloud support to version 15. 103 | 104 | **0.4.1** 105 | 106 | - Updated info.xml > bump nextcloud support to version 14. (thx to @ArisenDrake) 107 | 108 | **0.3.6** 109 | 110 | - Updated info.xml > bump nextcloud support to version 13. (thx to @Eisfunke) 111 | 112 | **0.3.5** 113 | 114 | - Changed the documentation-links to master. (thx to @DJCrashdummy) 115 | - Adding gif to description. (thx to @jospoortvliet) 116 | 117 | **0.3.4** 118 | 119 | - Updated info.xml. 120 | - Added error handling if hash algorithm is not supported by server. 121 | - Added reload button on ajax error response. 122 | 123 | **0.3.3** 124 | 125 | - Added sha384. 126 | 127 | **0.3.2** 128 | 129 | - Updated readme. 130 | - Added changelog. 131 | 132 | **0.3.1** 133 | 134 | - Allow unprivileged users to create checksums. 135 | - Reload button. 136 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2021 Patrick Herzberg 3 | * 4 | * @author Patrick Herzberg 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | import { createApp, type App } from "vue"; 23 | import { translate as t } from "@nextcloud/l10n"; 24 | import ChecksumTab from "./views/ChecksumTab.vue"; 25 | import type { FileInfo } from "./types"; 26 | 27 | // Define the sidebar tab configuration 28 | interface SidebarTabConfig { 29 | id: string; 30 | name: string; 31 | icon: string; 32 | mount: (el: HTMLElement, fileInfo: FileInfo, context: unknown) => void; 33 | update: (fileInfo: FileInfo) => void; 34 | destroy: () => void; 35 | enabled: (fileInfo: FileInfo) => boolean; 36 | } 37 | 38 | // Define the sidebar tab interface 39 | interface SidebarTab { 40 | id: string; 41 | name: string; 42 | icon: string; 43 | mount: (el: HTMLElement, fileInfo: FileInfo, context: unknown) => void; 44 | update: (fileInfo: FileInfo) => void; 45 | destroy: () => void; 46 | enabled: (fileInfo: FileInfo) => boolean; 47 | } 48 | 49 | // Extend global Window interface 50 | declare global { 51 | interface Window { 52 | OCA: { 53 | Files?: { 54 | Sidebar?: { 55 | Tab: new (config: SidebarTabConfig) => SidebarTab; 56 | registerTab: (tab: SidebarTab) => void; 57 | }; 58 | }; 59 | }; 60 | } 61 | } 62 | 63 | // Define the ChecksumTab component instance type 64 | interface ChecksumTabInstance { 65 | update: (fileInfo: FileInfo) => void; 66 | } 67 | 68 | let tabApp: App | null = null; 69 | let tabVm: ChecksumTabInstance | null = null; 70 | 71 | window.addEventListener("DOMContentLoaded", () => { 72 | if (window.OCA?.Files?.Sidebar) { 73 | const checksumTab = new window.OCA.Files.Sidebar.Tab({ 74 | id: "checksum", 75 | name: t("checksum", "Checksum"), 76 | icon: "icon-category-auth", 77 | 78 | mount(el: HTMLElement, fileInfo: FileInfo): void { 79 | // Destroy old tab if present 80 | tabApp?.unmount(); 81 | 82 | tabApp = createApp(ChecksumTab); 83 | const vm = tabApp.mount(el) as unknown as ChecksumTabInstance; 84 | tabVm = vm; 85 | tabVm.update(fileInfo); 86 | }, 87 | update(fileInfo: FileInfo): void { 88 | tabVm?.update(fileInfo); 89 | }, 90 | destroy(): void { 91 | tabApp?.unmount(); 92 | tabApp = null; 93 | tabVm = null; 94 | }, 95 | enabled(fileInfo: FileInfo): boolean { 96 | return fileInfo.type === "file"; 97 | }, 98 | }); 99 | window.OCA.Files.Sidebar.registerTab(checksumTab); 100 | } 101 | }); 102 | -------------------------------------------------------------------------------- /src/composables/useChecksum.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2021 Patrick Herzberg 3 | * 4 | * @author Patrick Herzberg 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * 20 | */ 21 | 22 | import { ref, type Ref } from "vue"; 23 | import { generateUrl } from "@nextcloud/router"; 24 | import { translate as t } from "@nextcloud/l10n"; 25 | import axios, { type AxiosError } from "@nextcloud/axios"; 26 | import algorithms from "@/Model/Algorithms"; 27 | import type { Algorithm, FileInfo, ChecksumResponse } from "@/types"; 28 | 29 | export interface UseChecksumReturn { 30 | loading: Ref; 31 | hash: Ref; 32 | algorithm: Ref; 33 | algorithms: Algorithm[]; 34 | fetchChecksum: ( 35 | algorithmType: string, 36 | byteStart?: number | null, 37 | byteEnd?: number | null, 38 | ) => Promise; 39 | resetChecksum: () => void; 40 | setFileInfo: (info: FileInfo) => void; 41 | } 42 | 43 | /** 44 | * Composable for checksum calculation and validation 45 | */ 46 | export function useChecksum(): UseChecksumReturn { 47 | // State 48 | const loading = ref(false); 49 | const hash = ref(""); 50 | const algorithm = ref(algorithms[0] as Algorithm); 51 | const fileInfo = ref(null); 52 | 53 | /** 54 | * Fetches the checksum from the server. 55 | * @param algorithmType - The hash algorithm type. 56 | * @param byteStart - Optional start byte offset. 57 | * @param byteEnd - Optional end byte offset. 58 | * @return The calculated hash. 59 | * @throws Error if the request fails. 60 | */ 61 | const fetchChecksum = async ( 62 | algorithmType: string, 63 | byteStart: number | null = null, 64 | byteEnd: number | null = null, 65 | ): Promise => { 66 | loading.value = true; 67 | 68 | const url = generateUrl("/apps/checksum/check"); 69 | const params: Record = { 70 | source: `${fileInfo.value?.path}/${fileInfo.value?.name}`, 71 | type: algorithmType, 72 | }; 73 | 74 | // Add byte range parameters if they are set 75 | if (byteStart !== null) { 76 | params.byteStart = byteStart; 77 | } 78 | if (byteEnd !== null) { 79 | params.byteEnd = byteEnd; 80 | } 81 | 82 | try { 83 | const response = await axios.get(url, { params }); 84 | loading.value = false; 85 | hash.value = response.data.msg; 86 | return response.data.msg; 87 | } catch (err) { 88 | console.error(err); 89 | loading.value = false; 90 | const error = err as AxiosError; 91 | const errorMsg = 92 | error.response?.data?.msg || 93 | t("checksum", "Error calculating checksum."); 94 | throw new Error(errorMsg); 95 | } 96 | }; 97 | 98 | /** 99 | * Reset the checksum state. 100 | */ 101 | const resetChecksum = (): void => { 102 | loading.value = false; 103 | algorithm.value = algorithms[0] as Algorithm; 104 | hash.value = ""; 105 | }; 106 | 107 | /** 108 | * Update the file info. 109 | * @param info - The file info object. 110 | */ 111 | const setFileInfo = (info: FileInfo): void => { 112 | fileInfo.value = info; 113 | }; 114 | 115 | return { 116 | // State 117 | loading, 118 | hash, 119 | algorithm, 120 | algorithms, 121 | 122 | // Methods 123 | fetchChecksum, 124 | resetChecksum, 125 | setFileInfo, 126 | }; 127 | } 128 | -------------------------------------------------------------------------------- /src/composables/useByteRange.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2021 Patrick Herzberg 3 | * 4 | * @author Patrick Herzberg 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | import { ref, computed, type Ref, type ComputedRef } from "vue"; 24 | import { translate as t } from "@nextcloud/l10n"; 25 | 26 | export interface UseByteRangeReturn { 27 | byteStart: Ref; 28 | byteEnd: Ref; 29 | rangeError: Ref; 30 | showByteRange: Ref; 31 | parsedByteStart: ComputedRef; 32 | parsedByteEnd: ComputedRef; 33 | hasByteRange: ComputedRef; 34 | validateByteRange: () => boolean; 35 | toggleByteRange: () => void; 36 | resetByteRange: () => void; 37 | clearError: () => void; 38 | } 39 | 40 | /** 41 | * Composable for byte range management and validation 42 | */ 43 | export function useByteRange(): UseByteRangeReturn { 44 | // State 45 | const byteStart = ref(""); 46 | const byteEnd = ref(""); 47 | const rangeError = ref(""); 48 | const showByteRange = ref(false); 49 | 50 | /** 51 | * Validates the byte range inputs. 52 | * @return True if valid, false otherwise. 53 | */ 54 | const validateByteRange = (): boolean => { 55 | const start = parseInt(byteStart.value, 10); 56 | const end = parseInt(byteEnd.value, 10); 57 | 58 | if (byteStart.value !== "" && isNaN(start)) { 59 | rangeError.value = t("checksum", "Start byte must be a valid number."); 60 | return false; 61 | } 62 | 63 | if (byteEnd.value !== "" && isNaN(end)) { 64 | rangeError.value = t("checksum", "End byte must be a valid number."); 65 | return false; 66 | } 67 | 68 | if (byteStart.value !== "" && byteEnd.value !== "" && start >= end) { 69 | rangeError.value = t( 70 | "checksum", 71 | "Start byte must be less than end byte.", 72 | ); 73 | return false; 74 | } 75 | 76 | if (byteStart.value !== "" && start < 0) { 77 | rangeError.value = t("checksum", "Start byte must be 0 or greater."); 78 | return false; 79 | } 80 | 81 | if (byteEnd.value !== "" && end < 0) { 82 | rangeError.value = t("checksum", "End byte must be 0 or greater."); 83 | return false; 84 | } 85 | 86 | rangeError.value = ""; 87 | return true; 88 | }; 89 | 90 | /** 91 | * Get the parsed byte start value. 92 | */ 93 | const parsedByteStart = computed(() => { 94 | return byteStart.value !== "" ? parseInt(byteStart.value, 10) : null; 95 | }); 96 | 97 | /** 98 | * Get the parsed byte end value. 99 | */ 100 | const parsedByteEnd = computed(() => { 101 | return byteEnd.value !== "" ? parseInt(byteEnd.value, 10) : null; 102 | }); 103 | 104 | /** 105 | * Check if byte range is active (at least one field filled). 106 | */ 107 | const hasByteRange = computed(() => { 108 | return byteStart.value !== "" || byteEnd.value !== ""; 109 | }); 110 | 111 | /** 112 | * Toggle the visibility of the byte range section. 113 | */ 114 | const toggleByteRange = (): void => { 115 | showByteRange.value = !showByteRange.value; 116 | }; 117 | 118 | /** 119 | * Reset the byte range state. 120 | */ 121 | const resetByteRange = (): void => { 122 | byteStart.value = ""; 123 | byteEnd.value = ""; 124 | rangeError.value = ""; 125 | showByteRange.value = false; 126 | }; 127 | 128 | /** 129 | * Clear any existing error. 130 | */ 131 | const clearError = (): void => { 132 | rangeError.value = ""; 133 | }; 134 | 135 | return { 136 | // State 137 | byteStart, 138 | byteEnd, 139 | rangeError, 140 | showByteRange, 141 | 142 | // Computed 143 | parsedByteStart, 144 | parsedByteEnd, 145 | hasByteRange, 146 | 147 | // Methods 148 | validateByteRange, 149 | toggleByteRange, 150 | resetByteRange, 151 | clearError, 152 | }; 153 | } 154 | -------------------------------------------------------------------------------- /tests/Unit/useChecksum.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' 2 | import { useChecksum } from '@/composables/useChecksum' 3 | import axios from '@nextcloud/axios' 4 | 5 | // Mock axios 6 | vi.mock('@nextcloud/axios') 7 | 8 | // Mock @nextcloud/router 9 | vi.mock('@nextcloud/router', () => ({ 10 | generateUrl: (url: string) => url, 11 | })) 12 | 13 | // Mock @nextcloud/l10n 14 | vi.mock('@nextcloud/l10n', () => ({ 15 | translate: (app: string, text: string) => text, 16 | })) 17 | 18 | describe('useChecksum', () => { 19 | beforeEach(() => { 20 | vi.clearAllMocks() 21 | }) 22 | 23 | afterEach(() => { 24 | vi.restoreAllMocks() 25 | }) 26 | 27 | it('should initialize with correct default values', () => { 28 | const { loading, hash, algorithm, algorithms } = useChecksum() 29 | 30 | expect(loading.value).toBe(false) 31 | expect(hash.value).toBe('') 32 | expect(algorithm.value).toBeTruthy() 33 | expect(algorithms).toBeInstanceOf(Array) 34 | expect(algorithms.length).toBeGreaterThan(0) 35 | }) 36 | 37 | it('should fetch checksum successfully', async () => { 38 | const { fetchChecksum, setFileInfo, hash, loading } = useChecksum() 39 | 40 | const mockResponse = { 41 | data: { 42 | response: 'success', 43 | msg: 'abc123def456', 44 | }, 45 | } 46 | 47 | vi.mocked(axios.get).mockResolvedValueOnce(mockResponse) 48 | 49 | setFileInfo({ path: '/path/to', name: 'file.txt', mimetype: 'text/plain' }) 50 | 51 | const result = await fetchChecksum('md5') 52 | 53 | expect(result).toBe('abc123def456') 54 | expect(hash.value).toBe('abc123def456') 55 | expect(loading.value).toBe(false) 56 | expect(axios.get).toHaveBeenCalledWith('/apps/checksum/check', { 57 | params: { 58 | source: '/path/to/file.txt', 59 | type: 'md5', 60 | }, 61 | }) 62 | }) 63 | 64 | it('should fetch checksum with byte range', async () => { 65 | const { fetchChecksum, setFileInfo } = useChecksum() 66 | 67 | const mockResponse = { 68 | data: { 69 | response: 'success', 70 | msg: 'partial_hash', 71 | }, 72 | } 73 | 74 | vi.mocked(axios.get).mockResolvedValueOnce(mockResponse) 75 | 76 | setFileInfo({ path: '/path/to', name: 'file.txt', mimetype: 'text/plain' }) 77 | 78 | await fetchChecksum('sha256', 100, 200) 79 | 80 | expect(axios.get).toHaveBeenCalledWith('/apps/checksum/check', { 81 | params: { 82 | source: '/path/to/file.txt', 83 | type: 'sha256', 84 | byteStart: 100, 85 | byteEnd: 200, 86 | }, 87 | }) 88 | }) 89 | 90 | it('should handle fetch error', async () => { 91 | const { fetchChecksum, setFileInfo, loading } = useChecksum() 92 | 93 | const mockError = { 94 | response: { 95 | data: { 96 | msg: 'File not found', 97 | }, 98 | }, 99 | } 100 | 101 | vi.mocked(axios.get).mockRejectedValueOnce(mockError) 102 | 103 | setFileInfo({ path: '/path/to', name: 'file.txt', mimetype: 'text/plain' }) 104 | 105 | await expect(fetchChecksum('md5')).rejects.toThrow('File not found') 106 | expect(loading.value).toBe(false) 107 | }) 108 | 109 | it('should reset checksum state', () => { 110 | const { resetChecksum, hash, loading, algorithm } = useChecksum() 111 | 112 | // Simulate some state changes 113 | hash.value = 'some_hash' 114 | loading.value = true 115 | 116 | resetChecksum() 117 | 118 | expect(hash.value).toBe('') 119 | expect(loading.value).toBe(false) 120 | expect(algorithm.value).toBeTruthy() 121 | }) 122 | 123 | it('should set file info', () => { 124 | const { setFileInfo, fetchChecksum } = useChecksum() 125 | 126 | const fileInfo = { 127 | path: '/test/path', 128 | name: 'testfile.doc', 129 | mimetype: 'application/msword', 130 | } 131 | 132 | setFileInfo(fileInfo) 133 | 134 | const mockResponse = { 135 | data: { 136 | response: 'success', 137 | msg: 'hash_value', 138 | }, 139 | } 140 | 141 | vi.mocked(axios.get).mockResolvedValueOnce(mockResponse) 142 | 143 | fetchChecksum('sha1') 144 | 145 | expect(axios.get).toHaveBeenCalledWith('/apps/checksum/check', { 146 | params: { 147 | source: '/test/path/testfile.doc', 148 | type: 'sha1', 149 | }, 150 | }) 151 | }) 152 | 153 | it('should handle fetch with null byte range parameters', async () => { 154 | const { fetchChecksum, setFileInfo } = useChecksum() 155 | 156 | const mockResponse = { 157 | data: { 158 | response: 'success', 159 | msg: 'full_hash', 160 | }, 161 | } 162 | 163 | vi.mocked(axios.get).mockResolvedValueOnce(mockResponse) 164 | 165 | setFileInfo({ path: '/path', name: 'file.txt', mimetype: 'text/plain' }) 166 | 167 | await fetchChecksum('crc32', null, null) 168 | 169 | expect(axios.get).toHaveBeenCalledWith('/apps/checksum/check', { 170 | params: { 171 | source: '/path/file.txt', 172 | type: 'crc32', 173 | }, 174 | }) 175 | }) 176 | }) 177 | 178 | -------------------------------------------------------------------------------- /scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Nextcloud Checksum App - Build and Deploy Script 4 | # This script runs all checks and builds the app for production 5 | 6 | set -e # Exit on error 7 | 8 | echo "🚀 Starting deployment process..." 9 | echo "" 10 | 11 | # Colors for output 12 | RED='\033[0;31m' 13 | GREEN='\033[0;32m' 14 | YELLOW='\033[1;33m' 15 | NC='\033[0m' # No Color 16 | 17 | # Function to print section headers 18 | print_section() { 19 | echo "" 20 | echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" 21 | echo -e "${GREEN}$1${NC}" 22 | echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" 23 | } 24 | 25 | # Function to print success 26 | print_success() { 27 | echo -e "${GREEN}✓${NC} $1" 28 | } 29 | 30 | # Function to print error 31 | print_error() { 32 | echo -e "${RED}✗${NC} $1" 33 | } 34 | 35 | # Function to print warning 36 | print_warning() { 37 | echo -e "${YELLOW}⚠${NC} $1" 38 | } 39 | 40 | # Change to project root 41 | cd "$(dirname "$0")/.." 42 | 43 | # ============================================================================ 44 | # PHP CHECKS 45 | # ============================================================================ 46 | print_section "1/9 PHP Syntax Check" 47 | if composer lint > /dev/null 2>&1; then 48 | print_success "PHP syntax check passed" 49 | else 50 | print_error "PHP syntax check failed" 51 | exit 1 52 | fi 53 | 54 | print_section "2/9 PHP Code Style Check" 55 | if composer cs:check > /dev/null 2>&1; then 56 | print_success "PHP code style check passed" 57 | else 58 | print_warning "PHP code style issues found, attempting auto-fix..." 59 | composer cs:fix 60 | print_success "PHP code style fixed" 61 | fi 62 | 63 | print_section "3/9 PHP Static Analysis (Psalm)" 64 | if composer psalm; then 65 | print_success "Psalm static analysis passed" 66 | else 67 | print_error "Psalm static analysis failed" 68 | exit 1 69 | fi 70 | 71 | print_section "4/9 PHP Unit Tests" 72 | if composer test:unit; then 73 | print_success "PHP unit tests passed" 74 | else 75 | print_error "PHP unit tests failed" 76 | exit 1 77 | fi 78 | 79 | # ============================================================================ 80 | # NODE/TYPESCRIPT CHECKS 81 | # ============================================================================ 82 | print_section "5/9 TypeScript Type Check" 83 | if npm run type-check; then 84 | print_success "TypeScript type check passed" 85 | else 86 | print_error "TypeScript type check failed" 87 | exit 1 88 | fi 89 | 90 | print_section "6/9 JavaScript/TypeScript Linting" 91 | if npm run lint > /dev/null 2>&1; then 92 | print_success "ESLint check passed" 93 | else 94 | print_warning "ESLint issues found, attempting auto-fix..." 95 | npm run lint:fix 96 | print_success "ESLint issues fixed" 97 | fi 98 | 99 | print_section "7/9 Code Formatting Check" 100 | if npm run format > /dev/null 2>&1; then 101 | print_success "Prettier formatting check passed" 102 | else 103 | print_warning "Formatting issues found, attempting auto-fix..." 104 | npm run format:fix 105 | print_success "Code formatted" 106 | fi 107 | 108 | print_section "8/9 Node Unit Tests" 109 | if npm run test; then 110 | print_success "Node unit tests passed" 111 | else 112 | print_error "Node unit tests failed" 113 | exit 1 114 | fi 115 | 116 | # ============================================================================ 117 | # BUILD AND PACKAGE 118 | # ============================================================================ 119 | print_section "9/9 Building Production Assets" 120 | echo "Cleaning old build..." 121 | rm -rf js/* 122 | 123 | echo "Installing dependencies..." 124 | npm install 125 | 126 | echo "Building assets..." 127 | npm run build 128 | 129 | print_success "Build completed successfully" 130 | 131 | # ============================================================================ 132 | # CREATE RELEASE PACKAGE 133 | # ============================================================================ 134 | print_section "Creating Release Package" 135 | cd .. 136 | echo "Creating checksum.tar.gz..." 137 | # Disable macOS resource fork files (._*) from being included in tarball 138 | COPYFILE_DISABLE=1 tar -czf checksum.tar.gz -X checksum/.exclude checksum 139 | cd checksum 140 | 141 | print_success "Package created: ../checksum.tar.gz" 142 | 143 | # ============================================================================ 144 | # SUMMARY 145 | # ============================================================================ 146 | echo "" 147 | echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" 148 | echo -e "${GREEN}✓ DEPLOYMENT SUCCESSFUL${NC}" 149 | echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" 150 | echo "" 151 | echo "Summary:" 152 | echo " ✓ PHP syntax check" 153 | echo " ✓ PHP code style" 154 | echo " ✓ PHP static analysis" 155 | echo " ✓ PHP unit tests" 156 | echo " ✓ TypeScript type check" 157 | echo " ✓ JavaScript linting" 158 | echo " ✓ Code formatting" 159 | echo " ✓ Node unit tests" 160 | echo " ✓ Production build" 161 | echo "" 162 | echo "Package: ../checksum.tar.gz" 163 | echo "" 164 | 165 | -------------------------------------------------------------------------------- /lib/Controller/ChecksumController.php: -------------------------------------------------------------------------------- 1 | language = $languageFactory->get(Application::APP_ID); 56 | $this->rootFolder = $rootFolder; 57 | $this->userSession = $userSession; 58 | } 59 | 60 | /** 61 | * Compute the hash of a file. 62 | * 63 | * @NoAdminRequired 64 | * @param string $source file path relative to user home 65 | * @param string $type hash algorithm 66 | * @param int|null $byteStart optional start byte offset 67 | * @param int|null $byteEnd optional end byte offset 68 | * @return JSONResponse 69 | */ 70 | public function check(string $source, string $type, ?int $byteStart = null, ?int $byteEnd = null): JSONResponse { 71 | if (!$this->checkAlgorithmType($type)) { 72 | return new JSONResponse( 73 | [ 74 | 'response' => 'error', 75 | 'msg' => $this->language->t( 76 | 'The algorithm type "%s" is not a valid or supported algorithm type.', 77 | [$type] 78 | ) 79 | ] 80 | ); 81 | } 82 | 83 | if ($byteStart !== null && $byteStart < 0) { 84 | return new JSONResponse( 85 | [ 86 | 'response' => 'error', 87 | 'msg' => $this->language->t('Start byte must be 0 or greater.') 88 | ] 89 | ); 90 | } 91 | 92 | if ($byteEnd !== null && $byteEnd < 0) { 93 | return new JSONResponse( 94 | [ 95 | 'response' => 'error', 96 | 'msg' => $this->language->t('End byte must be 0 or greater.') 97 | ] 98 | ); 99 | } 100 | 101 | if ($byteStart !== null && $byteEnd !== null && $byteStart >= $byteEnd) { 102 | return new JSONResponse( 103 | [ 104 | 'response' => 'error', 105 | 'msg' => $this->language->t('Start byte must be less than end byte.') 106 | ] 107 | ); 108 | } 109 | 110 | $hash = $this->getHash($source, $type, $byteStart, $byteEnd); 111 | if ($hash) { 112 | return new JSONResponse( 113 | [ 114 | 'response' => 'success', 115 | 'msg' => $hash 116 | ] 117 | ); 118 | } 119 | 120 | return new JSONResponse( 121 | [ 122 | 'response' => 'error', 123 | 'msg' => $this->language->t('File not found.') 124 | ] 125 | ); 126 | } 127 | 128 | private function getHash(string $source, string $type, ?int $byteStart = null, ?int $byteEnd = null): ?string { 129 | $user = $this->userSession->getUser(); 130 | if (!$user) { 131 | return null; 132 | } 133 | 134 | try { 135 | $home = $this->rootFolder->getUserFolder($user->getUID()); 136 | /** @var \OC\Files\Node\File $node */ 137 | $node = $home->get($source); 138 | } catch (NotPermittedException|NoUserException|NotFoundException $e) { 139 | return null; 140 | } 141 | 142 | if ($node->getType() !== FileInfo::TYPE_FILE) { 143 | return null; 144 | } 145 | 146 | $file = $node->fopen('rb'); 147 | if (!$file) { 148 | return null; 149 | } 150 | 151 | $hash = hash_init($type); 152 | 153 | // If byte range is specified, read only that portion 154 | if ($byteStart !== null || $byteEnd !== null) { 155 | $fileSize = $node->getSize(); 156 | $start = $byteStart ?? 0; 157 | $end = $byteEnd ?? $fileSize; 158 | 159 | // Validate that the range is within file bounds 160 | if ($start >= $fileSize) { 161 | fclose($file); 162 | return null; 163 | } 164 | 165 | // Adjust end if it exceeds file size 166 | $end = min($end, $fileSize); 167 | 168 | // Seek to start position 169 | if ($start > 0) { 170 | fseek($file, $start); 171 | } 172 | 173 | // Read in chunks up to the end position 174 | $bytesToRead = $end - $start; 175 | $chunkSize = 8192; // 8KB chunks 176 | 177 | while ($bytesToRead > 0 && !feof($file)) { 178 | $currentChunkSize = min($chunkSize, $bytesToRead); 179 | $chunk = fread($file, $currentChunkSize); 180 | 181 | if ($chunk === false) { 182 | break; 183 | } 184 | 185 | hash_update($hash, $chunk); 186 | $bytesToRead -= strlen($chunk); 187 | } 188 | } else { 189 | hash_update_stream($hash, $file); 190 | } 191 | 192 | fclose($file); 193 | 194 | return hash_final($hash); 195 | } 196 | 197 | private function checkAlgorithmType(string $type): bool { 198 | return in_array($type, $this->getAllowedAlgorithmTypes()) && in_array($type, hash_algos()); 199 | } 200 | 201 | /** 202 | * @return array 203 | */ 204 | private function getAllowedAlgorithmTypes(): array { 205 | return [ 206 | 'md5', 207 | 'sha1', 208 | 'sha256', 209 | 'sha384', 210 | 'sha512', 211 | 'sha3-256', 212 | 'sha3-512', 213 | 'crc32', 214 | 'crc32b' 215 | ]; 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /tests/Unit/useClipboard.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' 2 | import { useClipboard } from '../../src/composables/useClipboard' 3 | 4 | describe('useClipboard', () => { 5 | let originalClipboard: Clipboard | undefined 6 | 7 | beforeEach(() => { 8 | vi.useFakeTimers() 9 | originalClipboard = navigator.clipboard 10 | }) 11 | 12 | afterEach(() => { 13 | vi.restoreAllMocks() 14 | vi.useRealTimers() 15 | // Restore original clipboard 16 | Object.defineProperty(navigator, 'clipboard', { 17 | value: originalClipboard, 18 | writable: true, 19 | configurable: true, 20 | }) 21 | }) 22 | 23 | it('should initialize with correct default values', () => { 24 | const { copied } = useClipboard() 25 | 26 | expect(copied.value).toBe(false) 27 | }) 28 | 29 | it('should copy text to clipboard using modern API', async () => { 30 | const mockWriteText = vi.fn().mockResolvedValue(undefined) 31 | Object.defineProperty(navigator, 'clipboard', { 32 | value: { 33 | writeText: mockWriteText, 34 | }, 35 | writable: true, 36 | configurable: true, 37 | }) 38 | 39 | const { copyToClipboard, copied } = useClipboard() 40 | 41 | await copyToClipboard('test text') 42 | 43 | expect(mockWriteText).toHaveBeenCalledWith('test text') 44 | expect(copied.value).toBe(true) 45 | }) 46 | 47 | it('should auto-reset copied state after 3 seconds', async () => { 48 | const mockWriteText = vi.fn().mockResolvedValue(undefined) 49 | Object.defineProperty(navigator, 'clipboard', { 50 | value: { 51 | writeText: mockWriteText, 52 | }, 53 | writable: true, 54 | configurable: true, 55 | }) 56 | 57 | const { copyToClipboard, copied } = useClipboard() 58 | 59 | await copyToClipboard('test text') 60 | 61 | expect(copied.value).toBe(true) 62 | 63 | // Fast-forward time by 3 seconds 64 | vi.advanceTimersByTime(3000) 65 | 66 | expect(copied.value).toBe(false) 67 | }) 68 | 69 | it('should reset copied state manually', async () => { 70 | const mockWriteText = vi.fn().mockResolvedValue(undefined) 71 | Object.defineProperty(navigator, 'clipboard', { 72 | value: { 73 | writeText: mockWriteText, 74 | }, 75 | writable: true, 76 | configurable: true, 77 | }) 78 | 79 | const { copyToClipboard, copied, resetCopied } = useClipboard() 80 | 81 | await copyToClipboard('test text') 82 | 83 | expect(copied.value).toBe(true) 84 | 85 | resetCopied() 86 | 87 | expect(copied.value).toBe(false) 88 | }) 89 | 90 | it('should use fallback method when clipboard API is not available', async () => { 91 | // Mock document.execCommand 92 | const mockExecCommand = vi.fn() 93 | document.execCommand = mockExecCommand 94 | 95 | // Mock the input element 96 | const mockSelect = vi.fn() 97 | const mockElement = { select: mockSelect } as unknown as HTMLInputElement 98 | const mockQuerySelector = vi.spyOn(document, 'querySelector').mockReturnValue(mockElement) 99 | 100 | // Remove clipboard API 101 | Object.defineProperty(navigator, 'clipboard', { 102 | value: undefined, 103 | writable: true, 104 | configurable: true, 105 | }) 106 | 107 | const { copyToClipboard, copied } = useClipboard() 108 | 109 | await copyToClipboard('test text', '#test-input') 110 | 111 | expect(mockQuerySelector).toHaveBeenCalledWith('#test-input') 112 | expect(mockSelect).toHaveBeenCalled() 113 | expect(mockExecCommand).toHaveBeenCalledWith('copy') 114 | expect(copied.value).toBe(true) 115 | 116 | mockQuerySelector.mockRestore() 117 | }) 118 | 119 | it('should handle errors gracefully', async () => { 120 | const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) 121 | const mockWriteText = vi.fn().mockRejectedValue(new Error('Copy failed')) 122 | Object.defineProperty(navigator, 'clipboard', { 123 | value: { 124 | writeText: mockWriteText, 125 | }, 126 | writable: true, 127 | configurable: true, 128 | }) 129 | 130 | const { copyToClipboard } = useClipboard() 131 | 132 | await copyToClipboard('test text') 133 | 134 | expect(consoleError).toHaveBeenCalledWith( 135 | 'Failed to copy to clipboard:', 136 | expect.any(Error) 137 | ) 138 | 139 | consoleError.mockRestore() 140 | }) 141 | 142 | it('should handle missing fallback element', async () => { 143 | const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) 144 | const mockQuerySelector = vi.spyOn(document, 'querySelector').mockReturnValue(null) 145 | 146 | // Remove clipboard API 147 | Object.defineProperty(navigator, 'clipboard', { 148 | value: undefined, 149 | writable: true, 150 | configurable: true, 151 | }) 152 | 153 | const { copyToClipboard, copied } = useClipboard() 154 | 155 | await copyToClipboard('test text', '#missing-element') 156 | 157 | // Should not throw, but copied should still be set to true 158 | expect(copied.value).toBe(true) 159 | 160 | mockQuerySelector.mockRestore() 161 | consoleError.mockRestore() 162 | }) 163 | 164 | it('should use default fallback selector', async () => { 165 | const mockSelect = vi.fn() 166 | const mockElement = { select: mockSelect } as unknown as HTMLInputElement 167 | const mockQuerySelector = vi.spyOn(document, 'querySelector').mockReturnValue(mockElement) 168 | const mockExecCommand = vi.fn() 169 | document.execCommand = mockExecCommand 170 | 171 | // Remove clipboard API 172 | Object.defineProperty(navigator, 'clipboard', { 173 | value: undefined, 174 | writable: true, 175 | configurable: true, 176 | }) 177 | 178 | const { copyToClipboard } = useClipboard() 179 | 180 | await copyToClipboard('test text') 181 | 182 | expect(mockQuerySelector).toHaveBeenCalledWith('#checksum-hash') 183 | 184 | mockQuerySelector.mockRestore() 185 | }) 186 | }) 187 | -------------------------------------------------------------------------------- /tests/Unit/useByteRange.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect, vi } from 'vitest' 2 | import { useByteRange } from '../../src/composables/useByteRange' 3 | 4 | // Mock @nextcloud/l10n 5 | vi.mock('@nextcloud/l10n', () => ({ 6 | translate: (app: string, text: string) => text, 7 | })) 8 | 9 | describe('useByteRange', () => { 10 | it('should initialize with correct default values', () => { 11 | const { byteStart, byteEnd, rangeError, showByteRange, hasByteRange } = useByteRange() 12 | 13 | expect(byteStart.value).toBe('') 14 | expect(byteEnd.value).toBe('') 15 | expect(rangeError.value).toBe('') 16 | expect(showByteRange.value).toBe(false) 17 | expect(hasByteRange.value).toBe(false) 18 | }) 19 | 20 | it('should validate correct byte range', () => { 21 | const { byteStart, byteEnd, validateByteRange, rangeError } = useByteRange() 22 | 23 | byteStart.value = '100' 24 | byteEnd.value = '200' 25 | 26 | const isValid = validateByteRange() 27 | 28 | expect(isValid).toBe(true) 29 | expect(rangeError.value).toBe('') 30 | }) 31 | 32 | it('should fail validation when start is greater than end', () => { 33 | const { byteStart, byteEnd, validateByteRange, rangeError } = useByteRange() 34 | 35 | byteStart.value = '200' 36 | byteEnd.value = '100' 37 | 38 | const isValid = validateByteRange() 39 | 40 | expect(isValid).toBe(false) 41 | expect(rangeError.value).toBe('Start byte must be less than end byte.') 42 | }) 43 | 44 | it('should fail validation when start is equal to end', () => { 45 | const { byteStart, byteEnd, validateByteRange, rangeError } = useByteRange() 46 | 47 | byteStart.value = '100' 48 | byteEnd.value = '100' 49 | 50 | const isValid = validateByteRange() 51 | 52 | expect(isValid).toBe(false) 53 | expect(rangeError.value).toBe('Start byte must be less than end byte.') 54 | }) 55 | 56 | it('should fail validation when start is negative', () => { 57 | const { byteStart, byteEnd, validateByteRange, rangeError } = useByteRange() 58 | 59 | byteStart.value = '-10' 60 | byteEnd.value = '100' 61 | 62 | const isValid = validateByteRange() 63 | 64 | expect(isValid).toBe(false) 65 | expect(rangeError.value).toBe('Start byte must be 0 or greater.') 66 | }) 67 | 68 | it('should fail validation when end is negative', () => { 69 | const { byteStart, byteEnd, validateByteRange, rangeError } = useByteRange() 70 | 71 | byteStart.value = '10' 72 | byteEnd.value = '-50' 73 | 74 | const isValid = validateByteRange() 75 | 76 | expect(isValid).toBe(false) 77 | // The validation checks start >= end before checking for negative, so we get that error first 78 | expect(rangeError.value).toBeTruthy() 79 | }) 80 | 81 | it('should fail validation when start is not a number', () => { 82 | const { byteStart, validateByteRange, rangeError } = useByteRange() 83 | 84 | byteStart.value = 'abc' 85 | 86 | const isValid = validateByteRange() 87 | 88 | expect(isValid).toBe(false) 89 | expect(rangeError.value).toBe('Start byte must be a valid number.') 90 | }) 91 | 92 | it('should fail validation when end is not a number', () => { 93 | const { byteEnd, validateByteRange, rangeError } = useByteRange() 94 | 95 | byteEnd.value = 'xyz' 96 | 97 | const isValid = validateByteRange() 98 | 99 | expect(isValid).toBe(false) 100 | expect(rangeError.value).toBe('End byte must be a valid number.') 101 | }) 102 | 103 | it('should parse byte start correctly', () => { 104 | const { byteStart, parsedByteStart } = useByteRange() 105 | 106 | byteStart.value = '123' 107 | expect(parsedByteStart.value).toBe(123) 108 | 109 | byteStart.value = '' 110 | expect(parsedByteStart.value).toBe(null) 111 | }) 112 | 113 | it('should parse byte end correctly', () => { 114 | const { byteEnd, parsedByteEnd } = useByteRange() 115 | 116 | byteEnd.value = '456' 117 | expect(parsedByteEnd.value).toBe(456) 118 | 119 | byteEnd.value = '' 120 | expect(parsedByteEnd.value).toBe(null) 121 | }) 122 | 123 | it('should detect when byte range is active', () => { 124 | const { byteStart, byteEnd, hasByteRange } = useByteRange() 125 | 126 | expect(hasByteRange.value).toBe(false) 127 | 128 | byteStart.value = '100' 129 | expect(hasByteRange.value).toBe(true) 130 | 131 | byteStart.value = '' 132 | byteEnd.value = '200' 133 | expect(hasByteRange.value).toBe(true) 134 | 135 | byteStart.value = '100' 136 | byteEnd.value = '200' 137 | expect(hasByteRange.value).toBe(true) 138 | }) 139 | 140 | it('should toggle byte range visibility', () => { 141 | const { showByteRange, toggleByteRange } = useByteRange() 142 | 143 | expect(showByteRange.value).toBe(false) 144 | 145 | toggleByteRange() 146 | expect(showByteRange.value).toBe(true) 147 | 148 | toggleByteRange() 149 | expect(showByteRange.value).toBe(false) 150 | }) 151 | 152 | it('should reset byte range state', () => { 153 | const { byteStart, byteEnd, rangeError, showByteRange, resetByteRange } = useByteRange() 154 | 155 | // Set some values 156 | byteStart.value = '100' 157 | byteEnd.value = '200' 158 | rangeError.value = 'Some error' 159 | showByteRange.value = true 160 | 161 | resetByteRange() 162 | 163 | expect(byteStart.value).toBe('') 164 | expect(byteEnd.value).toBe('') 165 | expect(rangeError.value).toBe('') 166 | expect(showByteRange.value).toBe(false) 167 | }) 168 | 169 | it('should clear error', () => { 170 | const { rangeError, clearError } = useByteRange() 171 | 172 | rangeError.value = 'Some error message' 173 | clearError() 174 | 175 | expect(rangeError.value).toBe('') 176 | }) 177 | 178 | it('should validate when only start byte is provided', () => { 179 | const { byteStart, validateByteRange, rangeError } = useByteRange() 180 | 181 | byteStart.value = '100' 182 | 183 | const isValid = validateByteRange() 184 | 185 | expect(isValid).toBe(true) 186 | expect(rangeError.value).toBe('') 187 | }) 188 | 189 | it('should validate when only end byte is provided', () => { 190 | const { byteEnd, validateByteRange, rangeError } = useByteRange() 191 | 192 | byteEnd.value = '200' 193 | 194 | const isValid = validateByteRange() 195 | 196 | expect(isValid).toBe(true) 197 | expect(rangeError.value).toBe('') 198 | }) 199 | 200 | it('should handle zero as valid start byte', () => { 201 | const { byteStart, byteEnd, validateByteRange, rangeError } = useByteRange() 202 | 203 | byteStart.value = '0' 204 | byteEnd.value = '100' 205 | 206 | const isValid = validateByteRange() 207 | 208 | expect(isValid).toBe(true) 209 | expect(rangeError.value).toBe('') 210 | }) 211 | }) 212 | 213 | -------------------------------------------------------------------------------- /src/views/ChecksumTab.vue: -------------------------------------------------------------------------------- 1 | 22 | 90 | 91 | 225 | 226 | 261 | -------------------------------------------------------------------------------- /tests/Unit/Controller/ChecksumControllerTest.php: -------------------------------------------------------------------------------- 1 | request = $this->createMock(IRequest::class); 39 | $this->languageFactory = $this->createMock(IFactory::class); 40 | $this->l10n = $this->createMock(IL10N::class); 41 | $this->rootFolder = $this->createMock(IRootFolder::class); 42 | $this->userSession = $this->createMock(IUserSession::class); 43 | $this->user = $this->createMock(IUser::class); 44 | 45 | $this->languageFactory 46 | ->method('get') 47 | ->willReturn($this->l10n); 48 | 49 | $this->l10n 50 | ->method('t') 51 | ->willReturnCallback(function ($text, $params = []) { 52 | return vsprintf($text, $params); 53 | }); 54 | 55 | $this->controller = new ChecksumController( 56 | 'checksum', 57 | $this->request, 58 | $this->languageFactory, 59 | $this->rootFolder, 60 | $this->userSession 61 | ); 62 | } 63 | 64 | public function testCheckWithInvalidAlgorithm(): void { 65 | $response = $this->controller->check('/test.txt', 'invalid_algo'); 66 | 67 | $this->assertInstanceOf(JSONResponse::class, $response); 68 | $data = $response->getData(); 69 | $this->assertEquals('error', $data['response']); 70 | $this->assertStringContainsString('not a valid', $data['msg']); 71 | } 72 | 73 | public function testCheckWithNegativeStartByte(): void { 74 | $response = $this->controller->check('/test.txt', 'md5', -1); 75 | 76 | $this->assertInstanceOf(JSONResponse::class, $response); 77 | $data = $response->getData(); 78 | $this->assertEquals('error', $data['response']); 79 | $this->assertStringContainsString('Start byte', $data['msg']); 80 | } 81 | 82 | public function testCheckWithNegativeEndByte(): void { 83 | $response = $this->controller->check('/test.txt', 'md5', 0, -1); 84 | 85 | $this->assertInstanceOf(JSONResponse::class, $response); 86 | $data = $response->getData(); 87 | $this->assertEquals('error', $data['response']); 88 | $this->assertStringContainsString('End byte', $data['msg']); 89 | } 90 | 91 | public function testCheckWithInvalidByteRange(): void { 92 | $response = $this->controller->check('/test.txt', 'md5', 100, 50); 93 | 94 | $this->assertInstanceOf(JSONResponse::class, $response); 95 | $data = $response->getData(); 96 | $this->assertEquals('error', $data['response']); 97 | $this->assertStringContainsString('Start byte must be less than', $data['msg']); 98 | } 99 | 100 | public function testCheckWithNoUser(): void { 101 | $this->userSession 102 | ->method('getUser') 103 | ->willReturn(null); 104 | 105 | $response = $this->controller->check('/test.txt', 'md5'); 106 | 107 | $this->assertInstanceOf(JSONResponse::class, $response); 108 | $data = $response->getData(); 109 | $this->assertEquals('error', $data['response']); 110 | $this->assertStringContainsString('File not found', $data['msg']); 111 | } 112 | 113 | public function testCheckSuccessfulMd5(): void { 114 | $testContent = 'Hello, World!'; 115 | $expectedMd5 = md5($testContent); 116 | 117 | // Create a temporary file 118 | $tmpFile = tmpfile(); 119 | fwrite($tmpFile, $testContent); 120 | rewind($tmpFile); 121 | 122 | // Mock user 123 | $this->user->method('getUID')->willReturn('testuser'); 124 | $this->userSession->method('getUser')->willReturn($this->user); 125 | 126 | // Mock file and folder 127 | $file = $this->createMock(File::class); 128 | $file->method('getType')->willReturn(\OCP\Files\FileInfo::TYPE_FILE); 129 | $file->method('fopen')->willReturn($tmpFile); 130 | $file->method('getSize')->willReturn(strlen($testContent)); 131 | 132 | $folder = $this->createMock(Folder::class); 133 | $folder->method('get')->willReturn($file); 134 | 135 | $this->rootFolder->method('getUserFolder')->willReturn($folder); 136 | 137 | $response = $this->controller->check('/test.txt', 'md5'); 138 | 139 | $this->assertInstanceOf(JSONResponse::class, $response); 140 | $data = $response->getData(); 141 | $this->assertEquals('success', $data['response']); 142 | $this->assertEquals($expectedMd5, $data['msg']); 143 | } 144 | 145 | public function testCheckSuccessfulSha256(): void { 146 | $testContent = 'Test content for SHA-256'; 147 | $expectedHash = hash('sha256', $testContent); 148 | 149 | // Create a temporary file 150 | $tmpFile = tmpfile(); 151 | fwrite($tmpFile, $testContent); 152 | rewind($tmpFile); 153 | 154 | // Mock user 155 | $this->user->method('getUID')->willReturn('testuser'); 156 | $this->userSession->method('getUser')->willReturn($this->user); 157 | 158 | // Mock file and folder 159 | $file = $this->createMock(File::class); 160 | $file->method('getType')->willReturn(\OCP\Files\FileInfo::TYPE_FILE); 161 | $file->method('fopen')->willReturn($tmpFile); 162 | $file->method('getSize')->willReturn(strlen($testContent)); 163 | 164 | $folder = $this->createMock(Folder::class); 165 | $folder->method('get')->willReturn($file); 166 | 167 | $this->rootFolder->method('getUserFolder')->willReturn($folder); 168 | 169 | $response = $this->controller->check('/test.txt', 'sha256'); 170 | 171 | $this->assertInstanceOf(JSONResponse::class, $response); 172 | $data = $response->getData(); 173 | $this->assertEquals('success', $data['response']); 174 | $this->assertEquals($expectedHash, $data['msg']); 175 | } 176 | 177 | public function testCheckWithByteRange(): void { 178 | $testContent = '0123456789ABCDEF'; 179 | $rangeStart = 5; 180 | $rangeEnd = 10; 181 | $expectedHash = hash('md5', substr($testContent, $rangeStart, $rangeEnd - $rangeStart)); 182 | 183 | // Create a temporary file 184 | $tmpFile = tmpfile(); 185 | fwrite($tmpFile, $testContent); 186 | rewind($tmpFile); 187 | 188 | // Mock user 189 | $this->user->method('getUID')->willReturn('testuser'); 190 | $this->userSession->method('getUser')->willReturn($this->user); 191 | 192 | // Mock file and folder 193 | $file = $this->createMock(File::class); 194 | $file->method('getType')->willReturn(\OCP\Files\FileInfo::TYPE_FILE); 195 | $file->method('fopen')->willReturn($tmpFile); 196 | $file->method('getSize')->willReturn(strlen($testContent)); 197 | 198 | $folder = $this->createMock(Folder::class); 199 | $folder->method('get')->willReturn($file); 200 | 201 | $this->rootFolder->method('getUserFolder')->willReturn($folder); 202 | 203 | $response = $this->controller->check('/test.txt', 'md5', $rangeStart, $rangeEnd); 204 | 205 | $this->assertInstanceOf(JSONResponse::class, $response); 206 | $data = $response->getData(); 207 | $this->assertEquals('success', $data['response']); 208 | $this->assertEquals($expectedHash, $data['msg']); 209 | } 210 | } 211 | --------------------------------------------------------------------------------