Skip to content

Commit 7c3caf8

Browse files
authored
Merge pull request #43 from u8array/chore/image-upload-error-feedback
feat(image): inline upload-error feedback parity with FontManager
2 parents 99082ae + 9178895 commit 7c3caf8

34 files changed

Lines changed: 46 additions & 0 deletions

‎src/components/Fonts/FontManager.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ function AddFontForm({ onDone }: AddFontFormProps) {
9090
await loadFontFile(file, printerName);
9191
onDone();
9292
} catch {
93+
// Inline hint is the only signal (non-TTF/OTF, oversized, FileReader
94+
// failure). Codebase has no production logging path; specific causes
95+
// are debugged with a devtools breakpoint on this catch.
9396
setUploadFailed(true);
9497
} finally {
9598
setUploading(false);

‎src/locales/ar.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ const ar = {
256256
selectImage: 'اختر صورة…',
257257
upload: 'رفع صورة',
258258
uploading: 'جارٍ الرفع…',
259+
uploadError: 'تعذر تحميل الصورة',
259260
preview: 'معاينة',
260261
widthDots: 'العرض (نقاط)',
261262
threshold: 'عتبة أحادية',

‎src/locales/bg.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ const bg = {
256256
selectImage: 'Изберете изображение…',
257257
upload: 'Качване на изображение',
258258
uploading: 'Качване…',
259+
uploadError: 'Изображението не може да бъде заредено',
259260
preview: 'Преглед',
260261
widthDots: 'Ширина (точки)',
261262
threshold: 'Моно праг',

‎src/locales/cs.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ const cs = {
256256
selectImage: 'Vybrat obrázek…',
257257
upload: 'Nahrát obrázek',
258258
uploading: 'Nahrávání…',
259+
uploadError: 'Obrázek nelze načíst',
259260
preview: 'Náhled',
260261
widthDots: 'Šířka (body)',
261262
threshold: 'Mono práh',

‎src/locales/da.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ const da = {
256256
selectImage: 'Vælg billede…',
257257
upload: 'Upload billede',
258258
uploading: 'Uploader…',
259+
uploadError: 'Kunne ikke indlæse billede',
259260
preview: 'Forhåndsvisning',
260261
widthDots: 'Bredde (punkter)',
261262
threshold: 'Mono-tærskel',

‎src/locales/de.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ const de = {
276276
selectImage: 'Bild auswählen…',
277277
upload: 'Bild hochladen',
278278
uploading: 'Hochladen…',
279+
uploadError: 'Bild konnte nicht geladen werden',
279280
preview: 'Vorschau',
280281
widthDots: 'Breite (Punkte)',
281282
threshold: 'Mono-Schwellenwert',

‎src/locales/el.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ const el = {
256256
selectImage: 'Επιλογή εικόνας…',
257257
upload: 'Μεταφόρτωση εικόνας',
258258
uploading: 'Μεταφόρτωση…',
259+
uploadError: 'Αδυναμία φόρτωσης εικόνας',
259260
preview: 'Προεπισκόπηση',
260261
widthDots: 'Πλάτος (κουκκίδες)',
261262
threshold: 'Κατώφλι mono',

‎src/locales/en.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ const en = {
276276
selectImage: 'Select image…',
277277
upload: 'Upload image',
278278
uploading: 'Uploading…',
279+
uploadError: 'Could not load image',
279280
preview: 'Preview',
280281
widthDots: 'Width (dots)',
281282
threshold: 'Mono threshold',

‎src/locales/es.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ const es = {
256256
selectImage: 'Seleccionar imagen…',
257257
upload: 'Subir imagen',
258258
uploading: 'Subiendo…',
259+
uploadError: 'No se pudo cargar la imagen',
259260
preview: 'Vista previa',
260261
widthDots: 'Ancho (puntos)',
261262
threshold: 'Umbral mono',

‎src/locales/et.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ const et = {
256256
selectImage: 'Vali pilt…',
257257
upload: 'Laadi pilt üles',
258258
uploading: 'Üleslaadimine…',
259+
uploadError: 'Pildi laadimine ebaõnnestus',
259260
preview: 'Eelvaade',
260261
widthDots: 'Laius (punktid)',
261262
threshold: 'Mono lävi',

0 commit comments

Comments
 (0)