Translations, suggestion box, UX
All checks were successful
Gitea/kapitanbooru-uploader/pipeline/head This commit looks good

This commit is contained in:
2025-03-03 00:47:38 +01:00
parent 9f187afc22
commit 9361bc0363
17 changed files with 1515 additions and 135 deletions

View File

@@ -1,3 +1,6 @@
from .I18N import _
# Klasa pomocnicza do monitorowania postępu uploadu
class ProgressFile:
def __init__(self, f, callback, total_size, cancel_event=None):
@@ -10,7 +13,7 @@ class ProgressFile:
def read(self, size=-1):
# Check for cancellation before reading more data
if self.cancel_event is not None and self.cancel_event.is_set():
raise Exception("Upload cancelled by user.")
raise Exception(_("Upload cancelled by user."))
data = self.f.read(size)
self.read_bytes += len(data)