mirror of
https://github.com/penpot/penpot.git
synced 2025-03-18 10:41:29 -05:00
🌐 Translate several dashboards
This commit is contained in:
parent
edbab7f8d5
commit
e06bc2cc95
14 changed files with 193 additions and 102 deletions
|
@ -92,7 +92,7 @@
|
|||
(defrecord CreateCollection [id]
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [item {:name "Unnamed collection"
|
||||
(let [item {:name (str "Unnamed Collection (" (gensym "c") ")")
|
||||
:id id
|
||||
:created-at (dt/now)
|
||||
:type :own
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
(defrecord CreateCollection []
|
||||
ptk/WatchEvent
|
||||
(watch [_ state s]
|
||||
(let [coll {:name "Unnamed collection"
|
||||
(let [coll {:name (str "Unnamed Collection (" (gensym "c") ")")
|
||||
:id (uuid/random)}]
|
||||
(->> (rp/req :create/image-collection coll)
|
||||
(rx/map :payload)
|
||||
|
|
|
@ -12,30 +12,63 @@
|
|||
"ds.num-projects" ["No projects"
|
||||
"%s project"
|
||||
"%s projects"]
|
||||
"ds.num-colors" ["No colors"
|
||||
"%s color"
|
||||
"%s colors"]
|
||||
"ds.num-images" ["No images"
|
||||
"%s image"
|
||||
"%s images"]
|
||||
"ds.project-title" "Your projects"
|
||||
"ds.project-new" "+ New project"
|
||||
|
||||
"ds.ordering" "Sort by"
|
||||
"ds.ordering.by-name" "name"
|
||||
"ds.ordering.by-last-update" "last update"
|
||||
"ds.ordering.by-creation-date" "creation date"
|
||||
"ds.search.placeholder" "Search..."
|
||||
"ds.uploaded-at" "Uploaded at %s"
|
||||
|
||||
"ds.confirm-title" "Are you sure?"
|
||||
"ds.confirm-ok" "Ok"
|
||||
"ds.confirm-cancel" "Cancel"
|
||||
|
||||
"ds.multiselect-bar.copy" "Copy"
|
||||
"ds.multiselect-bar.copy-to-library" "Copy to library"
|
||||
"ds.multiselect-bar.move" "Move"
|
||||
"ds.multiselect-bar.move-to-library" "Move to library"
|
||||
"ds.multiselect-bar.rename" "Rename"
|
||||
"ds.multiselect-bar.delete" "Delete"
|
||||
|
||||
"ds.elements" "ELEMENTS"
|
||||
"ds.num-elements" ["%s element"
|
||||
"%s elements"]
|
||||
|
||||
"ds.icons" "ICONS"
|
||||
"ds.num-icons" ["No icons"
|
||||
"%s icon"
|
||||
"%s icons"]
|
||||
"ds.project-ordering" "Sort by"
|
||||
"ds.project-ordering.by-name" "name"
|
||||
"ds.project-ordering.by-last-update" "last update"
|
||||
"ds.project-ordering.by-creation-date" "creation date"
|
||||
"ds.project-search.placeholder" "Search..."
|
||||
"ds.your-icons-title" "YOUR ICONS"
|
||||
"ds.store-icons-title" "ICONS STORE"
|
||||
"ds.icons-collection.new" "+ New collection"
|
||||
"ds.icon.new" "+ New icon"
|
||||
|
||||
"ds.elements" "ELEMENTS"
|
||||
"ds.icons" "ICONS"
|
||||
"ds.images" "IMAGES"
|
||||
"ds.num-images" ["No images"
|
||||
"%s image"
|
||||
"%s images"]
|
||||
"ds.your-images-title" "YOUR IMAGES"
|
||||
"ds.store-images-title" "IMAGES STORE"
|
||||
"ds.images-collection.new" "+ New library"
|
||||
"ds.image-new" "+ New image"
|
||||
|
||||
"ds.colors" "COLORS"
|
||||
"ds.num-colors" ["No colors"
|
||||
"%s color"
|
||||
"%s colors"]
|
||||
"ds.your-colors-title" "YOUR COLORS"
|
||||
"ds.store-colors-title" "COLORS STORE"
|
||||
"ds.colors-collection.new" "+ New library"
|
||||
"ds.color-new" "+ New color"
|
||||
"ds.color-lightbox.title" "New color"
|
||||
"ds.color-lightbox.add" "+ Add color"
|
||||
|
||||
"ds.library-title" "Library: "
|
||||
"ds.standard-title" "STANDARD"
|
||||
"ds.your-libraries-title" "YOUR LIBRARIES"
|
||||
"ds.num-elements" ["%s element"
|
||||
"%s elements"]
|
||||
|
||||
"ds.recent-colors" "Recent colors"
|
||||
"ds.element-options" "Element options"
|
||||
|
@ -51,6 +84,11 @@
|
|||
"ds.help.curve" "Curve"
|
||||
"ds.help.ruler" "Ruler"
|
||||
|
||||
"ds.user.profile" "Profile"
|
||||
"ds.user.password" "Password"
|
||||
"ds.user.notifications" "Notifications"
|
||||
"ds.user.exit" "Exit"
|
||||
|
||||
"auth.message.recovery-token-sent" "Password recovery link sent to your inbox."
|
||||
"auth.message.password-recovered" "Password successfully recovered."
|
||||
|
||||
|
@ -59,6 +97,12 @@
|
|||
"settings.notifications" "NOTIFICATIONS"
|
||||
"settings.profile-saved" "Profile saved successfully!"
|
||||
"settings.password-saved" "Password saved successfully!"
|
||||
"settings.wrong-old-password" "Wrong old password"
|
||||
"settings.change-password" "Change password"
|
||||
"settings.old-password" "Old password"
|
||||
"settings.new-password" "New password"
|
||||
"settings.confirm-password" "Confirm password"
|
||||
"settings.update-settings" "Update settings"
|
||||
|
||||
"history.alert-message" "You are seeing version %s"
|
||||
"errors.api.form.old-password-not-match" "Incorrect old password"
|
||||
|
|
|
@ -12,30 +12,63 @@
|
|||
"ds.num-projects" ["Nb projets"
|
||||
"%s projet"
|
||||
"%s projets"]
|
||||
"ds.num-colors" ["Nb couleurs"
|
||||
"%s couleur"
|
||||
"%s couleurs"]
|
||||
"ds.num-images" ["Nb images"
|
||||
"%s image"
|
||||
"%s images"]
|
||||
"ds.project-title" "Vos projets"
|
||||
"ds.project-new" "+ Nouveau projet"
|
||||
|
||||
"ds.ordering" "Trier par"
|
||||
"ds.ordering.by-name" "nom"
|
||||
"ds.ordering.by-last-update" "dernière mise à jour"
|
||||
"ds.ordering.by-creation-date" "date de création"
|
||||
"ds.search.placeholder" "Rechercher..."
|
||||
"ds.uploaded-at" "Mise en ligne : %s"
|
||||
|
||||
"ds.confirm-title" "Êtes-vous sûr ?"
|
||||
"ds.confirm-ok" "Ok"
|
||||
"ds.confirm-cancel" "Annuler"
|
||||
|
||||
"ds.multiselect-bar.copy" "Copier"
|
||||
"ds.multiselect-bar.copy-to-library" "Copier vers la librairie"
|
||||
"ds.multiselect-bar.move" "Déplacer"
|
||||
"ds.multiselect-bar.move-to-library" "Déplacer vers la librairie"
|
||||
"ds.multiselect-bar.rename" "Renommer"
|
||||
"ds.multiselect-bar.delete" "Supprimer"
|
||||
|
||||
"ds.elements" "ÉLÉMENTS"
|
||||
"ds.num-elements" ["%s élément"
|
||||
"%s éléments"]
|
||||
|
||||
"ds.icons" "ICÔNES"
|
||||
"ds.num-icons" ["Nb icônes"
|
||||
"%s icône"
|
||||
"%s icônes"]
|
||||
"ds.project-ordering" "Trier par"
|
||||
"ds.project-ordering.by-name" "nom"
|
||||
"ds.project-ordering.by-last-update" "dernière mise à jour"
|
||||
"ds.project-ordering.by-creation-date" "date de création"
|
||||
"ds.project-search.placeholder" "Rechercher..."
|
||||
"ds.your-icons-title" "VOS ICÔNES"
|
||||
"ds.store-icons-title" "BOUTIQUE"
|
||||
"ds.icons-collection.new" "+ Nouvelle collection"
|
||||
"ds.icon.new" "+ Nouvel icône"
|
||||
|
||||
"ds.elements" "ÉLÉMENTS"
|
||||
"ds.icons" "ICÔNES"
|
||||
"ds.images" "IMAGES"
|
||||
"ds.num-images" ["Nb images"
|
||||
"%s image"
|
||||
"%s images"]
|
||||
"ds.your-images-title" "VOS IMAGES"
|
||||
"ds.store-images-title" "BOUTIQUE"
|
||||
"ds.images-collection.new" "+ Nouvelle librairie"
|
||||
"ds.image-new" "+ New image"
|
||||
|
||||
"ds.colors" "COULEURS"
|
||||
"ds.num-colors" ["Nb couleurs"
|
||||
"%s couleur"
|
||||
"%s couleurs"]
|
||||
"ds.your-colors-title" "YOUR COLORS"
|
||||
"ds.store-colors-title" "BOUTIQUE"
|
||||
"ds.colors-collection.new" "+ Nouvelle librairie"
|
||||
"ds.color-new" "+ Nouvelle color"
|
||||
"ds.color-lightbox.title" "Nouvelle couleur"
|
||||
"ds.color-lightbox.add" "+ Ajouter couleur"
|
||||
|
||||
"ds.library-title" "Librairie : "
|
||||
"ds.standard-title" "STANDARD"
|
||||
"ds.your-libraries-title" "VOS LIBRAIRIES"
|
||||
"ds.num-elements" ["%s élément"
|
||||
"%s éléments"]
|
||||
|
||||
"ds.recent-colors" "Couleurs récentes"
|
||||
"ds.element-options" "Options d'élément"
|
||||
|
@ -51,14 +84,25 @@
|
|||
"ds.help.curve" "Courbe"
|
||||
"ds.help.ruler" "Règle"
|
||||
|
||||
"ds.user.profile" "Profil"
|
||||
"ds.user.password" "Mot de passe"
|
||||
"ds.user.notifications" "Notifications"
|
||||
"ds.user.exit" "Quitter"
|
||||
|
||||
"auth.message.recovery-token-sent" "Password recovery link sent to your inbox."
|
||||
"auth.message.password-recovered" "Password successfully recovered."
|
||||
|
||||
"settings.profile" "PROFIL"
|
||||
"settings.password" "MOT DE PASSE"
|
||||
"settings.notifications" "NOTIFICATIONS"
|
||||
"settings.profile-saved" "Profil enregistré avec succès!"
|
||||
"settings.password-saved" "Mot de passe enregistré avec succès!"
|
||||
"settings.profile-saved" "Profil enregistré avec succès !"
|
||||
"settings.password-saved" "Mot de passe enregistré avec succès !"
|
||||
"settings.wrong-old-password" "Ancien mot de passe incorrect"
|
||||
"settings.change-password" "Changement de mot de passe"
|
||||
"settings.old-password" "Ancien mot de passe"
|
||||
"settings.new-password" "Nouveau mot de passe"
|
||||
"settings.confirm-password" "Confirmez mot de passe"
|
||||
"settings.update-settings" "Mettre à jour les paramètres"
|
||||
|
||||
"history.alert-message" "Vous voyez la version %s"
|
||||
"errors.api.form.old-password-not-match" "Ancien mot de passe incorrect"
|
||||
|
@ -81,6 +125,4 @@
|
|||
|
||||
"errors.network" "Impossible de se connecter au serveur principal."
|
||||
"errors.generic" "Quelque chose c'est mal passé."
|
||||
"errors.conflict" "Conflit sur la sauvegarde des données, actualisez et réessayez."
|
||||
|
||||
})
|
||||
"errors.conflict" "Conflit sur la sauvegarde des données, actualisez et réessayez."})
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
(:require [uxbox.main.data.lightbox :as udl]
|
||||
[uxbox.builtins.icons :as i]
|
||||
[rumext.core :as mx :include-macros true]
|
||||
[uxbox.util.i18n :refer (tr)]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.main.ui.lightbox :as lbx]))
|
||||
|
||||
|
@ -24,17 +25,17 @@
|
|||
(when on-cancel
|
||||
(on-cancel (dissoc ctx :on-accept :on-cancel))))]
|
||||
[:div.lightbox-body.confirm-dialog
|
||||
[:h3 "Are you sure?"]
|
||||
[:h3 (tr "ds.confirm-title")]
|
||||
(if hint
|
||||
[:span hint])
|
||||
[:div.row-flex
|
||||
[:input.btn-success.btn-small
|
||||
{:type "button"
|
||||
:value "Ok"
|
||||
:value (tr "ds.confirm-ok")
|
||||
:on-click accept}]
|
||||
[:input.btn-delete.btn-small
|
||||
{:type "button"
|
||||
:value "Cancel"
|
||||
:value (tr "ds.confirm-cancel")
|
||||
:on-click cancel}]]
|
||||
[:a.close {:href "#"
|
||||
:on-click #(do (dom/prevent-default %)
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
[:ul.library-elements {}
|
||||
(when own?
|
||||
[:li {}
|
||||
[:a.btn-primary {:on-click #(st/emit! (dc/create-collection))} "+ New library"]])
|
||||
[:a.btn-primary {:on-click #(st/emit! (dc/create-collection))} (tr "ds.colors-collection.new")]])
|
||||
(mx/doseq [{:keys [id] :as coll} colls]
|
||||
(let [selected? (= (:id coll) selected)]
|
||||
(-> (nav-item coll selected?)
|
||||
|
@ -161,10 +161,10 @@
|
|||
[:ul.library-tabs {}
|
||||
[:li {:class-name (when (= type :own) "current")
|
||||
:on-click (partial select-tab :own)}
|
||||
"YOUR COLORS"]
|
||||
(tr "ds.your-colors-title")]
|
||||
[:li {:class-name (when (= type :builtin) "current")
|
||||
:on-click (partial select-tab :builtin)}
|
||||
"COLORS STORE"]]
|
||||
(tr "ds.store-colors-title")]]
|
||||
(nav-section type id colls)]]))
|
||||
|
||||
;; --- Grid
|
||||
|
@ -172,7 +172,7 @@
|
|||
(mx/defc grid-form
|
||||
[coll-id]
|
||||
[:div.grid-item.small-item.add-project {:on-click #(udl/open! :color-form {:coll coll-id})}
|
||||
[:span {} "+ New color"]])
|
||||
[:span {} (tr "ds.color-new")]])
|
||||
|
||||
(mx/defc grid-options-tooltip
|
||||
{:mixins [mx/reactive mx/static]}
|
||||
|
@ -225,22 +225,22 @@
|
|||
;; if editable
|
||||
[:div.multiselect-nav {}
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:on-click on-toggle-copy :alt "Copy"}
|
||||
{:on-click on-toggle-copy :alt (tr "ds.multiselect-bar.copy")}
|
||||
(when (:show-copy-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Copy to library"
|
||||
:title (tr "ds.multiselect-bar.copy-to-library")
|
||||
:on-select on-copy))
|
||||
|
||||
i/copy]
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:on-click on-toggle-move :alt "Move"}
|
||||
{:on-click on-toggle-move :alt (tr "ds.multiselect-bar.move")}
|
||||
(when (:show-move-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Move to library"
|
||||
:title (tr "ds.multiselect-bar.move-to-library")
|
||||
:on-select on-move))
|
||||
i/move]
|
||||
[:span.delete.tooltip.tooltip-top
|
||||
{:alt "Delete"
|
||||
{:alt (tr "ds.multiselect-bar.delete")
|
||||
:on-click on-delete}
|
||||
i/trash]]
|
||||
|
||||
|
@ -250,7 +250,7 @@
|
|||
{:on-click on-toggle-copy}
|
||||
(when (:show-copy-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Copy to library"
|
||||
:title (tr "ds.multiselect-bar.copy-to-library")
|
||||
:on-select on-copy))
|
||||
i/organize]])]))
|
||||
|
||||
|
@ -342,14 +342,14 @@
|
|||
(on-close [event]
|
||||
(udl/close!))]
|
||||
[:div.lightbox-body {}
|
||||
[:h3 {} "New color"]
|
||||
[:h3 {} (tr "ds.color-lightbox.title")]
|
||||
[:form {}
|
||||
[:div.row-flex.center {}
|
||||
(colorpicker
|
||||
:value (or (:hex @local) color "#00ccff")
|
||||
:on-change #(swap! local assoc :hex %))]
|
||||
|
||||
[:input#project-btn.btn-primary {:value "+ Add color"
|
||||
[:input#project-btn.btn-primary {:value (tr "ds.color-lightbox.add")
|
||||
:on-click on-submit
|
||||
:type "button"}]]
|
||||
[:a.close {:on-click on-close} i/close]]))
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
;; --- Helpers & Constants
|
||||
|
||||
(def +ordering-options+
|
||||
{:name "ds.project-ordering.by-name"
|
||||
:created "ds.project-ordering.by-creation-date"})
|
||||
{:name "ds.ordering.by-name"
|
||||
:created "ds.ordering.by-creation-date"})
|
||||
|
||||
(defn- sort-icons-by
|
||||
[ordering icons]
|
||||
|
@ -181,7 +181,7 @@
|
|||
[:li {}
|
||||
[:a.btn-primary
|
||||
{:on-click #(st/emit! (di/create-collection))}
|
||||
"+ New collection"]])
|
||||
(tr "ds.icons-collection.new")]])
|
||||
(when own?
|
||||
(nav-item nil (nil? selected)))
|
||||
(mx/doseq [coll colls]
|
||||
|
@ -206,10 +206,10 @@
|
|||
[:ul.library-tabs {}
|
||||
[:li {:class-name (when own? "current")
|
||||
:on-click (partial select-tab :own)}
|
||||
"YOUR ICONS"]
|
||||
(tr "ds.your-icons-title")]
|
||||
[:li {:class-name (when builtin? "current")
|
||||
:on-click (partial select-tab :builtin)}
|
||||
"ICONS STORE"]]
|
||||
(tr "ds.store-icons-title")]]
|
||||
|
||||
(nav-section type id colls)]])))
|
||||
|
||||
|
@ -224,7 +224,7 @@
|
|||
(let [files (dom/get-event-files event)]
|
||||
(st/emit! (di/create-icons coll-id files))))]
|
||||
[:div.grid-item.small-item.add-project {:on-click forward-click}
|
||||
[:span {} "+ New icon"]
|
||||
[:span {} (tr "ds.icon.new")]
|
||||
[:input.upload-image-input
|
||||
{:style {:display "none"}
|
||||
:multiple true
|
||||
|
@ -288,26 +288,26 @@
|
|||
(if editable?
|
||||
[:div.multiselect-nav {}
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:on-click on-toggle-copy :alt "Copy"}
|
||||
{:on-click on-toggle-copy :alt (tr "ds.multiselect-bar.copy")}
|
||||
(when (:show-copy-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Copy to library"
|
||||
:title (tr "ds.multiselect-bar.copy-to-library")
|
||||
:on-select on-copy))
|
||||
i/copy]
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:on-click on-toggle-move :alt "Move"}
|
||||
{:on-click on-toggle-move :alt (tr "ds.multiselect-bar.move")}
|
||||
(when (:show-move-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Move to library"
|
||||
:title (tr "ds.multiselect-bar.move-to-library")
|
||||
:on-select on-move))
|
||||
i/move]
|
||||
(when (= 1 (count selected))
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:alt "Rename"
|
||||
{:alt (tr "ds.multiselect-bar.rename")
|
||||
:on-click on-rename}
|
||||
i/pencil])
|
||||
[:span.delete.tooltip.tooltip-top
|
||||
{:alt "Delete"
|
||||
{:alt (tr "ds.multiselect-bar.delete")
|
||||
:on-click on-delete}
|
||||
i/trash]]
|
||||
[:div.multiselect-nav
|
||||
|
@ -315,7 +315,7 @@
|
|||
{:on-click on-toggle-copy}
|
||||
(when (:show-copy-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Copy to library"
|
||||
:title (tr "ds.multiselect-bar.copy-to-library")
|
||||
:on-select on-copy))
|
||||
i/organize]])])))
|
||||
|
||||
|
@ -364,7 +364,7 @@
|
|||
:default-value (:name icon)}]
|
||||
[:h3 {:on-double-click on-edit}
|
||||
(:name icon)])
|
||||
(str "Uploaded at " (dt/format created-at "L"))]]))
|
||||
(str (tr "ds.uploaded-at" (dt/format created-at "L")))]]))
|
||||
|
||||
(mx/defc grid
|
||||
{:mixins [mx/static mx/reactive]}
|
||||
|
@ -421,7 +421,7 @@
|
|||
|
||||
;; Sorting
|
||||
[:div {}
|
||||
[:span {} (tr "ds.project-ordering")]
|
||||
[:span {} (tr "ds.ordering")]
|
||||
[:select.input-select
|
||||
{:on-change on-ordering-change
|
||||
:value (pr-str ordering)}
|
||||
|
@ -435,7 +435,7 @@
|
|||
:type "text"
|
||||
:on-change on-term-change
|
||||
:auto-focus true
|
||||
:placeholder (tr "ds.project-search.placeholder")
|
||||
:placeholder (tr "ds.search.placeholder")
|
||||
:value (or filtering "")}]
|
||||
[:div.clear-search {:on-click on-clear} i/close]]]])))
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
;; --- Helpers & Constants
|
||||
|
||||
(def +ordering-options+
|
||||
{:name "ds.project-ordering.by-name"
|
||||
:created "ds.project-ordering.by-creation-date"})
|
||||
{:name "ds.ordering.by-name"
|
||||
:created "ds.ordering.by-creation-date"})
|
||||
|
||||
(defn- sort-images-by
|
||||
[ordering images]
|
||||
|
@ -176,7 +176,7 @@
|
|||
[:li {}
|
||||
[:a.btn-primary
|
||||
{:on-click #(st/emit! (di/create-collection))}
|
||||
"+ New library"]])
|
||||
(tr "ds.images-collection.new")]])
|
||||
(when own?
|
||||
(nav-item nil (nil? selected)))
|
||||
(mx/doseq [coll collections]
|
||||
|
@ -205,10 +205,10 @@
|
|||
[:ul.library-tabs {}
|
||||
[:li {:class-name (when own? "current")
|
||||
:on-click (partial select-tab :own)}
|
||||
"YOUR IMAGES"]
|
||||
(tr "ds.your-images-title")]
|
||||
[:li {:class-name (when builtin? "current")
|
||||
:on-click (partial select-tab :builtin)}
|
||||
"IMAGES STORE"]]
|
||||
(tr "ds.store-images-title")]]
|
||||
|
||||
(nav-section type id colls)]])))
|
||||
|
||||
|
@ -227,7 +227,7 @@
|
|||
[:div.grid-item.add-project {:on-click forward-click}
|
||||
(if uploading?
|
||||
[:div {} ^:inline i/loader-pencil]
|
||||
[:span {} "+ New image"])
|
||||
[:span {} (tr "ds.image-new")])
|
||||
[:input.upload-image-input
|
||||
{:style {:display "none"}
|
||||
:multiple true
|
||||
|
@ -290,26 +290,26 @@
|
|||
;; If editable
|
||||
[:div.multiselect-nav {}
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:on-click on-toggle-copy :alt "Copy"}
|
||||
{:on-click on-toggle-copy :alt (tr "ds.multiselect-bar.copy")}
|
||||
(when (:show-copy-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Copy to library"
|
||||
:title (tr "ds.multiselect-bar.copy-to-library")
|
||||
:on-select on-copy))
|
||||
^:inline i/copy]
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:on-click on-toggle-move :alt "Move"}
|
||||
{:on-click on-toggle-move :alt (tr "ds.multiselect-bar.move")}
|
||||
(when (:show-move-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Move to library"
|
||||
:title (tr "ds.multiselect-bar.move-to-library")
|
||||
:on-select on-move))
|
||||
^:inline i/move]
|
||||
(when (= 1 (count selected))
|
||||
[:span.move-item.tooltip.tooltip-top
|
||||
{:alt "Rename"
|
||||
{:alt (tr "ds.multiselect-bar.rename")
|
||||
:on-click on-rename}
|
||||
^:inline i/pencil])
|
||||
[:span.delete.tooltip.tooltip-top
|
||||
{:alt "Delete"
|
||||
{:alt (tr "ds.multiselect-bar.delete")
|
||||
:on-click on-delete}
|
||||
^:inline i/trash]]
|
||||
|
||||
|
@ -319,7 +319,7 @@
|
|||
{:on-click on-toggle-copy}
|
||||
(when (:show-copy-tooltip @local)
|
||||
(grid-options-tooltip :selected id
|
||||
:title "Copy to library"
|
||||
:title (tr "ds.multiselect-bar.copy-to-library")
|
||||
:on-select on-copy))
|
||||
^:inline i/organize]])]))
|
||||
|
||||
|
@ -358,7 +358,7 @@
|
|||
:on-click on-edit
|
||||
:default-value (:name image)}]
|
||||
[:h3 {:on-double-click on-edit} (:name image)])
|
||||
[:span.date {} (str "Uploaded at " (dt/format created-at "L"))]]]))
|
||||
[:span.date {} (str (tr "ds.uploaded-at" (dt/format created-at "L")))]]]))
|
||||
|
||||
(mx/defc grid
|
||||
{:mixins [mx/static mx/reactive]}
|
||||
|
@ -417,7 +417,7 @@
|
|||
|
||||
;; Sorting
|
||||
[:div {}
|
||||
[:span {} (tr "ds.project-ordering")]
|
||||
[:span {} (tr "ds.ordering")]
|
||||
[:select.input-select {:on-change on-ordering-change
|
||||
:value (pr-str ordering)}
|
||||
(mx/doseq [[key value] (seq +ordering-options+)]
|
||||
|
@ -430,7 +430,7 @@
|
|||
:type "text"
|
||||
:on-change on-term-change
|
||||
:auto-focus true
|
||||
:placeholder (tr "ds.project-search.placeholder")
|
||||
:placeholder (tr "ds.search.placeholder")
|
||||
:value (or filtering "")}]
|
||||
[:div.clear-search {:on-click on-clear} i/close]]]])))
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
;; --- Helpers & Constants
|
||||
|
||||
(def +ordering-options+
|
||||
{:name "ds.project-ordering.by-name"
|
||||
:created "ds.project-ordering.by-creation-date"})
|
||||
{:name "ds.ordering.by-name"
|
||||
:created "ds.ordering.by-creation-date"})
|
||||
|
||||
;; --- Refs
|
||||
|
||||
|
@ -97,7 +97,7 @@
|
|||
|
||||
;; Sorting
|
||||
[:div {}
|
||||
[:span {} (tr "ds.project-ordering")]
|
||||
[:span {} (tr "ds.ordering")]
|
||||
[:select.input-select
|
||||
{:on-change on-ordering-change
|
||||
:value (pr-str ordering)}
|
||||
|
@ -111,7 +111,7 @@
|
|||
:type "text"
|
||||
:on-change on-term-change
|
||||
:auto-focus true
|
||||
:placeholder (tr "ds.project-search.placeholder")
|
||||
:placeholder (tr "ds.search.placeholder")
|
||||
:value (or filtering "")}]
|
||||
[:div.clear-search {:on-click on-clear} i/close]]]])))
|
||||
|
||||
|
@ -216,12 +216,12 @@
|
|||
(dom/prevent-default e)
|
||||
(udl/open! :create-project))]
|
||||
[:section.dashboard-grid {}
|
||||
[:h2 {} "Your projects"]
|
||||
[:h2 {} (tr "ds.project-title")]
|
||||
[:div.dashboard-grid-content {}
|
||||
[:div.dashboard-grid-row {}
|
||||
[:div.grid-item.add-project
|
||||
{:on-click on-click}
|
||||
[:span {} "+ New project"]]
|
||||
[:span {} (tr "ds.project-new")]]
|
||||
(mx/doseq [item projects]
|
||||
(-> (grid-item item)
|
||||
(mx/with-key (:id item))))]]])))
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
[potok.core :as ptk]
|
||||
[uxbox.builtins.icons :as i]
|
||||
[rumext.core :as mx :include-macros true]
|
||||
[uxbox.util.i18n :refer [tr]]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.main.ui.settings.header :refer (header)]))
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
(on-error [{:keys [code] :as payload}]
|
||||
(case code
|
||||
:uxbox.services.users/old-password-not-match
|
||||
(st/emit! (assoc-error :password-old "Wrong old password"))
|
||||
(st/emit! (assoc-error :password-old (tr "settings.wrong-old-password")))
|
||||
|
||||
:else
|
||||
(throw (ex-info "unexpected" {:error payload}))))
|
||||
|
@ -62,34 +62,34 @@
|
|||
:on-success on-success
|
||||
:on-error on-error)))]
|
||||
[:form.password-form
|
||||
[:span.user-settings-label "Change password"]
|
||||
[:span.user-settings-label (tr "settings.change-password")]
|
||||
[:input.input-text
|
||||
{:type "password"
|
||||
:class (fm/error-class errors :password-old)
|
||||
:value (:password-old data "")
|
||||
:on-change (partial on-change :password-old)
|
||||
:placeholder "Old password"}]
|
||||
:placeholder (tr "settings.old-password")}]
|
||||
(fm/input-error errors :password-old)
|
||||
[:input.input-text
|
||||
{:type "password"
|
||||
:class (fm/error-class errors :password-1)
|
||||
:value (:password-1 data "")
|
||||
:on-change (partial on-change :password-1)
|
||||
:placeholder "New password"}]
|
||||
:placeholder (tr "settings.new-password")}]
|
||||
(fm/input-error errors :password-1)
|
||||
[:input.input-text
|
||||
{:type "password"
|
||||
:class (fm/error-class errors :password-2)
|
||||
:value (:password-2 data "")
|
||||
:on-change (partial on-change :password-2)
|
||||
:placeholder "Confirm password"}]
|
||||
:placeholder (tr "settings.confirm-password")}]
|
||||
(fm/input-error errors :password-2)
|
||||
[:input.btn-primary
|
||||
{:type "button"
|
||||
:class (when-not valid? "btn-disabled")
|
||||
:disabled (not valid?)
|
||||
:on-click on-submit
|
||||
:value "Update settings"}]])))
|
||||
:value (tr "settings.update-settings")}]])))
|
||||
|
||||
;; --- Password Page
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
[uxbox.main.ui.settings.header :refer [header]]
|
||||
[uxbox.main.ui.messages :refer [messages-widget]]
|
||||
[uxbox.main.data.users :as udu]
|
||||
[uxbox.util.i18n :refer [tr]]
|
||||
[uxbox.util.forms :as fm]
|
||||
[uxbox.util.router :as r]
|
||||
[rumext.core :as mx :include-macros true]
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
[uxbox.main.data.lightbox :as udl]
|
||||
[uxbox.builtins.icons :as i]
|
||||
[uxbox.main.ui.navigation :as nav]
|
||||
[uxbox.util.i18n :refer (tr)]
|
||||
[uxbox.util.router :as rt]
|
||||
[rumext.core :as mx :include-macros true]))
|
||||
|
||||
|
@ -24,16 +25,16 @@
|
|||
[:ul.dropdown {:class (when-not open? "hide")}
|
||||
[:li {:on-click #(st/emit! (rt/navigate :settings/profile))}
|
||||
i/user
|
||||
[:span "Profile"]]
|
||||
[:span (tr "ds.user.profile")]]
|
||||
[:li {:on-click #(st/emit! (rt/navigate :settings/password))}
|
||||
i/lock
|
||||
[:span "Password"]]
|
||||
[:span (tr "ds.user.password")]]
|
||||
[:li {:on-click #(st/emit! (rt/navigate :settings/notifications))}
|
||||
i/mail
|
||||
[:span "Notifications"]]
|
||||
[:span (tr "ds.user.notifications")]]
|
||||
[:li {:on-click #(st/emit! (da/logout))}
|
||||
i/exit
|
||||
[:span "Exit"]]])
|
||||
[:span (tr "ds.user.exit")]]])
|
||||
|
||||
;; --- User Widget
|
||||
|
||||
|
@ -49,7 +50,8 @@
|
|||
photo (if (str/empty? (:photo profile ""))
|
||||
"/images/avatar.jpg"
|
||||
(:photo profile))]
|
||||
[:div.user-zone {:on-mouse-enter #(swap! local assoc :open true)
|
||||
[:div.user-zone {:on-click #(st/emit! (rt/navigate :settings/profile))
|
||||
:on-mouse-enter #(swap! local assoc :open true)
|
||||
:on-mouse-leave #(swap! local assoc :open false)}
|
||||
[:span (:fullname profile)]
|
||||
[:img {:src photo}]
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
(defn format
|
||||
"Returns a string representation of the Instant
|
||||
instace with optional `fmt` format parameter.
|
||||
instance with optional `fmt` format parameter.
|
||||
|
||||
You can use `:iso` and `:unix` shortcuts as
|
||||
format parameter.
|
||||
|
|
Loading…
Add table
Reference in a new issue