mirror of
https://github.com/penpot/penpot.git
synced 2026-09-13 23:48:42 +00:00
🎉 Add clear error messages (#9886)
This commit is contained in:
parent
237fa568e8
commit
6e8d2b3708
@ -496,7 +496,22 @@
|
|||||||
[:div (:name entry)]
|
[:div (:name entry)]
|
||||||
(when-let [err (:error entry)]
|
(when-let [err (:error entry)]
|
||||||
[:div {:class (stl/css :import-error-detail)}
|
[:div {:class (stl/css :import-error-detail)}
|
||||||
(tr err)])]))]
|
;; Temporary frontend-side error translations to provide more meaningful
|
||||||
|
;; messages until backend error handling is improved and standardized.
|
||||||
|
;; These mappings are only a short-term workaround and should be removed
|
||||||
|
;; once the error handling enhancement is implemented.
|
||||||
|
;; https://github.com/penpot/penpot/issues/9884
|
||||||
|
(cond
|
||||||
|
(and (string? err)
|
||||||
|
(str/includes? (str/lower err) "check error"))
|
||||||
|
(tr "dashboard.import.import-error.check-error")
|
||||||
|
|
||||||
|
(and (string? err)
|
||||||
|
(str/includes? (str/lower err) "corrupt"))
|
||||||
|
(tr "dashboard.import.import-error.corrupt-file")
|
||||||
|
|
||||||
|
:else
|
||||||
|
(tr "dashboard.import.import-error.unknown-error"))])]))]
|
||||||
[:div (tr "dashboard.import.import-error.message2")]]
|
[:div (tr "dashboard.import.import-error.message2")]]
|
||||||
|
|
||||||
(for [entry entries]
|
(for [entry entries]
|
||||||
|
|||||||
@ -755,6 +755,18 @@ msgstr "Uploading data to server (%s/%s)"
|
|||||||
msgid "dashboard.import.progress.upload-media"
|
msgid "dashboard.import.progress.upload-media"
|
||||||
msgstr "Uploading file: %s"
|
msgstr "Uploading file: %s"
|
||||||
|
|
||||||
|
#: src/app/main/ui/dashboard/import.cljs
|
||||||
|
msgid "dashboard.import.import-error.check-error"
|
||||||
|
msgstr "We couldn't verify this file."
|
||||||
|
|
||||||
|
#: src/app/main/ui/dashboard/import.cljs
|
||||||
|
msgid "dashboard.import.import-error.corrupt-file"
|
||||||
|
msgstr "This file appears to be damaged."
|
||||||
|
|
||||||
|
#: src/app/main/ui/dashboard/import.cljs
|
||||||
|
msgid "dashboard.import.import-error.unknown-error"
|
||||||
|
msgstr "Something went wrong while processing this file."
|
||||||
|
|
||||||
#: src/app/main/ui/dashboard/team.cljs:765
|
#: src/app/main/ui/dashboard/team.cljs:765
|
||||||
msgid "dashboard.invitation-modal.delete"
|
msgid "dashboard.invitation-modal.delete"
|
||||||
msgstr "You're going to delete the invitations to:"
|
msgstr "You're going to delete the invitations to:"
|
||||||
|
|||||||
@ -759,6 +759,18 @@ msgstr "Enviando datos al servidor (%s/%s)"
|
|||||||
msgid "dashboard.import.progress.upload-media"
|
msgid "dashboard.import.progress.upload-media"
|
||||||
msgstr "Enviando fichero: %s"
|
msgstr "Enviando fichero: %s"
|
||||||
|
|
||||||
|
#: src/app/main/ui/dashboard/import.cljs
|
||||||
|
msgid "dashboard.import.import-error.check-error"
|
||||||
|
msgstr "No hemos podido verificar este archivo."
|
||||||
|
|
||||||
|
#: src/app/main/ui/dashboard/import.cljs
|
||||||
|
msgid "dashboard.import.import-error.corrupt-file"
|
||||||
|
msgstr "Parece que este archivo está dañado."
|
||||||
|
|
||||||
|
#: src/app/main/ui/dashboard/import.cljs
|
||||||
|
msgid "dashboard.import.import-error.unknown-error"
|
||||||
|
msgstr "Se ha producido un error al procesar este archivo."
|
||||||
|
|
||||||
#: src/app/main/ui/dashboard/team.cljs:765
|
#: src/app/main/ui/dashboard/team.cljs:765
|
||||||
msgid "dashboard.invitation-modal.delete"
|
msgid "dashboard.invitation-modal.delete"
|
||||||
msgstr "Vas a eliminar las invitaciones para:"
|
msgstr "Vas a eliminar las invitaciones para:"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user