From bace4695ac371a40aa01f8c013994657bfd5203b Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 18 May 2025 20:21:34 +0200 Subject: [PATCH 1/7] update zlib js suffix, as a cache breaker --- js/common.js | 2 +- js/{zlib-1.3.1.js => zlib-1.3.1-1.js} | 0 lib/Configuration.php | 2 +- tpl/bootstrap.php | 2 +- tpl/bootstrap5.php | 2 +- tpl/page.php | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename js/{zlib-1.3.1.js => zlib-1.3.1-1.js} (100%) diff --git a/js/common.js b/js/common.js index ddf2f5e5..c693ad10 100644 --- a/js/common.js +++ b/js/common.js @@ -11,7 +11,7 @@ global.WebCrypto = require('@peculiar/webcrypto').Crypto; // application libraries to test global.$ = global.jQuery = require('./jquery-3.7.1'); global.RawDeflate = require('./rawinflate-0.3').RawDeflate; -global.zlib = require('./zlib-1.3.1').zlib; +global.zlib = require('./zlib-1.3.1-1').zlib; require('./prettify'); global.prettyPrint = window.PR.prettyPrint; global.prettyPrintOne = window.PR.prettyPrintOne; diff --git a/js/zlib-1.3.1.js b/js/zlib-1.3.1-1.js similarity index 100% rename from js/zlib-1.3.1.js rename to js/zlib-1.3.1-1.js diff --git a/lib/Configuration.php b/lib/Configuration.php index daa05d7c..a8245816 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -123,7 +123,7 @@ class Configuration 'js/purify-3.2.5.js' => 'sha512-eLlLLL/zYuf5JuG0x4WQm687MToqOGP9cDQHIdmOy1ZpjiY4J48BBcOM7DtZheKk1UogW920+9RslWYB4KGuuA==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', - 'js/zlib-1.3.1.js' => 'sha512-5bU9IIP4PgBrOKLZvGWJD4kgfQrkTz8Z3Iqeu058mbQzW3mCumOU6M3UVbVZU9rrVoVwaW4cZK8U8h5xjF88eQ==', + 'js/zlib-1.3.1-1.js' => 'sha512-5bU9IIP4PgBrOKLZvGWJD4kgfQrkTz8Z3Iqeu058mbQzW3mCumOU6M3UVbVZU9rrVoVwaW4cZK8U8h5xjF88eQ==', ), ); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 5d5ea677..a07d4f9c 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -55,7 +55,7 @@ if ($ZEROBINCOMPATIBILITY) : - _scriptTag('js/zlib-1.3.1.js', 'async'); ?> + _scriptTag('js/zlib-1.3.1-1.js', 'async'); ?> _scriptTag('js/base-x-4.0.0.js', 'defer'); ?> _scriptTag('js/rawinflate-0.3.js', 'defer'); ?> _scriptTag('js/bootstrap-3.4.1.js', 'defer'); ?> diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index 916669ca..e8de680a 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -38,7 +38,7 @@ if ($ZEROBINCOMPATIBILITY) : - _scriptTag('js/zlib-1.3.1.js', 'defer'); ?> + _scriptTag('js/zlib-1.3.1-1.js', 'defer'); ?> _scriptTag('js/base-x-4.0.0.js', 'defer'); ?> _scriptTag('js/rawinflate-0.3.js', 'defer'); ?> _scriptTag('js/bootstrap-5.3.3.js', 'async'); ?> diff --git a/tpl/page.php b/tpl/page.php index 0753bff4..fb4cf8e9 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -34,7 +34,7 @@ if ($ZEROBINCOMPATIBILITY): - _scriptTag('js/zlib-1.3.1.js', 'async'); ?> + _scriptTag('js/zlib-1.3.1-1.js', 'async'); ?> _scriptTag('js/base-x-4.0.0.js', 'async'); ?> _scriptTag('js/rawinflate-0.3.js', 'async'); ?> Date: Sun, 18 May 2025 20:52:46 +0200 Subject: [PATCH 2/7] replicate reported error --- tst/Data/FilesystemTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tst/Data/FilesystemTest.php b/tst/Data/FilesystemTest.php index 89f5395b..3f0a1563 100644 --- a/tst/Data/FilesystemTest.php +++ b/tst/Data/FilesystemTest.php @@ -178,4 +178,16 @@ class FilesystemTest extends TestCase $this->assertEquals($this->_model->readComments($dataid), array($comment['meta']['created'] => $comment), "comment of $dataid wasn't modified in the conversion"); } } + + public function testValueFileErrorHandling() + { + define('VALID', 'valid content'); + foreach (array('purge_limiter', 'salt', 'traffic_limiter') as $namespace) { + file_put_contents($this->_invalidPath . DIRECTORY_SEPARATOR . $namespace . '.php', 'invalid content'); + $model = new Filesystem(array('dir' => $this->_invalidPath)); + $this->assertEquals($model->getValue($namespace), '', 'empty default value returned, invalid content ignored'); + $this->assertTrue($model->setValue(VALID, $namespace), 'setting valid value'); + $this->assertEquals($model->getValue($namespace), VALID, 'valid value returned'); + } + } } From c08a792f01227946a2e373c785ddc5bd33401f8e Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 18 May 2025 21:15:39 +0200 Subject: [PATCH 3/7] handle undefined global, fixes #1544 --- CHANGELOG.md | 2 ++ lib/Data/Filesystem.php | 14 +++++++++----- tst/Data/FilesystemTest.php | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d8bff0f..99d045b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ * CHANGED: Passing large data structures by reference to reduce memory consumption (#858) * CHANGED: Removed use of ctype functions and polyfill library for ctype * CHANGED: Upgrading libraries to: DOMpurify 3.2.5, ip-lib 1.20.0 +* FIXED: Bump zlib library suffix, ensuring cache refresh for WASM streaming change +* FIXED: Handle undefined globals in file based persisted values (#1544) ## 1.7.6 (2025-02-01) * ADDED: Ability to copy the paste by clicking the copy icon button or using the keyboard shortcut ctrl+c/cmd+c (#1390 & #12) diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index ac91db11..85cd2a5e 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -276,7 +276,7 @@ class Filesystem extends AbstractData case 'purge_limiter': return $this->_storeString( $this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php', - '_storeString( @@ -308,7 +308,9 @@ class Filesystem extends AbstractData $file = $this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php'; if (is_readable($file)) { require $file; - return $GLOBALS['purge_limiter']; + if (array_key_exists('purge_limiter', $GLOBALS)) { + return $GLOBALS['purge_limiter']; + } } break; case 'salt': @@ -324,9 +326,11 @@ class Filesystem extends AbstractData $file = $this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php'; if (is_readable($file)) { require $file; - $this->_last_cache = $GLOBALS['traffic_limiter']; - if (array_key_exists($key, $this->_last_cache)) { - return $this->_last_cache[$key]; + if (array_key_exists('traffic_limiter', $GLOBALS)) { + $this->_last_cache = $GLOBALS['traffic_limiter']; + if (array_key_exists($key, $this->_last_cache)) { + return $this->_last_cache[$key]; + } } } break; diff --git a/tst/Data/FilesystemTest.php b/tst/Data/FilesystemTest.php index 3f0a1563..49ffe954 100644 --- a/tst/Data/FilesystemTest.php +++ b/tst/Data/FilesystemTest.php @@ -185,7 +185,9 @@ class FilesystemTest extends TestCase foreach (array('purge_limiter', 'salt', 'traffic_limiter') as $namespace) { file_put_contents($this->_invalidPath . DIRECTORY_SEPARATOR . $namespace . '.php', 'invalid content'); $model = new Filesystem(array('dir' => $this->_invalidPath)); + ob_start(); // hide "invalid content", when file gets included $this->assertEquals($model->getValue($namespace), '', 'empty default value returned, invalid content ignored'); + ob_end_clean(); $this->assertTrue($model->setValue(VALID, $namespace), 'setting valid value'); $this->assertEquals($model->getValue($namespace), VALID, 'valid value returned'); } From d01c37c59d2760e927efc7a354f0237317d70c11 Mon Sep 17 00:00:00 2001 From: Ribas160 Date: Thu, 26 Jun 2025 18:12:22 +0300 Subject: [PATCH 4/7] Show file name and size on download page --- CHANGELOG.md | 1 + CREDITS.md | 2 +- i18n/ar.json | 8 +++++++ i18n/bg.json | 8 +++++++ i18n/ca.json | 8 +++++++ i18n/co.json | 8 +++++++ i18n/cs.json | 8 +++++++ i18n/de.json | 8 +++++++ i18n/el.json | 8 +++++++ i18n/en.json | 8 +++++++ i18n/es.json | 8 +++++++ i18n/et.json | 8 +++++++ i18n/fi.json | 8 +++++++ i18n/fr.json | 8 +++++++ i18n/he.json | 8 +++++++ i18n/hi.json | 8 +++++++ i18n/hu.json | 8 +++++++ i18n/id.json | 8 +++++++ i18n/it.json | 8 +++++++ i18n/ja.json | 8 +++++++ i18n/jbo.json | 8 +++++++ i18n/ko.json | 8 +++++++ i18n/ku.json | 8 +++++++ i18n/la.json | 8 +++++++ i18n/lt.json | 8 +++++++ i18n/nl.json | 8 +++++++ i18n/no.json | 8 +++++++ i18n/oc.json | 8 +++++++ i18n/pl.json | 8 +++++++ i18n/pt.json | 8 +++++++ i18n/ro.json | 8 +++++++ i18n/ru.json | 8 +++++++ i18n/sk.json | 8 +++++++ i18n/sl.json | 8 +++++++ i18n/sv.json | 8 +++++++ i18n/th.json | 8 +++++++ i18n/tr.json | 8 +++++++ i18n/uk.json | 8 +++++++ i18n/zh.json | 8 +++++++ js/privatebin.js | 49 ++++++++++++++++++++++++++++++++++++++++++- js/test/Helper.js | 26 +++++++++++++++++++++++ lib/Configuration.php | 2 +- 42 files changed, 373 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2b405b1..36676179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.7.7 (not yet released) * ADDED: Switching templates using the web ui (#1501) +* ADDED: Show file name and size on download page (#603) * CHANGED: Passing large data structures by reference to reduce memory consumption (#858) * CHANGED: Removed use of ctype functions and polyfill library for ctype * CHANGED: Upgrading libraries to: DOMpurify 3.2.6, ip-lib 1.20.0 diff --git a/CREDITS.md b/CREDITS.md index 308a424a..37026898 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -5,6 +5,7 @@ * Simon Rupf - current developer and maintainer * rugk - security review, doc improvment, JS refactoring & various other stuff * R4SAS - python client, compression, blob URI to support larger attachments +* Mikhail Romanov - UI improvements, theme switching, clipboard support, multi-file upload, bugfixes, code refactoring ## Past contributions @@ -33,7 +34,6 @@ * Mounir Idrassi & J. Mozdzen - secure YOURLS integration * Felipe Nakandakari - enabled AWS SDK to use default credential provider chain in the S3 Storage backend * Aaron Sherber - cache control headers for API calls & use of `shortenviayourls` in query parameters -* Mikhail Romanov - UI improvements, theme switching, clipboard support, multi-file upload, bugfixes, code refactoring ## Translations * Hexalyse - French diff --git a/i18n/ar.json b/i18n/ar.json index cd116da0..b4a84fe9 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -164,6 +164,14 @@ "EiB": "إكسابايت", "ZiB": "زيتابايت", "YiB": "يوتابايت", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "التنسيق", "Plain Text": "نص عادي", "Source Code": "كود مصدر", diff --git a/i18n/bg.json b/i18n/bg.json index 353427bc..80557a97 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Формат", "Plain Text": "Чист текст", "Source Code": "Изходен код", diff --git a/i18n/ca.json b/i18n/ca.json index d178e417..b08a27c9 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Text sense format", "Source Code": "Codi font", diff --git a/i18n/co.json b/i18n/co.json index 38d763ba..b66d0843 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -164,6 +164,14 @@ "EiB": "Eo", "ZiB": "Zo", "YiB": "Yo", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Furmatu", "Plain Text": "Testu in chjaru", "Source Code": "Codice di fonte", diff --git a/i18n/cs.json b/i18n/cs.json index 6a8db622..54c0bb42 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formát", "Plain Text": "Prostý text", "Source Code": "Zdrojový kód", diff --git a/i18n/de.json b/i18n/de.json index d653a614..3e53684f 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Nur Text", "Source Code": "Quellcode", diff --git a/i18n/el.json b/i18n/el.json index 57fbb2cd..f4f5060a 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Μορφοποίηση", "Plain Text": "Απλό κείμενο", "Source Code": "Πηγαίος Κώδικας", diff --git a/i18n/en.json b/i18n/en.json index d1b2a46f..69bc9927 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Plain Text", "Source Code": "Source Code", diff --git a/i18n/es.json b/i18n/es.json index 45c838bd..2852f5ad 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formato", "Plain Text": "Texto sin formato", "Source Code": "Código fuente", diff --git a/i18n/et.json b/i18n/et.json index 04d9af86..74990de0 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formaat", "Plain Text": "Lihttekst", "Source Code": "Lähtekood", diff --git a/i18n/fi.json b/i18n/fi.json index 4f268308..9deaf7c1 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formaatti", "Plain Text": "Perusteksti", "Source Code": "Lähdekoodi", diff --git a/i18n/fr.json b/i18n/fr.json index faafdc29..60a1062a 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -164,6 +164,14 @@ "EiB": "Eio", "ZiB": "Zio", "YiB": "Yio", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Texte brut", "Source Code": "Code source", diff --git a/i18n/he.json b/i18n/he.json index ae3279a8..dd35b47e 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "פורמט", "Plain Text": "טקסט פשוט", "Source Code": "קוד מקור", diff --git a/i18n/hi.json b/i18n/hi.json index d1b2a46f..69bc9927 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Plain Text", "Source Code": "Source Code", diff --git a/i18n/hu.json b/i18n/hu.json index 711ffa73..544876ea 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formátum", "Plain Text": "Egyszerű szöveg", "Source Code": "Forráskód", diff --git a/i18n/id.json b/i18n/id.json index e0d16c1f..f40a8077 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Teks Biasa", "Source Code": "Kode Sumber", diff --git a/i18n/it.json b/i18n/it.json index f358153e..0bb0c8a7 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formato", "Plain Text": "Solo Testo", "Source Code": "Codice Sorgente", diff --git a/i18n/ja.json b/i18n/ja.json index f4cc44fc..c92d5330 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "形式", "Plain Text": "プレーンテキスト", "Source Code": "ソースコード", diff --git a/i18n/jbo.json b/i18n/jbo.json index 9935a6c0..8362a5d1 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Plain Text", "Source Code": "Source Code", diff --git a/i18n/ko.json b/i18n/ko.json index d1b2a46f..69bc9927 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Plain Text", "Source Code": "Source Code", diff --git a/i18n/ku.json b/i18n/ku.json index 5b98497e..90581539 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Plain Text", "Source Code": "Source Code", diff --git a/i18n/la.json b/i18n/la.json index 97eb2f96..644710ec 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Plain Text", "Source Code": "Source Code", diff --git a/i18n/lt.json b/i18n/lt.json index e68669ca..a983f544 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formatas", "Plain Text": "Grynasis tekstas", "Source Code": "Pirminis kodas", diff --git a/i18n/nl.json b/i18n/nl.json index 13da44a8..14955bea 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formaat", "Plain Text": "Platte tekst", "Source Code": "Broncode", diff --git a/i18n/no.json b/i18n/no.json index eb866d85..d5599466 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Ren Tekst", "Source Code": "Kildekode", diff --git a/i18n/oc.json b/i18n/oc.json index 6b3c567f..105aba90 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -164,6 +164,14 @@ "EiB": "Eio", "ZiB": "Zio", "YiB": "Yio", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Tèxte brut", "Source Code": "Còdi font", diff --git a/i18n/pl.json b/i18n/pl.json index d17bb5ca..a6a5e9ba 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Czysty tekst", "Source Code": "Kod źródłowy", diff --git a/i18n/pt.json b/i18n/pt.json index 19e7e6c7..e0beee4d 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formato", "Plain Text": "Texto sem formato", "Source Code": "Código fonte", diff --git a/i18n/ro.json b/i18n/ro.json index 4708ac19..2ca1f12e 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formatare", "Plain Text": "Text neformatat", "Source Code": "Cod sursă", diff --git a/i18n/ru.json b/i18n/ru.json index ef681b45..f5c14ed1 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -164,6 +164,14 @@ "EiB": "Эбайт", "ZiB": "Збайт", "YiB": "Йбайт", + "KB": "КБ", + "MB": "МБ", + "GB": "ГБ", + "TB": "ТБ", + "PB": "ПБ", + "EB": "ЭБ", + "ZB": "ЗБ", + "YB": "ЙБ", "Format": "Формат", "Plain Text": "Обычный текст", "Source Code": "Исходный код", diff --git a/i18n/sk.json b/i18n/sk.json index 9dc57c1a..aa857389 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Formát", "Plain Text": "Čistý text", "Source Code": "Zdrojový kód", diff --git a/i18n/sl.json b/i18n/sl.json index 571c2356..8e4d3654 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -164,6 +164,14 @@ "EiB": "EB", "ZiB": "ZB", "YiB": "YB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Surov tekst", "Source Code": "Odprta koda", diff --git a/i18n/sv.json b/i18n/sv.json index 3e2be511..5bd94ffa 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Plain Text", "Source Code": "Source Code", diff --git a/i18n/th.json b/i18n/th.json index e2a58cdd..248b6ffd 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "รูปแบบ", "Plain Text": "ข้อความล้วน", "Source Code": "ซอร์สโค้ด", diff --git a/i18n/tr.json b/i18n/tr.json index 8eb47712..6d067827 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Format", "Plain Text": "Düz Yazı", "Source Code": "Kaynak Kodu", diff --git a/i18n/uk.json b/i18n/uk.json index 1110c23f..458c5bd4 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -164,6 +164,14 @@ "EiB": "Ебайт", "ZiB": "Збайт", "YiB": "Йбайт", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "Формат", "Plain Text": "Звичайний текст", "Source Code": "Вихідний код", diff --git a/i18n/zh.json b/i18n/zh.json index c6d80717..0b7ca6c4 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -164,6 +164,14 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", + "KB": "KB", + "MB": "MB", + "GB": "GB", + "TB": "TB", + "PB": "PB", + "EB": "EB", + "ZB": "ZB", + "YB": "YB", "Format": "格式", "Plain Text": "纯文本", "Source Code": "源代码", diff --git a/js/privatebin.js b/js/privatebin.js index cfe1e4c6..53a6adbc 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -591,6 +591,32 @@ jQuery.PrivateBin = (function($, RawDeflate) { return expirationDate; }; + /** + * Convert Bytes to KB/MB/GB + * + * @name Helper.formatBytes + * @function + * + * @param {number} bytes + * @return {string} + */ + me.formatBytes = function (bytes) + { + let result = ''; + const kilobyte = 1000; + const decimalPoint = 2; + const sizes = [I18n._('B'), I18n._('KB'), I18n._('MB'), I18n._('GB')]; + const index = Math.floor(Math.log(bytes) / Math.log(kilobyte)); + + if (bytes > 0) { + result = parseFloat((bytes / Math.pow(kilobyte, index)).toFixed(decimalPoint)) + ' ' + sizes[index]; + } else { + result = `0 ${I18n._('B')}`; + } + + return result; + } + /** * resets state, used for unit testing * @@ -3000,7 +3026,9 @@ jQuery.PrivateBin = (function($, RawDeflate) { if (typeof fileName !== 'undefined') { attachmentLink.attr('download', fileName); - template.append(fileName); + + const fileSize = me.getAttachmentSize(attachmentData); + template.append(`(${fileName}, ${fileSize})`); } // sanitize SVG preview @@ -3202,6 +3230,25 @@ jQuery.PrivateBin = (function($, RawDeflate) { return attachmentData.substring(5, mimeTypeEnd); } + /** + * Get attachment size in B/KB/MB/GB + * + * @name AttachmentViewer.getAttachmentSize + * @function + * @param {string} attachmentData - Base64 string + */ + me.getAttachmentSize = function(attachmentData) + { + const base64Start = attachmentData.indexOf(',') + 1; + const rawData = attachmentData.substring(base64Start); + const decodedData = rawData.length > 0 ? atob(rawData) : ''; + + const buf = new Uint8Array(decodedData.length); + const bytes = new Blob([buf]).size; + + return Helper.formatBytes(bytes); + } + /** * moves the attachment link to another element * diff --git a/js/test/Helper.js b/js/test/Helper.js index ab72a6ad..4f751897 100644 --- a/js/test/Helper.js +++ b/js/test/Helper.js @@ -290,5 +290,31 @@ describe('Helper', function () { } ); }); + + describe('formatBytes', function () { + jsc.property('returns 0 B for 0 bytes', function () { + return $.PrivateBin.Helper.formatBytes(0) === '0 B'; + }); + + jsc.property('formats bytes < 1000 as B', function () { + return $.PrivateBin.Helper.formatBytes(500) === '500 B'; + }); + + jsc.property('formats kilobytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(1500) === '1.5 KB'; + }); + + jsc.property('formats megabytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(2 * 1000 * 1000) === '2 MB'; + }); + + jsc.property('formats gigabytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(3.45 * 1000 * 1000 * 1000) === '3.45 GB'; + }); + + jsc.property('rounds to two decimal places', function () { + return $.PrivateBin.Helper.formatBytes(1234567) === '1.23 MB'; + }); + }); }); diff --git a/lib/Configuration.php b/lib/Configuration.php index c39f71f5..f097e288 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -119,7 +119,7 @@ class Configuration 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', 'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-m6RrsOsz4RgIWXDzgRghQDx6aegFCpkpqURwhfXwE/rNWhe/1rPJaLR+FXII82iTWo0n9JCzSbqrDqkYVPI50w==', + 'js/privatebin.js' => 'sha512-rRy19m1V347H457Vcvy0IpbuohAuvIPgVY4s+FgoSn9avqFj3lYA4W/Ewz3DS+BekCUvVm9I8/YMbW82PzgFmQ==', 'js/purify-3.2.6.js' => 'sha512-zqwL4OoBLFx89QPewkz4Lz5CSA2ktU+f31fuECkF0iK3Id5qd3Zpq5dMby8KwHjIEpsUgOqwF58cnmcaNem0EA==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', From d15ac590d708883c758fb72438e8663ad5478235 Mon Sep 17 00:00:00 2001 From: Mikhail Romanov <42250412+Ribas160@users.noreply.github.com> Date: Sat, 28 Jun 2025 13:47:43 +0300 Subject: [PATCH 5/7] Use decodedData to get file size Co-authored-by: El RIDO --- js/privatebin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/privatebin.js b/js/privatebin.js index 53a6adbc..639fff54 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -3027,7 +3027,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { if (typeof fileName !== 'undefined') { attachmentLink.attr('download', fileName); - const fileSize = me.getAttachmentSize(attachmentData); + const fileSize = Helper.formatBytes(decodedData.length); template.append(`(${fileName}, ${fileSize})`); } From a2ca2ecb3730a14e4472eaf9796f4580e9db431b Mon Sep 17 00:00:00 2001 From: Ribas160 Date: Sat, 28 Jun 2025 14:00:50 +0300 Subject: [PATCH 6/7] Use 1024 based file size units to follow consistency --- js/privatebin.js | 25 +++---------------------- js/test/Helper.js | 14 +++++++------- lib/Configuration.php | 2 +- 3 files changed, 11 insertions(+), 30 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 639fff54..7298db65 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -592,7 +592,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { }; /** - * Convert Bytes to KB/MB/GB + * Convert Bytes to KiB/MiB/GiB * * @name Helper.formatBytes * @function @@ -603,9 +603,9 @@ jQuery.PrivateBin = (function($, RawDeflate) { me.formatBytes = function (bytes) { let result = ''; - const kilobyte = 1000; + const kilobyte = 1024; const decimalPoint = 2; - const sizes = [I18n._('B'), I18n._('KB'), I18n._('MB'), I18n._('GB')]; + const sizes = [I18n._('B'), I18n._('KiB'), I18n._('MiB'), I18n._('GiB')]; const index = Math.floor(Math.log(bytes) / Math.log(kilobyte)); if (bytes > 0) { @@ -3230,25 +3230,6 @@ jQuery.PrivateBin = (function($, RawDeflate) { return attachmentData.substring(5, mimeTypeEnd); } - /** - * Get attachment size in B/KB/MB/GB - * - * @name AttachmentViewer.getAttachmentSize - * @function - * @param {string} attachmentData - Base64 string - */ - me.getAttachmentSize = function(attachmentData) - { - const base64Start = attachmentData.indexOf(',') + 1; - const rawData = attachmentData.substring(base64Start); - const decodedData = rawData.length > 0 ? atob(rawData) : ''; - - const buf = new Uint8Array(decodedData.length); - const bytes = new Blob([buf]).size; - - return Helper.formatBytes(bytes); - } - /** * moves the attachment link to another element * diff --git a/js/test/Helper.js b/js/test/Helper.js index 4f751897..6308fdc0 100644 --- a/js/test/Helper.js +++ b/js/test/Helper.js @@ -300,20 +300,20 @@ describe('Helper', function () { return $.PrivateBin.Helper.formatBytes(500) === '500 B'; }); - jsc.property('formats kilobytes correctly', function () { - return $.PrivateBin.Helper.formatBytes(1500) === '1.5 KB'; + jsc.property('formats kibibytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(1500) === '1.46 KiB'; }); - jsc.property('formats megabytes correctly', function () { - return $.PrivateBin.Helper.formatBytes(2 * 1000 * 1000) === '2 MB'; + jsc.property('formats mebibytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(2 * 1000 * 1000) === '1.91 MiB'; }); - jsc.property('formats gigabytes correctly', function () { - return $.PrivateBin.Helper.formatBytes(3.45 * 1000 * 1000 * 1000) === '3.45 GB'; + jsc.property('formats gibibytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(3.45 * 1000 * 1000 * 1000) === '3.21 GiB'; }); jsc.property('rounds to two decimal places', function () { - return $.PrivateBin.Helper.formatBytes(1234567) === '1.23 MB'; + return $.PrivateBin.Helper.formatBytes(1234567) === '1.18 MiB'; }); }); }); diff --git a/lib/Configuration.php b/lib/Configuration.php index f097e288..ab8aaf19 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -119,7 +119,7 @@ class Configuration 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', 'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-rRy19m1V347H457Vcvy0IpbuohAuvIPgVY4s+FgoSn9avqFj3lYA4W/Ewz3DS+BekCUvVm9I8/YMbW82PzgFmQ==', + 'js/privatebin.js' => 'sha512-zvJ6Feu2NvROB236BBxbP+8eYbUTJ5GCfhOJVL/RI6pJQpR3AS4ps0d1cVDqgUFW8wY0tiwE7JTE13gPWO3lHA==', 'js/purify-3.2.6.js' => 'sha512-zqwL4OoBLFx89QPewkz4Lz5CSA2ktU+f31fuECkF0iK3Id5qd3Zpq5dMby8KwHjIEpsUgOqwF58cnmcaNem0EA==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', From c35729e23e4b42d9707fd27d49ecae969037019b Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 28 Jun 2025 14:47:26 +0200 Subject: [PATCH 7/7] lowercase SI-unit prefix for kilo SI-unit prefix for kilo is small k to distinguish from unit K for Kelvin --- i18n/ar.json | 2 +- i18n/bg.json | 2 +- i18n/ca.json | 2 +- i18n/co.json | 2 +- i18n/cs.json | 2 +- i18n/de.json | 2 +- i18n/el.json | 2 +- i18n/en.json | 2 +- i18n/es.json | 2 +- i18n/et.json | 2 +- i18n/fi.json | 2 +- i18n/fr.json | 2 +- i18n/he.json | 2 +- i18n/hi.json | 2 +- i18n/hu.json | 2 +- i18n/id.json | 2 +- i18n/it.json | 2 +- i18n/ja.json | 2 +- i18n/jbo.json | 2 +- i18n/ko.json | 2 +- i18n/ku.json | 2 +- i18n/la.json | 2 +- i18n/lt.json | 2 +- i18n/nl.json | 2 +- i18n/no.json | 2 +- i18n/oc.json | 2 +- i18n/pl.json | 2 +- i18n/pt.json | 2 +- i18n/ro.json | 2 +- i18n/ru.json | 2 +- i18n/sk.json | 2 +- i18n/sl.json | 2 +- i18n/sv.json | 2 +- i18n/th.json | 2 +- i18n/tr.json | 2 +- i18n/uk.json | 2 +- i18n/zh.json | 2 +- 37 files changed, 37 insertions(+), 37 deletions(-) diff --git a/i18n/ar.json b/i18n/ar.json index b4a84fe9..8648a502 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -164,7 +164,7 @@ "EiB": "إكسابايت", "ZiB": "زيتابايت", "YiB": "يوتابايت", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/bg.json b/i18n/bg.json index 80557a97..33737086 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/ca.json b/i18n/ca.json index b08a27c9..7f1b098e 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/co.json b/i18n/co.json index b66d0843..7beac1e9 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -164,7 +164,7 @@ "EiB": "Eo", "ZiB": "Zo", "YiB": "Yo", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/cs.json b/i18n/cs.json index 54c0bb42..143e58be 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/de.json b/i18n/de.json index 3e53684f..e484e35c 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/el.json b/i18n/el.json index f4f5060a..cf17b4da 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/en.json b/i18n/en.json index 69bc9927..6cd88118 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/es.json b/i18n/es.json index 2852f5ad..72877fe0 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/et.json b/i18n/et.json index 74990de0..db4236c8 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/fi.json b/i18n/fi.json index 9deaf7c1..e9b1f87b 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/fr.json b/i18n/fr.json index 60a1062a..49caaeef 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -164,7 +164,7 @@ "EiB": "Eio", "ZiB": "Zio", "YiB": "Yio", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/he.json b/i18n/he.json index dd35b47e..4c41e1e4 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/hi.json b/i18n/hi.json index 69bc9927..6cd88118 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/hu.json b/i18n/hu.json index 544876ea..6fdeb5d4 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/id.json b/i18n/id.json index f40a8077..e1a5d6a2 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/it.json b/i18n/it.json index 0bb0c8a7..fcb978aa 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/ja.json b/i18n/ja.json index c92d5330..be652d1f 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/jbo.json b/i18n/jbo.json index 8362a5d1..385e024a 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/ko.json b/i18n/ko.json index 69bc9927..6cd88118 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/ku.json b/i18n/ku.json index 90581539..5bc421dd 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/la.json b/i18n/la.json index 644710ec..85bdddfb 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/lt.json b/i18n/lt.json index a983f544..bfe66044 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/nl.json b/i18n/nl.json index 14955bea..b7cf1196 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/no.json b/i18n/no.json index d5599466..b22354dd 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/oc.json b/i18n/oc.json index 105aba90..8e2d4275 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -164,7 +164,7 @@ "EiB": "Eio", "ZiB": "Zio", "YiB": "Yio", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/pl.json b/i18n/pl.json index a6a5e9ba..1b1185d5 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/pt.json b/i18n/pt.json index e0beee4d..4ca64bbe 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/ro.json b/i18n/ro.json index 2ca1f12e..26b5425d 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/ru.json b/i18n/ru.json index f5c14ed1..fd7cbea4 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -164,7 +164,7 @@ "EiB": "Эбайт", "ZiB": "Збайт", "YiB": "Йбайт", - "KB": "КБ", + "kB": "КБ", "MB": "МБ", "GB": "ГБ", "TB": "ТБ", diff --git a/i18n/sk.json b/i18n/sk.json index aa857389..2e351739 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/sl.json b/i18n/sl.json index 8e4d3654..6870870d 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -164,7 +164,7 @@ "EiB": "EB", "ZiB": "ZB", "YiB": "YB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/sv.json b/i18n/sv.json index 5bd94ffa..7d116f33 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/th.json b/i18n/th.json index 248b6ffd..a116c21e 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/tr.json b/i18n/tr.json index 6d067827..9214bf5c 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/uk.json b/i18n/uk.json index 458c5bd4..c9506294 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -164,7 +164,7 @@ "EiB": "Ебайт", "ZiB": "Збайт", "YiB": "Йбайт", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB", diff --git a/i18n/zh.json b/i18n/zh.json index 0b7ca6c4..8046939c 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -164,7 +164,7 @@ "EiB": "EiB", "ZiB": "ZiB", "YiB": "YiB", - "KB": "KB", + "kB": "kB", "MB": "MB", "GB": "GB", "TB": "TB",