diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index cd76b7e1..368a2584 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -39,8 +39,8 @@ defaultformatter = "plaintext" ; (optional) set a syntax highlighting theme, as found in css/prettify/ ; syntaxhighlightingtheme = "sons-of-obsidian" -; size limit per paste or comment in bytes, defaults to 10 Mebibytes -sizelimit = 10485760 +; size limit per paste or comment in bytes, defaults to 10 Megabytes +sizelimit = 1000000 ; by default PrivateBin use "bootstrap5" template (tpl/bootstrap5.php). ; Optionally you can enable the template selection menu, which uses diff --git a/i18n/ar.json b/i18n/ar.json index f56d44bb..92ffc1e6 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "تعذر إنشاء اللصق: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "لا يمكن فك تشفير اللصق: مفتاح فك التشفير مفقود في URL (هل استخدمت معيد توجيه أو أداة تقصير لعناوين URL تزيل جزءًا من عنوان URL؟)", "B": "بايت", - "KiB": "كيلوبايت", - "MiB": "ميجابايت", - "GiB": "جيجابايت", - "TiB": "تيرابايت", - "PiB": "بيتابايت", - "EiB": "إكسابايت", - "ZiB": "زيتابايت", - "YiB": "يوتابايت", "kB": "كيلوبايت", "MB": "ميجابايت", "GB": "جيجابايت", diff --git a/i18n/bg.json b/i18n/bg.json index 33737086..e786dfde 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Създаването на връзката ви беше неуспешно: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Дешифроването на информацията беше неуспешно: Ключа за декриптиране липсва във връзката (Да не сте използвали услуга за пренасочване или скъсяване на връзката, което би изрязало части от нея?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/ca.json b/i18n/ca.json index 7f1b098e..8d19fc6f 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "No es pot desxifrar la nota: falta la clau de desxifrat a l'URL (vau utilitzar un adreçament o un escurçador d'URL que elimina part de l'URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/co.json b/i18n/co.json index 943cc631..e4b13228 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Ùn si pò micca creà l’appiccicu : %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Ùn si pò micca dicifrà l’appiccicu : A chjave di dicifratura hè assente in l’indirizzu. Averiate impiegatu un orientadore d’indirizzu o un riduttore chì ammuzzeghja una parte di l’indirizzu ?", "B": "o", - "KiB": "Kio", - "MiB": "Mio", - "GiB": "Gio", - "TiB": "Tio", - "PiB": "Pio", - "EiB": "Eio", - "ZiB": "Zio", - "YiB": "Yio", "kB": "Ko", "MB": "Mo", "GB": "Go", diff --git a/i18n/cs.json b/i18n/cs.json index 143e58be..1ec6316a 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Nepodařilo se vytvořit příspěvek: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nepodařilo se dešifrovat příspěvek: V adrese chybí dešifrovací klíč (Nepoužili jste přesměrovač nebo zkracovač URL, který maže části URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/de.json b/i18n/de.json index e484e35c..fe895bb8 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Text konnte nicht erstellt werden: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Konnte Paste nicht entschlüsseln: Der Schlüssel fehlt in der Adresse (Hast du eine Umleitung oder einen URL-Verkürzer benutzt, der Teile der Adresse entfernt?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/el.json b/i18n/el.json index cf17b4da..c78fd49d 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Δεν ήταν δυνατή η δημιουργία επικόλλησης: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Δεν ήταν δυνατή η αποκρυπτογράφηση της επικόλλησης: Το κλειδί αποκρυπτογράφησης λείπει από τον σύνδεσμο (Μήπως χρησιμοποιήσατε ανακατεύθυνση συνδέσμου ή υπηρεσία συντόμευσης συνδέσμου;)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/en.json b/i18n/en.json index 6cd88118..9c85a2af 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/es.json b/i18n/es.json index 72877fe0..169ab263 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "No fue posible crear el archivo: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "No es posible descifrar el documento: Falta la clave de descifrado en la URL (¿Utilizó un redirector o un acortador de URL que quite parte de la URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/et.json b/i18n/et.json index db4236c8..7d74616f 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Ei suutnud kleebet luua: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Ei suutnud kleebet dekrüpteerida: Dekrüpteerimisvõti on URL-ist puudu (Kas kasutasid ümbersuunajat või URL-i lühendajat, mis eemaldab osa URL-ist?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/fi.json b/i18n/fi.json index e9b1f87b..4062c783 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Pastea ei voitu luoda: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Pastea ei voitu purkaa: Purkausavain puuttuu URL:stä (Käytitkö uudelleenohjaajaa tai URL-lyhentäjää joka poistaa osan URL:stä?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/fr.json b/i18n/fr.json index 23dfae8d..0b6c4a48 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Impossible de créer le paste : %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Impossible de déchiffrer le paste : Clé de déchiffrement manquante dans l'URL (Avez-vous utilisé un redirecteur ou un site de réduction d'URL qui supprime une partie de l'URL ?)", "B": "o", - "KiB": "Kio", - "MiB": "Mio", - "GiB": "Gio", - "TiB": "Tio", - "PiB": "Pio", - "EiB": "Eio", - "ZiB": "Zio", - "YiB": "Yio", "kB": "ko", "MB": "Mo", "GB": "Go", diff --git a/i18n/he.json b/i18n/he.json index 4c41e1e4..eb0fe5c8 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "לא ניתן ליצור הדבקה: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "לא ניתן לפענח הדבקה: מפתח הפענוח חסר בכתובת (השתמשת במערכת הפנייה או מקצר כתובות שחותכים חלק מהכתובת?)", "B": "ב׳", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/hi.json b/i18n/hi.json index 6cd88118..9c85a2af 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/hu.json b/i18n/hu.json index 6fdeb5d4..a4dab7a2 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Nem tudtuk létrehozni a bejegyzést: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nem tudjuk visszafejteni a bejegyzést: a dekódoláshoz szükséges kulcs hiányzik a címből. Talán URL rövidítőt használtál ami kivágta azt belőle?", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/id.json b/i18n/id.json index e1a5d6a2..9798eef8 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Tidak dapat membuat paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Tidak dapat mendekripsi paste: Kunci dekripsi tidak ada di URL (Apakah Anda menggunakan redirector atau penyingkat URL yang menghapus bagian dari URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/it.json b/i18n/it.json index fcb978aa..e6795e66 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Non riesco a creare il messaggio: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Non riesco a decifrare il messaggio: manca la chiave di decifrazione nell'URL (La chiave è parte integrante dell'URL. Per caso hai usato un Redirector o un altro servizio che ha rimosso una parte dell'URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/ja.json b/i18n/ja.json index be652d1f..c809c0e6 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "ペーストを作成できませんでした:%s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "ペーストを復号化できません:復号化キーがURLにありません(URLの一部を削除するリダイレクト機能またはURLの短縮アプリケーションを使いましたか?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/jbo.json b/i18n/jbo.json index 385e024a..484e14ef 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/ko.json b/i18n/ko.json index 6cd88118..9c85a2af 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/ku.json b/i18n/ku.json index 5bc421dd..b9e7c74e 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/la.json b/i18n/la.json index 85bdddfb..05231746 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/lt.json b/i18n/lt.json index bfe66044..e62cc1ba 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Nepavyko sukurti įdėjimo: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nepavyksta iššifruoti įdėjimo: URL adrese trūksta iššifravimo rakto (Ar naudojote peradresavimo ar URL trumpinimo įrankį, kuris pašalina URL dalį?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/nl.json b/i18n/nl.json index 90aa54f6..5b86f6ce 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Kon de paste niet aanmaken: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Kon de paste niet decoderen: Decoderingssleutel ontbreekt in URL (Heb je een doorverwijzer of een URL-verkorter gebruikt die een deel van de URL verwijdert?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/no.json b/i18n/no.json index b22354dd..950ff8b3 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Kunne ikke opprette innlegg: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Kan ikke dekryptere innlegg: Dekrypteringsnøkkelen mangler i adressen (Har du bruket en redirector eller en URL forkorter som fjerner en del av addressen?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/oc.json b/i18n/oc.json index f39eeb06..05545033 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Impossible de crear lo tèxte : %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Impossible de deschifrar lo tèxte : clau de deschiframent absenta de l’URL (Avètz utilizat un redirector o un site de reduccion d’URL que suprimís una partida de l’URL ?)", "B": "o", - "KiB": "Kio", - "MiB": "Mio", - "GiB": "Gio", - "TiB": "Tio", - "PiB": "Pio", - "EiB": "Eio", - "ZiB": "Zio", - "YiB": "Yio", "kB": "ko", "MB": "Mo", "GB": "Go", diff --git a/i18n/pl.json b/i18n/pl.json index 1b1185d5..65406a7a 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Nie udało się utworzyć wklejki: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nie udało się odszyfrować wklejki - brak klucza deszyfrującego w adresie (użyłeś skracacza linków, który ucina część adresu?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/pt.json b/i18n/pt.json index 4ca64bbe..19372694 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Não foi possível criar cópia: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Não foi possível decifrar a cópia: chave de decriptografia ausente na URL (Você utilizou um redirecionador ou encurtador de URL que removeu parte dela?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/ro.json b/i18n/ro.json index 26b5425d..656ead8f 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Nu s-a putut crea paste-ul: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nu s-a putut decripta paste-ul: Cheia de decriptare lipsește din URL (Ați folosit un redirector sau un scurtător de URL care a tăiat o parte din URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/ru.json b/i18n/ru.json index 0759e507..c0c1ebc4 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Не удалось опубликовать запись: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Невозможно расшифровать запись: Ключ расшифровки отсутствует в ссылке (Может быть, вы используете сокращатель ссылок, который удаляет часть ссылки?)", "B": "байт", - "KiB": "Кбайт", - "MiB": "Мбайт", - "GiB": "Гбайт", - "TiB": "Тбайт", - "PiB": "Пбайт", - "EiB": "Эбайт", - "ZiB": "Збайт", - "YiB": "Йбайт", "kB": "кбайт", "MB": "Мбайт", "GB": "Гбайт", diff --git a/i18n/sk.json b/i18n/sk.json index 393e2033..fd5ac0e8 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Nepodarilo sa vytvoriť príspevok: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nie je možné dešifrovať príspevok: V URL adrese chýba dešifrovací kľúč (Použili ste presmerovač alebo skracovač adresy, ktorý odstráni časť adresy URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/sl.json b/i18n/sl.json index 6870870d..12832a3b 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Ne morem ustvariti prilepka: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Ne morem odkodirati prilepka: V URL-ju manjka ključ (A si uporabil krajšalnik URL-jev, ki odstrani del URL-ja?)", "B": "o", - "KiB": "KB", - "MiB": "MB", - "GiB": "GB", - "TiB": "TB", - "PiB": "PB", - "EiB": "EB", - "ZiB": "ZB", - "YiB": "YB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/sv.json b/i18n/sv.json index 7d116f33..023ffa7d 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/th.json b/i18n/th.json index da12d56b..bb9abded 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "ไม่สามารถสร้างข้อมูลการฝากโค้ดได้: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "ไม่สามารถถอดรหัสข้อมูลการฝากโค้ดได้: คีย์ถอดรหัสที่อยู่ใน URL หายไป (คุณได้ใช้ตัวเปลี่ยนเส้นทางหรือตัวย่อ URL ที่มีการตัดส่วนของ URL ออกหรือไม่)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/tr.json b/i18n/tr.json index 9214bf5c..d3a0e744 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Yazı oluşturulamadı: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Yazı şifresi çözülemedi, çözme anahtarı URL'de bulunamadı. (Buraya bir yönlendirici veya URL kısaltıcı kullanarak gelmiş olabilirsiniz.)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/i18n/uk.json b/i18n/uk.json index 4ca9572d..cc608cc9 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "Не вдалося опублікувати допис: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Неможливо розшифрувати запис: Ключ дешифрування відсутній в посиланні (Можливо, ви використовуєте скорочувач посилань, що видаляє частину посилання?)", "B": "байт", - "KiB": "Кбайт", - "MiB": "Мбайт", - "GiB": "Гбайт", - "TiB": "Тбайт", - "PiB": "Пбайт", - "EiB": "Ебайт", - "ZiB": "Збайт", - "YiB": "Йбайт", "kB": "кбайт", "MB": "Мбайт", "GB": "Гбайт", diff --git a/i18n/zh.json b/i18n/zh.json index 8046939c..75bec666 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -156,14 +156,6 @@ "Could not create paste: %s": "无法创建粘贴:%s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "无法解密粘贴:URL中缺失解密密钥(是否使用了重定向或者短链接导致密钥丢失?)", "B": "B", - "KiB": "KiB", - "MiB": "MiB", - "GiB": "GiB", - "TiB": "TiB", - "PiB": "PiB", - "EiB": "EiB", - "ZiB": "ZiB", - "YiB": "YiB", "kB": "kB", "MB": "MB", "GB": "GB", diff --git a/js/privatebin.js b/js/privatebin.js index ecb6aaa0..1ee2ef74 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -602,9 +602,9 @@ jQuery.PrivateBin = (function($) { me.formatBytes = function (bytes) { let result = ''; - const kilobyte = 1024; + const kilobyte = 1000; const decimalPoint = 2; - const sizes = [I18n._('B'), I18n._('KiB'), I18n._('MiB'), I18n._('GiB')]; + const sizes = [I18n._('B'), I18n._('kB'), I18n._('MB'), I18n._('GB')]; const index = Math.floor(Math.log(bytes) / Math.log(kilobyte)); if (bytes > 0) { diff --git a/js/test/Helper.js b/js/test/Helper.js index a9ae41ab..676c9dc5 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 kibibytes correctly', function () { - return $.PrivateBin.Helper.formatBytes(1500) === '1.46 KiB'; + jsc.property('formats kilobytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(1500) === '1.5 kB'; }); - jsc.property('formats mebibytes correctly', function () { - return $.PrivateBin.Helper.formatBytes(2 * 1000 * 1000) === '1.91 MiB'; + jsc.property('formats megabytes correctly', function () { + return $.PrivateBin.Helper.formatBytes(2 * 1000 * 1000) === '2 MB'; }); - jsc.property('formats gibibytes correctly', function () { - return $.PrivateBin.Helper.formatBytes(3.45 * 1000 * 1000 * 1000) === '3.21 GiB'; + 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.18 MiB'; + return $.PrivateBin.Helper.formatBytes(1234567) === '1.23 MB'; }); }); diff --git a/lib/Configuration.php b/lib/Configuration.php index 06c661e4..33fe4a56 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -116,7 +116,7 @@ class Configuration 'js/kjua-0.10.0.js' => 'sha512-BYj4xggowR7QD150VLSTRlzH62YPfhpIM+b/1EUEr7RQpdWAGKulxWnOvjFx1FUlba4m6ihpNYuQab51H6XlYg==', 'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-tEMoEpNQ36hksIPjp5y8go2RY0oQL9qY3Kzh1BKjOf1y35QIP7klUSHJqDhVkcLTyDc0CoZVEMMxSoMMc7EYCw==', + 'js/privatebin.js' => 'sha512-KANCiaRidjdq4qQoQ6hWROVt3Lazvx7/Po9oSNFdeREo2fThyu4tjkFg/b6i2ZVjOvin6PHzj3Bza0yzA2Xktw==', 'js/purify-3.2.6.js' => 'sha512-zqwL4OoBLFx89QPewkz4Lz5CSA2ktU+f31fuECkF0iK3Id5qd3Zpq5dMby8KwHjIEpsUgOqwF58cnmcaNem0EA==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', 'js/zlib-1.3.1-1.js' => 'sha512-5bU9IIP4PgBrOKLZvGWJD4kgfQrkTz8Z3Iqeu058mbQzW3mCumOU6M3UVbVZU9rrVoVwaW4cZK8U8h5xjF88eQ==', diff --git a/lib/Filter.php b/lib/Filter.php index 27ad05da..7d20c003 100644 --- a/lib/Filter.php +++ b/lib/Filter.php @@ -59,10 +59,10 @@ class Filter */ public static function formatHumanReadableSize($size) { - $iec = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'); + $iec = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); $i = 0; - while (($size / 1024) >= 1) { - $size = $size / 1024; + while (($size / 1000) >= 1) { + $size = $size / 1000; ++$i; } return number_format($size, $i ? 2 : 0, '.', ' ') . ' ' . I18n::_($iec[$i]); diff --git a/tst/FilterTest.php b/tst/FilterTest.php index 63361367..cd1d1018 100644 --- a/tst/FilterTest.php +++ b/tst/FilterTest.php @@ -23,36 +23,36 @@ class FilterTest extends TestCase public function testFilterMakesSizesHumanlyReadable() { $this->assertEquals('1 B', Filter::formatHumanReadableSize(1)); - $this->assertEquals('1 000 B', Filter::formatHumanReadableSize(1000)); - $this->assertEquals('1.00 KiB', Filter::formatHumanReadableSize(1024)); - $this->assertEquals('1.21 KiB', Filter::formatHumanReadableSize(1234)); - $exponent = 1024; - $this->assertEquals('1 000.00 KiB', Filter::formatHumanReadableSize(1000 * $exponent)); - $this->assertEquals('1.00 MiB', Filter::formatHumanReadableSize(1024 * $exponent)); - $this->assertEquals('1.21 MiB', Filter::formatHumanReadableSize(1234 * $exponent)); - $exponent *= 1024; - $this->assertEquals('1 000.00 MiB', Filter::formatHumanReadableSize(1000 * $exponent)); - $this->assertEquals('1.00 GiB', Filter::formatHumanReadableSize(1024 * $exponent)); - $this->assertEquals('1.21 GiB', Filter::formatHumanReadableSize(1234 * $exponent)); - $exponent *= 1024; - $this->assertEquals('1 000.00 GiB', Filter::formatHumanReadableSize(1000 * $exponent)); - $this->assertEquals('1.00 TiB', Filter::formatHumanReadableSize(1024 * $exponent)); - $this->assertEquals('1.21 TiB', Filter::formatHumanReadableSize(1234 * $exponent)); - $exponent *= 1024; - $this->assertEquals('1 000.00 TiB', Filter::formatHumanReadableSize(1000 * $exponent)); - $this->assertEquals('1.00 PiB', Filter::formatHumanReadableSize(1024 * $exponent)); - $this->assertEquals('1.21 PiB', Filter::formatHumanReadableSize(1234 * $exponent)); - $exponent *= 1024; - $this->assertEquals('1 000.00 PiB', Filter::formatHumanReadableSize(1000 * $exponent)); - $this->assertEquals('1.00 EiB', Filter::formatHumanReadableSize(1024 * $exponent)); - $this->assertEquals('1.21 EiB', Filter::formatHumanReadableSize(1234 * $exponent)); - $exponent *= 1024; - $this->assertEquals('1 000.00 EiB', Filter::formatHumanReadableSize(1000 * $exponent)); - $this->assertEquals('1.00 ZiB', Filter::formatHumanReadableSize(1024 * $exponent)); - $this->assertEquals('1.21 ZiB', Filter::formatHumanReadableSize(1234 * $exponent)); - $exponent *= 1024; - $this->assertEquals('1 000.00 ZiB', Filter::formatHumanReadableSize(1000 * $exponent)); - $this->assertEquals('1.00 YiB', Filter::formatHumanReadableSize(1024 * $exponent)); - $this->assertEquals('1.21 YiB', Filter::formatHumanReadableSize(1234 * $exponent)); + $this->assertEquals('1.00 kB', Filter::formatHumanReadableSize(1000)); + $this->assertEquals('1.02 kB', Filter::formatHumanReadableSize(1024)); + $this->assertEquals('1.23 kB', Filter::formatHumanReadableSize(1234)); + $exponent = 1000; + $this->assertEquals('1.00 MB', Filter::formatHumanReadableSize(1000 * $exponent)); + $this->assertEquals('1.02 MB', Filter::formatHumanReadableSize(1024 * $exponent)); + $this->assertEquals('1.23 MB', Filter::formatHumanReadableSize(1234 * $exponent)); + $exponent *= 1000; + $this->assertEquals('1.00 GB', Filter::formatHumanReadableSize(1000 * $exponent)); + $this->assertEquals('1.02 GB', Filter::formatHumanReadableSize(1024 * $exponent)); + $this->assertEquals('1.23 GB', Filter::formatHumanReadableSize(1234 * $exponent)); + $exponent *= 1000; + $this->assertEquals('1.00 TB', Filter::formatHumanReadableSize(1000 * $exponent)); + $this->assertEquals('1.02 TB', Filter::formatHumanReadableSize(1024 * $exponent)); + $this->assertEquals('1.23 TB', Filter::formatHumanReadableSize(1234 * $exponent)); + $exponent *= 1000; + $this->assertEquals('1.00 PB', Filter::formatHumanReadableSize(1000 * $exponent)); + $this->assertEquals('1.02 PB', Filter::formatHumanReadableSize(1024 * $exponent)); + $this->assertEquals('1.23 PB', Filter::formatHumanReadableSize(1234 * $exponent)); + $exponent *= 1000; + $this->assertEquals('1.00 EB', Filter::formatHumanReadableSize(1000 * $exponent)); + $this->assertEquals('1.02 EB', Filter::formatHumanReadableSize(1024 * $exponent)); + $this->assertEquals('1.23 EB', Filter::formatHumanReadableSize(1234 * $exponent)); + $exponent *= 1000; + $this->assertEquals('1.00 ZB', Filter::formatHumanReadableSize(1000 * $exponent)); + $this->assertEquals('1.02 ZB', Filter::formatHumanReadableSize(1024 * $exponent)); + $this->assertEquals('1.23 ZB', Filter::formatHumanReadableSize(1234 * $exponent)); + $exponent *= 1000; + $this->assertEquals('1.00 YB', Filter::formatHumanReadableSize(1000 * $exponent)); + $this->assertEquals('1.02 YB', Filter::formatHumanReadableSize(1024 * $exponent)); + $this->assertEquals('1.23 YB', Filter::formatHumanReadableSize(1234 * $exponent)); } }