Skip to content

Commit

Permalink
Add i18n to image upload
Browse files Browse the repository at this point in the history
  • Loading branch information
egli committed Feb 6, 2024
1 parent d074368 commit 44aeffa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/cljc/daisyproducer2/i18n.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
:versions "Versions"
:new-version "New Version"
:new-image "New Image"
:upload-images "Upload Images"
:cleanup-versions "Clean up"
;;
:documents "Documents"
Expand Down Expand Up @@ -146,6 +147,7 @@
:versions "Versionen"
:new-version "Neue Version"
:new-image "Neues Bild"
:upload-images "Bilder hochladen"
:cleanup-versions "Alte Versionen löschen"
;;
:documents "Dokumente"
Expand Down
15 changes: 8 additions & 7 deletions src/cljs/daisyproducer2/progress.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns daisyproducer2.progress
(:require [re-frame.core :as rf]))
(:require [daisyproducer2.i18n :refer [tr]]
[re-frame.core :as rf]))

(rf/reg-sub
::progress
Expand All @@ -22,9 +23,9 @@
{value :value max :max} progress]
(when (and progress (< value max))
[:<>
[:label.label {:for (name id)} "Uploading Files"]
[:progress.progress
{:id (name id)
:value value
:max max}
(str (* 100 (/ value max)) "%")]])))
[:label.label {:for (name id)} (tr [:upload-images])]
[:progress.progress
{:id (name id)
:value value
:max max}
(str (* 100 (/ value max)) "%")]])))

0 comments on commit 44aeffa

Please sign in to comment.