Merge branch 'i18n/multicanvas' of git://github.com/Monogramm/uxbox into Monogramm-i18n/multicanvas

This commit is contained in:
Andrey Antukh 2019-09-17 15:08:34 +02:00
commit e3eb6020a8
23 changed files with 278 additions and 125 deletions

View file

@ -41,10 +41,10 @@ services:
- backend_m2:/root/.m2 - backend_m2:/root/.m2
# - /etc/localtime:/etc/localtime:ro # - /etc/localtime:/etc/localtime:ro
# - /etc/timezone:/etc/timezone:ro # - /etc/timezone:/etc/timezone:ro
environment: environment:
# HTTP setup # HTTP setup
- UXBOX_HTTP_SERVER_DEBUG=false - UXBOX_HTTP_SERVER_DEBUG=false
- UXBOX_HTTP_SERVER_CORS=*
- UXBOX_MEDIA_URI="/media/" - UXBOX_MEDIA_URI="/media/"
- UXBOX_ASSETS_URI="/static/" - UXBOX_ASSETS_URI="/static/"
- UXBOX_MEDIA_DIRECTORY="data/media" - UXBOX_MEDIA_DIRECTORY="data/media"

View file

@ -14,6 +14,7 @@
"%s projects"] "%s projects"]
"ds.project-title" "Your projects" "ds.project-title" "Your projects"
"ds.project-new" "+ New project" "ds.project-new" "+ New project"
"ds.project-thumbnail.alt" "Project title"
"ds.ordering" "Sort by" "ds.ordering" "Sort by"
"ds.ordering.by-name" "name" "ds.ordering.by-name" "name"
@ -21,6 +22,7 @@
"ds.ordering.by-creation-date" "creation date" "ds.ordering.by-creation-date" "creation date"
"ds.search.placeholder" "Search..." "ds.search.placeholder" "Search..."
"ds.uploaded-at" "Uploaded at %s" "ds.uploaded-at" "Uploaded at %s"
"ds.updated-at" "Updated %s"
"ds.confirm-title" "Are you sure?" "ds.confirm-title" "Are you sure?"
"ds.confirm-ok" "Ok" "ds.confirm-ok" "Ok"
@ -71,10 +73,50 @@
"ds.your-libraries-title" "YOUR LIBRARIES" "ds.your-libraries-title" "YOUR LIBRARIES"
"ds.default-library-title" "Unnamed Collection (%s)" "ds.default-library-title" "Unnamed Collection (%s)"
"ds.element-options" "Element options" "ds.project.placeholder" "New project name"
"ds.draw-tools" "Draw tools" "ds.project.new" "New project"
"ds.sitemap" "Sitemap"
"ds.document-history" "Document history" "ds.radius" "Radius"
"ds.size" "Size"
"ds.width" "Width"
"ds.height" "Height"
"ds.style" "Style"
"ds.none" "None"
"ds.solid" "Solid"
"ds.dotted" "Dotted"
"ds.dashed" "Dashed"
"ds.mixed" "Mixed"
"ds.position" "Position"
"ds.rotation" "Rotation"
"ds.opacity" "Opacity"
"ds.color" "Color"
"ds.background-color" "Background color"
"ds.font-family" "Font family"
"ds.size-weight" "Size and Weight"
"ds.font-size" "Font Size"
"ds.line-height-letter-spacing" "Line height and Letter spacing"
"ds.line-height" "Line height"
"ds.letter-spacing" "Letter spacing"
"ds.text-align" "Text align"
"ds.name" "Name"
"ds.go" "Go go go!"
"ds.accept" "Accept"
"ds.cancel" "Cancel"
"ds.settings.icons" "Icons"
"ds.settings.element-options" "Element options"
"ds.settings.draw-tools" "Draw tools"
"ds.settings.sitemap" "Sitemap"
"ds.settings.layers" "Layers"
"ds.settings.document-history" "Document history"
"ds.page.placeholder" "Page name"
"ds.page.new" "New page"
"ds.page.edit" "Edit page"
"ds.history.versions" "History"
"ds.history.pinned" "Pinned"
"ds.help.rect" "Box (Ctrl + B)" "ds.help.rect" "Box (Ctrl + B)"
"ds.help.circle" "Circle (Ctrl + E)" "ds.help.circle" "Circle (Ctrl + E)"
@ -83,12 +125,43 @@
"ds.help.path" "Path" "ds.help.path" "Path"
"ds.help.curve" "Curve" "ds.help.curve" "Curve"
"ds.help.ruler" "Ruler" "ds.help.ruler" "Ruler"
"ds.help.canvas" "Canvas"
"ds.user.profile" "Profile" "ds.user.profile" "Profile"
"ds.user.password" "Password" "ds.user.password" "Password"
"ds.user.notifications" "Notifications" "ds.user.notifications" "Notifications"
"ds.user.exit" "Exit" "ds.user.exit" "Exit"
"header.sitemap" "Sitemap (Ctrl + Shift + M)"
"header.draw-tools" "Draw tools (Ctrl + Shift + S)"
"header.color-palette" "Color Palette (---)"
"header.icons" "Icons (Ctrl + Shift + I)"
"header.layers" "Layers (Ctrl + Shift + L)"
"header.element-options" "Element options (Ctrl + Shift + O)"
"header.document-history" "History (Ctrl + Shift + H)"
"header.undo" "Undo (Ctrl + Z)"
"header.redo" "Redo (Ctrl + Shift + Z)"
"header.download" "Download (Ctrl + E)"
"header.image" "Image (Ctrl + I)"
"header.rules" "Rules"
"header.grid" "Grid (Ctrl + G)"
"header.grid-snap" "Snap to grid"
"header.align" "Align (Ctrl + A)"
"header.view-mode" "View mode (Ctrl + P)"
"element.measures" "Size, position & rotation"
"element.fill" "Fill"
"element.stroke" "Stroke"
"element.text" "Text"
"element.interactions" "Interactions"
"element.page-measures" "Page settings"
"element.page-grid-options" "Grid settings"
"image.new" "New image"
"image.select" "Select from library"
"image.upload" "Upload file"
"image.import-library" "Import image from library"
"auth.email-or-username" "Email or Username" "auth.email-or-username" "Email or Username"
"auth.password" "Password" "auth.password" "Password"
"auth.signin" "Sign in" "auth.signin" "Sign in"
@ -147,6 +220,7 @@
"settings.update-settings" "Update settings" "settings.update-settings" "Update settings"
"history.alert-message" "You are seeing version %s" "history.alert-message" "You are seeing version %s"
"errors.api.form.old-password-not-match" "Incorrect old password" "errors.api.form.old-password-not-match" "Incorrect old password"
"errors.api.form.registration-disabled" "The registration is currently disabled." "errors.api.form.registration-disabled" "The registration is currently disabled."
"errors.api.form.email-already-exists" "The email is already in use by another user." "errors.api.form.email-already-exists" "The email is already in use by another user."

View file

@ -14,6 +14,7 @@
"%s projets"] "%s projets"]
"ds.project-title" "Vos projets" "ds.project-title" "Vos projets"
"ds.project-new" "+ Nouveau projet" "ds.project-new" "+ Nouveau projet"
"ds.project-thumbnail.alt" "Titre du projet"
"ds.ordering" "Trier par" "ds.ordering" "Trier par"
"ds.ordering.by-name" "nom" "ds.ordering.by-name" "nom"
@ -21,6 +22,7 @@
"ds.ordering.by-creation-date" "date de création" "ds.ordering.by-creation-date" "date de création"
"ds.search.placeholder" "Rechercher..." "ds.search.placeholder" "Rechercher..."
"ds.uploaded-at" "Mise en ligne : %s" "ds.uploaded-at" "Mise en ligne : %s"
"ds.updated-at" "Mis à jour %s"
"ds.confirm-title" "Êtes-vous sûr ?" "ds.confirm-title" "Êtes-vous sûr ?"
"ds.confirm-ok" "Ok" "ds.confirm-ok" "Ok"
@ -71,10 +73,50 @@
"ds.your-libraries-title" "VOS LIBRAIRIES" "ds.your-libraries-title" "VOS LIBRAIRIES"
"ds.default-library-title" "Collection sans nom (%s)" "ds.default-library-title" "Collection sans nom (%s)"
"ds.element-options" "Options d'élément" "ds.project.placeholder" "Nom du nouveau projet"
"ds.draw-tools" "Outils de dessin" "ds.project.new" "Nouveau projet"
"ds.sitemap" "Plan du site"
"ds.document-history" "Historique du document" "ds.radius" "Rayon"
"ds.size" "Taille"
"ds.width" "Largeur"
"ds.height" "Hauteur"
"ds.style" "Style"
"ds.none" "Aucun"
"ds.solid" "Solide"
"ds.dotted" "Pointillé"
"ds.dashed" "Tiré"
"ds.mixed" "Mixte"
"ds.position" "Position"
"ds.rotation" "Rotation"
"ds.opacity" "Opacité"
"ds.color" "Couleur"
"ds.background-color" "Couleur d'arrière-plan"
"ds.font-family" "Police de caractères"
"ds.size-weight" "Taille et graisse"
"ds.font-size" "Taille de police"
"ds.line-height-letter-spacing" "Hauteur de ligne et Espacement de caractères"
"ds.line-height" "Hauteur de ligne"
"ds.letter-spacing" "Espacement de caractères"
"ds.text-align" "Alignement de texte"
"ds.name" "Nom"
"ds.go" "C'est parti !"
"ds.accept" "Accepter"
"ds.cancel" "Annuler"
"ds.settings.icons" "Icônes"
"ds.settings.element-options" "Options d'élément"
"ds.settings.draw-tools" "Outils de dessin"
"ds.settings.sitemap" "Plan du site"
"ds.settings.layers" "Couches"
"ds.settings.document-history" "Historique du document"
"ds.page.placeholder" "Nom de la page"
"ds.page.new" "Nouvelle page"
"ds.page.edit" "Éditer la page"
"ds.history.versions" "Historique"
"ds.history.pinned" "Épinglés"
"ds.help.rect" "Boîte (Ctrl + B)" "ds.help.rect" "Boîte (Ctrl + B)"
"ds.help.circle" "Cercle (Ctrl + E)" "ds.help.circle" "Cercle (Ctrl + E)"
@ -83,12 +125,43 @@
"ds.help.path" "Chemin" "ds.help.path" "Chemin"
"ds.help.curve" "Courbe" "ds.help.curve" "Courbe"
"ds.help.ruler" "Règle" "ds.help.ruler" "Règle"
"ds.help.canvas" "Calque"
"ds.user.profile" "Profil" "ds.user.profile" "Profil"
"ds.user.password" "Mot de passe" "ds.user.password" "Mot de passe"
"ds.user.notifications" "Notifications" "ds.user.notifications" "Notifications"
"ds.user.exit" "Quitter" "ds.user.exit" "Quitter"
"header.sitemap" "Plan du site (Ctrl + Maj + M)"
"header.draw-tools" "Outils de dessin (Ctrl + Maj + S)"
"header.color-palette" "Palette de couleurs (---)"
"header.icons" "Icônes (Ctrl + Maj + I)"
"header.layers" "Couches (Ctrl + Maj + L)"
"header.element-options" "Options d'élément (Ctrl + Maj + O)"
"header.document-history" "Historique du document (Ctrl + Maj + H)"
"header.undo" "Annuler (Ctrl + Z)"
"header.redo" "Rétablir (Ctrl + Maj + Z)"
"header.download" "Télécharger (Ctrl + E)"
"header.image" "Image (Ctrl + I)"
"header.rules" "Règles"
"header.grid" "Grille (Ctrl + G)"
"header.grid-snap" "Coller à la grille"
"header.align" "Aligner (Ctrl + A)"
"header.view-mode" "Mode visualisation (Ctrl + P)"
"element.measures" "Taille, position et rotation"
"element.fill" "Fond"
"element.stroke" "Contour"
"element.text" "Texte"
"element.interactions" "Interactions"
"element.page-measures" "Paramètres de la page"
"element.page-grid-options" "Paramètres de la grille"
"image.new" "Nouvelle image"
"image.select" "Choisir depuis une librairie"
"image.upload" "Envoyer un fichier"
"image.import-library" "Importer une image depuis une librairie"
"auth.email-or-username" "adresse email ou nom d'utilisateur" "auth.email-or-username" "adresse email ou nom d'utilisateur"
"auth.password" "Mot de passe" "auth.password" "Mot de passe"
"auth.signin" "Se connecter" "auth.signin" "Se connecter"
@ -147,6 +220,7 @@
"settings.update-settings" "Mettre à jour les paramètres" "settings.update-settings" "Mettre à jour les paramètres"
"history.alert-message" "Vous voyez la version %s" "history.alert-message" "Vous voyez la version %s"
"errors.api.form.old-password-not-match" "Ancien mot de passe incorrect" "errors.api.form.old-password-not-match" "Ancien mot de passe incorrect"
"errors.api.form.registration-disabled" "L'enregistrement est actuellement désactivé." "errors.api.form.registration-disabled" "L'enregistrement est actuellement désactivé."
"errors.api.form.email-already-exists" "L'email est déjà utilisé par un autre utilisateur." "errors.api.form.email-already-exists" "L'email est déjà utilisé par un autre utilisateur."
@ -169,4 +243,4 @@
"errors.generic" "Quelque chose c'est mal passé." "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."
}) })

View file

@ -116,7 +116,7 @@
[{:keys [project] :as props}] [{:keys [project] :as props}]
[:div.grid-item-th [:div.grid-item-th
[:img.img-th {:src "/images/project-placeholder.svg" [:img.img-th {:src "/images/project-placeholder.svg"
:alt "Project title"}]]) :alt (tr "ds.project-thumbnail.alt")}]])
;; --- Grid Item ;; --- Grid Item
@ -152,7 +152,7 @@
:default-value (:name project)}] :default-value (:name project)}]
[:h3 (:name project)]) [:h3 (:name project)])
[:span.date [:span.date
(str "Updated " (dt/timeago (:modified-at project)))]] (str (tr "ds.updated-at" (dt/timeago (:modified-at project))))]]
[:div.project-th-actions [:div.project-th-actions
[:div.project-th-icon.pages [:div.project-th-icon.pages
i/page i/page

View file

@ -49,7 +49,7 @@
(let [{:keys [data] :as form} (fm/use-form ::project-form defaults)] (let [{:keys [data] :as form} (fm/use-form ::project-form defaults)]
[:form {:on-submit #(on-submit % form)} [:form {:on-submit #(on-submit % form)}
[:input.input-text [:input.input-text
{:placeholder "New project name" {:placeholder (tr "ds.project.placeholder")
:type "text" :type "text"
:name "name" :name "name"
:value (:name data) :value (:name data)
@ -59,9 +59,9 @@
:auto-focus true}] :auto-focus true}]
[:div.project-size [:div.project-size
[:div.input-element.pixels [:div.input-element.pixels
[:span "Width"] [:span (tr "ds.width")]
[:input#project-witdh.input-text [:input#project-witdh.input-text
{:placeholder "Width" {:placeholder (tr "ds.width")
:name "width" :name "width"
:type "number" :type "number"
:min 0 :min 0
@ -72,9 +72,9 @@
:value (:width data)}]] :value (:width data)}]]
[:a.toggle-layout {:on-click #(swap-size % form)} i/toggle] [:a.toggle-layout {:on-click #(swap-size % form)} i/toggle]
[:div.input-element.pixels [:div.input-element.pixels
[:span "Height"] [:span (tr "ds.height")]
[:input#project-height.input-text [:input#project-height.input-text
{:placeholder "Height" {:placeholder (tr "ds.height")
:type "number" :type "number"
:name "height" :name "height"
:min 0 :min 0
@ -86,7 +86,7 @@
;; Submit ;; Submit
[:input#project-btn.btn-primary [:input#project-btn.btn-primary
{:value "Go go go!" {:value (tr "ds.go")
:class (when-not (:valid form) "btn-disabled") :class (when-not (:valid form) "btn-disabled")
:disabled (not (:valid form)) :disabled (not (:valid form))
:type "submit"}]])) :type "submit"}]]))
@ -96,7 +96,7 @@
(mf/defc create-project-dialog (mf/defc create-project-dialog
[props] [props]
[:div.lightbox-body [:div.lightbox-body
[:h3 "New project"] [:h3 (tr "ds.project.new")]
[:& create-project-form] [:& create-project-form]
[:a.close {:on-click modal/hide!} i/close]]) [:a.close {:on-click modal/hide!} i/close]])

View file

@ -22,6 +22,7 @@
[uxbox.main.ui.users :refer [user]] [uxbox.main.ui.users :refer [user]]
[uxbox.main.ui.workspace.clipboard] [uxbox.main.ui.workspace.clipboard]
[uxbox.util.data :refer [index-of]] [uxbox.util.data :refer [index-of]]
[uxbox.util.i18n :refer (tr)]
[uxbox.util.geom.point :as gpt] [uxbox.util.geom.point :as gpt]
[uxbox.util.math :as mth] [uxbox.util.math :as mth]
[uxbox.util.router :as rt])) [uxbox.util.router :as rt]))
@ -53,7 +54,7 @@
[:div.main-icon [:div.main-icon
[:a {:on-click #(st/emit! (rt/nav :dashboard/projects))} i/logo-icon]] [:a {:on-click #(st/emit! (rt/nav :dashboard/projects))} i/logo-icon]]
[:div.project-tree-btn [:div.project-tree-btn
{:alt "Sitemap (Ctrl + Shift + M)" {:alt (tr "header.sitemap")
:class (when (contains? flags :sitemap) "selected") :class (when (contains? flags :sitemap) "selected")
:on-click (partial toggle :sitemap)} :on-click (partial toggle :sitemap)}
i/project-tree i/project-tree
@ -61,76 +62,76 @@
[:div.workspace-options [:div.workspace-options
[:ul.options-btn [:ul.options-btn
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Draw tools (Ctrl + Shift + S)" {:alt (tr "header.draw-tools")
:class (when (contains? flags :drawtools) "selected") :class (when (contains? flags :drawtools) "selected")
:on-click (partial toggle :drawtools)} :on-click (partial toggle :drawtools)}
i/shapes] i/shapes]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Color Palette (---)" {:alt (tr "header.color-palette")
:class (when (contains? flags :colorpalette) "selected") :class (when (contains? flags :colorpalette) "selected")
:on-click (partial toggle :colorpalette)} :on-click (partial toggle :colorpalette)}
i/palette] i/palette]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Icons (Ctrl + Shift + I)" {:alt (tr "header.icons")
:class (when (contains? flags :icons) "selected") :class (when (contains? flags :icons) "selected")
:on-click (partial toggle :icons)} :on-click (partial toggle :icons)}
i/icon-set] i/icon-set]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Layers (Ctrl + Shift + L)" {:alt (tr "header.layers")
:class (when (contains? flags :layers) "selected") :class (when (contains? flags :layers) "selected")
:on-click (partial toggle :layers)} :on-click (partial toggle :layers)}
i/layers] i/layers]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Element options (Ctrl + Shift + O)" {:alt (tr "header.element-options")
:class (when (contains? flags :element-options) "selected") :class (when (contains? flags :element-options) "selected")
:on-click (partial toggle :element-options)} :on-click (partial toggle :element-options)}
i/options] i/options]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "History (Ctrl + Shift + H)" {:alt (tr "header.document-history")
:class (when (contains? flags :document-history) "selected") :class (when (contains? flags :document-history) "selected")
:on-click (partial toggle :document-history)} :on-click (partial toggle :document-history)}
i/undo-history]] i/undo-history]]
[:ul.options-btn [:ul.options-btn
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Undo (Ctrl + Z)" {:alt (tr "header.undo")
:on-click on-undo} :on-click on-undo}
i/undo] i/undo]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Redo (Ctrl + Shift + Z)" {:alt (tr "header.redo")
:on-click on-redo} :on-click on-redo}
i/redo]] i/redo]]
[:ul.options-btn [:ul.options-btn
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Download (Ctrl + E)" {:alt (tr "header.download")
;; :on-click on-download ;; :on-click on-download
} }
i/download] i/download]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Image (Ctrl + I)" {:alt (tr "header.image")
:on-click on-image} :on-click on-image}
i/image]] i/image]]
[:ul.options-btn [:ul.options-btn
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Rules" {:alt (tr "header.rules")
:class (when (contains? flags :rules) "selected") :class (when (contains? flags :rules) "selected")
:on-click (partial toggle :rules)} :on-click (partial toggle :rules)}
i/ruler] i/ruler]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Grid (Ctrl + G)" {:alt (tr "header.grid")
:class (when (contains? flags :grid) "selected") :class (when (contains? flags :grid) "selected")
:on-click (partial toggle :grid)} :on-click (partial toggle :grid)}
i/grid] i/grid]
[:li.tooltip.tooltip-bottom [:li.tooltip.tooltip-bottom
{:alt "Snap to grid" {:alt (tr "header.grid-snap")
:class (when (contains? flags :grid-snap) "selected") :class (when (contains? flags :grid-snap) "selected")
:on-click (partial toggle :grid-snap)} :on-click (partial toggle :grid-snap)}
i/grid-snap]] i/grid-snap]]
;; [:li.tooltip.tooltip-bottom ;; [:li.tooltip.tooltip-bottom
;; {:alt "Align (Ctrl + A)"} ;; {:alt (tr "header.align")}
;; i/alignment]] ;; i/alignment]]
[:ul.options-btn [:ul.options-btn
[:li.tooltip.tooltip-bottom.view-mode [:li.tooltip.tooltip-bottom.view-mode
{:alt "View mode (Ctrl + P)" {:alt (tr "header.view-mode")
:on-click #(st/emit! (dw/->OpenView (:id page))) :on-click #(st/emit! (dw/->OpenView (:id page)))
} }
i/play]] i/play]]

View file

@ -68,16 +68,16 @@
(dom/prevent-default event) (dom/prevent-default event)
(modal/hide!))] (modal/hide!))]
[:div.lightbox-body [:div.lightbox-body
[:h3 "New image"] [:h3 (tr "image.new")]
[:div.row-flex [:div.row-flex
[:div.lightbox-big-btn {:on-click on-select-from-library} [:div.lightbox-big-btn {:on-click on-select-from-library}
[:span.big-svg i/image] [:span.big-svg i/image]
[:span.text "Select from library"]] [:span.text (tr "image.select")]]
[:div.lightbox-big-btn {:on-click on-upload-click} [:div.lightbox-big-btn {:on-click on-upload-click}
(if uploading? (if uploading?
[:span.big-svg.upload i/loader-pencil] [:span.big-svg.upload i/loader-pencil]
[:span.big-svg.upload i/exit]) [:span.big-svg.upload i/exit])
[:span.text "Upload file"] [:span.text (tr "image.upload")]
[:input.upload-image-input [:input.upload-image-input
{:style {:display "none"} {:style {:display "none"}
:accept "image/jpeg,image/png" :accept "image/jpeg,image/png"
@ -138,16 +138,16 @@
:fn #(st/emit! (udi/fetch-images id))}) :fn #(st/emit! (udi/fetch-images id))})
[:div.lightbox-body.big-lightbox [:div.lightbox-body.big-lightbox
[:h3 "Import image from library"] [:h3 (tr "image.import-library")]
[:div.import-img-library [:div.import-img-library
[:div.library-actions [:div.library-actions
[:ul.toggle-library [:ul.toggle-library
[:li.your-images {:class (when own? "current") [:li.your-images {:class (when own? "current")
:on-click #(select-type :own)} :on-click #(select-type :own)}
"YOUR IMAGES"] (tr "ds.your-images-title")]
[:li.standard {:class (when builtin? "current") [:li.standard {:class (when builtin? "current")
:on-click #(select-type :builtin)} :on-click #(select-type :builtin)}
"IMAGES STORE"]] (tr "ds.store-images-title")]]
[:select.input-select {:on-change on-change} [:select.input-select {:on-change on-change}
(when own? (when own?
[:option {:value (pr-str nil)} "Storage"]) [:option {:value (pr-str nil)} "Storage"])

View file

@ -65,7 +65,7 @@
[:div.tool-window.drawing-tools [:div.tool-window.drawing-tools
[:div.tool-window-bar [:div.tool-window-bar
[:div.tool-window-icon i/window] [:div.tool-window-icon i/window]
[:span (tr "ds.draw-tools")] [:span (tr "ds.settings.draw-tools")]
[:div.tool-window-close {:on-click close} i/close]] [:div.tool-window-close {:on-click close} i/close]]
[:div.tool-window-content [:div.tool-window-content
(for [item tools] (for [item tools]

View file

@ -14,7 +14,7 @@
[uxbox.main.data.workspace :as dw] [uxbox.main.data.workspace :as dw]
[uxbox.util.data :refer [read-string]] [uxbox.util.data :refer [read-string]]
[uxbox.util.dom :as dom] [uxbox.util.dom :as dom]
[uxbox.util.i18n :refer [tr]] [uxbox.util.i18n :refer (tr)]
[rumext.alpha :as mf] [rumext.alpha :as mf]
[uxbox.util.router :as r] [uxbox.util.router :as r]
[uxbox.util.time :as dt])) [uxbox.util.time :as dt]))
@ -102,16 +102,16 @@
[:div.document-history.tool-window {} [:div.document-history.tool-window {}
[:div.tool-window-bar {} [:div.tool-window-bar {}
[:div.tool-window-icon {} i/undo-history] [:div.tool-window-icon {} i/undo-history]
[:span {} (tr "ds.document-history")] [:span {} (tr "ds.settings.document-history")]
[:div.tool-window-close {:on-click close} i/close]] [:div.tool-window-close {:on-click close} i/close]]
[:div.tool-window-content {} [:div.tool-window-content {}
[:ul.history-tabs {} [:ul.history-tabs {}
[:li {:on-click show-main [:li {:on-click show-main
:class (when main? "selected")} :class (when main? "selected")}
"History"] (tr "ds.history.versions")]
[:li {:on-click show-pinned [:li {:on-click show-pinned
:class (when pinned? "selected")} :class (when pinned? "selected")}
"Pinned"]] (tr "ds.history.pinned")]]
(if (= section :pinned) (if (= section :pinned)
(history-pinned-list history) (history-pinned-list history)
(history-list history))]]))) (history-list history))]])))
@ -131,5 +131,5 @@
{:class (when (:deselecting history) "hide-message")} {:class (when (:deselecting history) "hide-message")}
[:span {} (tr "history.alert-message" (or version "00")) [:span {} (tr "history.alert-message" (or version "00"))
[:div.message-action {} [:div.message-action {}
[:a.btn-transparent {:on-click on-accept} "Accept"] [:a.btn-transparent {:on-click on-accept} (tr "ds.accept")]
[:a.btn-transparent {:on-click on-cancel} "Cancel"]]]])))) [:a.btn-transparent {:on-click on-cancel} (tr "ds.cancel")]]]]))))

View file

@ -17,7 +17,8 @@
[uxbox.main.ui.shapes.icon :as icon] [uxbox.main.ui.shapes.icon :as icon]
[uxbox.util.data :refer (read-string)] [uxbox.util.data :refer (read-string)]
[uxbox.util.dom :as dom] [uxbox.util.dom :as dom]
[uxbox.util.router :as r])) [uxbox.util.router :as r]
[uxbox.util.i18n :refer (tr)]))
;; --- Refs ;; --- Refs
@ -68,7 +69,7 @@
[:div#form-figures.tool-window [:div#form-figures.tool-window
[:div.tool-window-bar [:div.tool-window-bar
[:div.tool-window-icon i/icon-set] [:div.tool-window-icon i/icon-set]
[:span "Icons"] [:span (tr "ds.settings.icons")]
[:div.tool-window-close {:on-click on-close} i/close]] [:div.tool-window-close {:on-click on-close} i/close]]
[:div.tool-window-content [:div.tool-window-content
[:div.figures-catalog [:div.figures-catalog

View file

@ -18,7 +18,8 @@
[uxbox.main.ui.shapes.icon :as icon] [uxbox.main.ui.shapes.icon :as icon]
[uxbox.main.ui.workspace.sortable :refer [use-sortable]] [uxbox.main.ui.workspace.sortable :refer [use-sortable]]
[uxbox.util.data :refer [classnames]] [uxbox.util.data :refer [classnames]]
[uxbox.util.dom :as dom])) [uxbox.util.dom :as dom]
[uxbox.util.i18n :refer (tr)]))
;; --- Helpers ;; --- Helpers
@ -198,7 +199,7 @@
[:div#layers.tool-window [:div#layers.tool-window
[:div.tool-window-bar [:div.tool-window-bar
[:div.tool-window-icon i/layers] [:div.tool-window-icon i/layers]
[:span "Layers"] [:span (tr "ds.settings.layers")]
[:div.tool-window-close {:on-click on-click} i/close]] [:div.tool-window-close {:on-click on-click} i/close]]
[:& layers-list {:shapes (:shapes page) [:& layers-list {:shapes (:shapes page)
:selected selected}]])) :selected selected}]]))

View file

@ -42,43 +42,43 @@
::page [::page-measures ::page-grid-options]}) ::page [::page-measures ::page-grid-options]})
(def ^:private +menus+ (def ^:private +menus+
[{:name "Size, position & rotation" [{:name "element.measures"
:id ::icon-measures :id ::icon-measures
:icon i/infocard :icon i/infocard
:comp options-iconm/icon-measures-menu} :comp options-iconm/icon-measures-menu}
{:name "Size, position & rotation" {:name "element.measures"
:id ::image-measures :id ::image-measures
:icon i/infocard :icon i/infocard
:comp options-imagem/image-measures-menu} :comp options-imagem/image-measures-menu}
{:name "Size, position & rotation" {:name "element.measures"
:id ::rect-measures :id ::rect-measures
:icon i/infocard :icon i/infocard
:comp options-rectm/rect-measures-menu} :comp options-rectm/rect-measures-menu}
{:name "Size, position & rotation" {:name "element.measures"
:id ::circle-measures :id ::circle-measures
:icon i/infocard :icon i/infocard
:comp options-circlem/circle-measures-menu} :comp options-circlem/circle-measures-menu}
{:name "Fill" {:name "element.fill"
:id ::fill :id ::fill
:icon i/fill :icon i/fill
:comp options-fill/fill-menu} :comp options-fill/fill-menu}
{:name "Stroke" {:name "element.stroke"
:id ::stroke :id ::stroke
:icon i/stroke :icon i/stroke
:comp options-stroke/stroke-menu} :comp options-stroke/stroke-menu}
{:name "Text" {:name "element.text"
:id ::text :id ::text
:icon i/text :icon i/text
:comp options-text/text-menu} :comp options-text/text-menu}
{:name "Interactions" {:name "element.interactions"
:id ::interactions :id ::interactions
:icon i/action :icon i/action
:comp options-interactions/interactions-menu} :comp options-interactions/interactions-menu}
{:name "Page settings" {:name "element.page-measures"
:id ::page-measures :id ::page-measures
:icon i/page :icon i/page
:comp options-page/measures-menu} :comp options-page/measures-menu}
{:name "Grid settings" {:name "element.page-grid-options"
:id ::page-grid-options :id ::page-grid-options
:icon i/grid :icon i/grid
:comp options-page/grid-options-menu}]) :comp options-page/grid-options-menu}])
@ -116,7 +116,7 @@
[:div.elementa-options.tool-window [:div.elementa-options.tool-window
[:div.tool-window-bar [:div.tool-window-bar
[:div.tool-window-icon i/options] [:div.tool-window-icon i/options]
[:span (tr "ds.element-options")] [:span (tr "ds.settings.element-options")]
[:div.tool-window-close {:on-click close} i/close]] [:div.tool-window-close {:on-click close} i/close]]
[:div.tool-window-content [:div.tool-window-content
[:div.element-options [:div.element-options

View file

@ -30,11 +30,11 @@
[:div.element-set-title (:name menu)] [:div.element-set-title (:name menu)]
[:div.element-set-content [:div.element-set-content
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Size"] [:span (tr "ds.size")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
{:placeholder "Width" {:placeholder (tr "ds.width")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:rx shape 0) 2) :value (precision-or-0 (:rx shape 0) 2)
@ -45,13 +45,13 @@
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
{:placeholder "Height" {:placeholder (tr "ds.height")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:ry shape 0) 2) :value (precision-or-0 (:ry shape 0) 2)
:on-change #(on-size-change % shape :ry)}]]] :on-change #(on-size-change % shape :ry)}]]]
[:span "Position"] [:span (tr "ds.position")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
@ -66,7 +66,7 @@
:value (precision-or-0 (:cy shape 0) 2) :value (precision-or-0 (:cy shape 0) 2)
:on-change #(on-position-change % shape :y)}]]] :on-change #(on-position-change % shape :y)}]]]
[:span "Rotation"] [:span (tr "ds.rotation")]
[:div.row-flex [:div.row-flex
[:input.slidebar [:input.slidebar
{:type "range" {:type "range"

View file

@ -42,7 +42,7 @@
[:div.element-set-title (:name menu)] [:div.element-set-title (:name menu)]
[:div.element-set-content [:div.element-set-content
[:span "Color"] [:span (tr "ds.color")]
[:div.row-flex.color-data [:div.row-flex.color-data
[:span.color-th [:span.color-th
{:style {:background-color (:fill-color shape)} {:style {:background-color (:fill-color shape)}
@ -53,7 +53,7 @@
:value (:fill-color shape "")}]]] :value (:fill-color shape "")}]]]
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Opacity"] [:span (tr "ds.opacity")]
[:div.row-flex [:div.row-flex
[:input.slidebar [:input.slidebar
{:type "range" {:type "range"

View file

@ -31,10 +31,10 @@
[:div.element-set-title (:name menu)] [:div.element-set-title (:name menu)]
[:div.element-set-content [:div.element-set-content
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Size"] [:span (tr "ds.size")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text {:placeholder "Width" [:input.input-text {:placeholder (tr "ds.width")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:width size) 2) :value (precision-or-0 (:width size) 2)
@ -44,13 +44,13 @@
(if (:proportion-lock shape) i/lock i/unlock)] (if (:proportion-lock shape) i/lock i/unlock)]
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text {:placeholder "Height" [:input.input-text {:placeholder (tr "ds.height")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:height size) 2) :value (precision-or-0 (:height size) 2)
:on-change #(on-size-change % shape :height)}]]] :on-change #(on-size-change % shape :height)}]]]
[:span "Position"] [:span (tr "ds.position")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
@ -65,7 +65,7 @@
:value (precision-or-0 (:y1 shape 0) 2) :value (precision-or-0 (:y1 shape 0) 2)
:on-change #(on-position-change % shape :y)}]]] :on-change #(on-position-change % shape :y)}]]]
[:span "Rotation"] [:span (tr "ds.rotation")]
[:div.row-flex [:div.row-flex
[:input.slidebar [:input.slidebar
{:type "range" {:type "range"

View file

@ -31,11 +31,11 @@
[:div.element-set-title (:name menu)] [:div.element-set-title (:name menu)]
[:div.element-set-content [:div.element-set-content
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Size"] [:span (tr "ds.size")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
{:placeholder "Width" {:placeholder (tr "ds.width")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:width size) 2) :value (precision-or-0 (:width size) 2)
@ -46,13 +46,13 @@
(if (:proportion-lock shape) i/lock i/unlock)] (if (:proportion-lock shape) i/lock i/unlock)]
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
{:placeholder "Height" {:placeholder (tr "ds.height")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:height size) 2) :value (precision-or-0 (:height size) 2)
:on-change #(on-size-change % shape :height)}]]] :on-change #(on-size-change % shape :height)}]]]
[:span "Position"] [:span (tr "ds.position")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
@ -67,7 +67,7 @@
:value (precision-or-0 (:y1 shape 0) 2) :value (precision-or-0 (:y1 shape 0) 2)
:on-change #(on-position-change % shape :y)}]]] :on-change #(on-position-change % shape :y)}]]]
;; [:span "Rotation"] ;; [:span (tr "ds.rotation")]
;; [:div.row-flex ;; [:div.row-flex
;; [:input.slidebar ;; [:input.slidebar
;; {:type "range" ;; {:type "range"
@ -90,7 +90,7 @@
;; {:style {:visibility "hidden"}}]] ;; {:style {:visibility "hidden"}}]]
[:span "Opacity"] [:span (tr "ds.opacity")]
[:div.row-flex [:div.row-flex
[:input.slidebar [:input.slidebar
{:type "range" {:type "range"

View file

@ -20,6 +20,7 @@
[uxbox.main.ui.workspace.colorpicker :refer [colorpicker-modal]] [uxbox.main.ui.workspace.colorpicker :refer [colorpicker-modal]]
[uxbox.util.data :refer [parse-int]] [uxbox.util.data :refer [parse-int]]
[uxbox.util.dom :as dom] [uxbox.util.dom :as dom]
[uxbox.util.i18n :refer [tr]]
[uxbox.util.spec :refer [color?]])) [uxbox.util.spec :refer [color?]]))
(mf/defc measures-menu (mf/defc measures-menu
@ -57,9 +58,9 @@
(modal/show! colorpicker-modal props)))] (modal/show! colorpicker-modal props)))]
[:div.element-set [:div.element-set
[:div.element-set-title (:name menu)] [:div.element-set-title (tr (:name menu))]
[:div.element-set-content [:div.element-set-content
[:span "Name"] [:span (tr "ds.name")]
[:div.row-flex [:div.row-flex
[:div.input-element [:div.input-element
[:input.input-text [:input.input-text
@ -68,22 +69,22 @@
:value (str (:name page)) :value (str (:name page))
:placeholder "page name"}]]] :placeholder "page name"}]]]
[:span "Size"] [:span (tr "ds.size")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
{:type "number" {:type "number"
:on-change #(on-size-change % :width) :on-change #(on-size-change % :width)
:value (str (:width metadata)) :value (str (:width metadata))
:placeholder "width"}]] :placeholder (tr "ds.width")}]]
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
{:type "number" {:type "number"
:on-change #(on-size-change % :height) :on-change #(on-size-change % :height)
:value (str (:height metadata)) :value (str (:height metadata))
:placeholder "height"}]]] :placeholder (tr "ds.height")}]]]
[:span "Background color"] [:span (tr "ds.background-color")]
[:div.row-flex.color-data [:div.row-flex.color-data
[:span.color-th [:span.color-th
{:style {:background-color (:background metadata)} {:style {:background-color (:background metadata)}
@ -125,9 +126,9 @@
:on-change change-color}] :on-change change-color}]
(modal/show! colorpicker-modal props)))] (modal/show! colorpicker-modal props)))]
[:div.element-set [:div.element-set
[:div.element-set-title (:name menu)] [:div.element-set-title (tr (:name menu))]
[:div.element-set-content [:div.element-set-content
[:span "Size"] [:span (tr "ds.size")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
@ -141,7 +142,7 @@
:value (:grid-y-axis metadata) :value (:grid-y-axis metadata)
:on-change on-y-change :on-change on-y-change
:placeholder "y"}]]] :placeholder "y"}]]]
[:span "Color"] [:span (tr "ds.color")]
[:div.row-flex.color-data [:div.row-flex.color-data
[:span.color-th [:span.color-th
{:style {:background-color (:grid-color metadata)} {:style {:background-color (:grid-color metadata)}

View file

@ -31,10 +31,10 @@
[:div.element-set-title (:name menu)] [:div.element-set-title (:name menu)]
[:div.element-set-content [:div.element-set-content
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Size"] [:span (tr "ds.size")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text {:placeholder "Width" [:input.input-text {:placeholder (tr "ds.width")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:width size) 2) :value (precision-or-0 (:width size) 2)
@ -45,13 +45,13 @@
(if (:proportion-lock shape) i/lock i/unlock)] (if (:proportion-lock shape) i/lock i/unlock)]
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text {:placeholder "Height" [:input.input-text {:placeholder (tr "ds.height")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:height size) 2) :value (precision-or-0 (:height size) 2)
:on-change #(on-size-change % shape :height)}]]] :on-change #(on-size-change % shape :height)}]]]
[:span "Position"] [:span (tr "ds.position")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text {:placeholder "x" [:input.input-text {:placeholder "x"
@ -64,7 +64,7 @@
:value (precision-or-0 (:y1 shape 0) 2) :value (precision-or-0 (:y1 shape 0) 2)
:on-change #(on-position-change % shape :y)}]]] :on-change #(on-position-change % shape :y)}]]]
[:span "Rotation"] [:span (tr "ds.rotation")]
[:div.row-flex [:div.row-flex
[:input.slidebar {:type "range" [:input.slidebar {:type "range"
:min 0 :min 0

View file

@ -39,25 +39,25 @@
[:div.element-set [:div.element-set
[:div.element-set-title (:name menu)] [:div.element-set-title (:name menu)]
[:div.element-set-content [:div.element-set-content
[:span "Style"] [:span (tr "ds.style")]
[:div.row-flex [:div.row-flex
[:select#style.input-select {:placeholder "Style" [:select#style.input-select {:placeholder (tr "ds.style")
:value (pr-str (:stroke-style shape)) :value (pr-str (:stroke-style shape))
:on-change on-stroke-style-change} :on-change on-stroke-style-change}
[:option {:value ":none"} "None"] [:option {:value ":none"} (tr "ds.none")]
[:option {:value ":solid"} "Solid"] [:option {:value ":solid"} (tr "ds.solid")]
[:option {:value ":dotted"} "Dotted"] [:option {:value ":dotted"} (tr "ds.dotted")]
[:option {:value ":dashed"} "Dashed"] [:option {:value ":dashed"} (tr "ds.dashed")]
[:option {:value ":mixed"} "Mixed"]] [:option {:value ":mixed"} (tr "ds.mixed")]]
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
{:placeholder "Width" {:placeholder (tr "ds.width")
:type "number" :type "number"
:min "0" :min "0"
:value (precision-or-0 (:stroke-width shape 1) 2) :value (precision-or-0 (:stroke-width shape 1) 2)
:on-change on-width-change}]]] :on-change on-width-change}]]]
[:span "Color"] [:span (tr "ds.color")]
[:div.row-flex.color-data [:div.row-flex.color-data
[:span.color-th [:span.color-th
{:style {:background-color (:stroke-color shape)} {:style {:background-color (:stroke-color shape)}
@ -67,7 +67,7 @@
{:on-change on-stroke-color-change {:on-change on-stroke-color-change
:value (:stroke-color shape "")}]]] :value (:stroke-color shape "")}]]]
[:span "Radius"] [:span (tr "ds.radius")]
[:div.row-flex [:div.row-flex
[:div.input-element.pixels [:div.input-element.pixels
[:input.input-text [:input.input-text
@ -86,7 +86,7 @@
:value (precision-or-0 (:ry shape 0) 2) :value (precision-or-0 (:ry shape 0) 2)
:on-change on-border-change-ry}]]] :on-change on-border-change-ry}]]]
[:span "Opacity"] [:span (tr "ds.opacity")]
[:div.row-flex [:div.row-flex
[:input.slidebar [:input.slidebar
{:type "range" {:type "range"

View file

@ -75,7 +75,7 @@
[:div.element-set-title (:name menu)] [:div.element-set-title (:name menu)]
[:div.element-set-content [:div.element-set-content
[:span "Font family"] [:span (tr "ds.font-family")]
[:div.row-flex [:div.row-flex
[:select.input-select {:value (pr-str font-family) [:select.input-select {:value (pr-str font-family)
:on-change on-font-family-change} :on-change on-font-family-change}
@ -83,7 +83,7 @@
[:option {:value (pr-str (:id font)) [:option {:value (pr-str (:id font))
:key (:id font)} (:name font)])]] :key (:id font)} (:name font)])]]
[:span "Size and Weight"] [:span (tr "ds.size-weight")]
[:div.row-flex [:div.row-flex
[:div.editable-select [:div.editable-select
[:select.input-select [:select.input-select
@ -102,7 +102,7 @@
[:option {:value "48"} "48"] [:option {:value "48"} "48"]
[:option {:value "72"} "72"]] [:option {:value "72"} "72"]]
[:input.input-text [:input.input-text
{:placeholder "Font Size" {:placeholder (tr "ds.font-size")
:type "number" :type "number"
:min "0" :min "0"
:max "200" :max "200"
@ -115,10 +115,10 @@
[:option {:value (pr-str data) [:option {:value (pr-str data)
:key (:name style)} (:name style)])]] :key (:name style)} (:name style)])]]
[:span "Line height and Letter spacing"] [:span (tr "ds.line-height-letter-spacing")]
[:div.row-flex [:div.row-flex
[:input.input-text [:input.input-text
{:placeholder "Line height" {:placeholder (tr "ds.line-height")
:type "number" :type "number"
:step "0.1" :step "0.1"
:min "0" :min "0"
@ -126,7 +126,7 @@
:value (precision-or-0 line-height 2) :value (precision-or-0 line-height 2)
:on-change on-font-line-height-change}] :on-change on-font-line-height-change}]
[:input.input-text [:input.input-text
{:placeholder "Letter spacing" {:placeholder (tr "ds.letter-spacing")
:type "number" :type "number"
:step "0.1" :step "0.1"
:min "0" :min "0"
@ -134,7 +134,7 @@
:value (precision-or-0 letter-spacing 2) :value (precision-or-0 letter-spacing 2)
:on-change on-font-letter-spacing-change}]] :on-change on-font-letter-spacing-change}]]
[:span "Text align"] [:span (tr "ds.text-align")]
[:div.row-flex.align-icons [:div.row-flex.align-icons
[:span {:class (when (= text-align "left") "current") [:span {:class (when (= text-align "left") "current")
:on-click #(on-font-align-change % "left")} :on-click #(on-font-align-change % "left")}

View file

@ -101,7 +101,7 @@
[:div.sitemap.tool-window [:div.sitemap.tool-window
[:div.tool-window-bar [:div.tool-window-bar
[:div.tool-window-icon i/project-tree] [:div.tool-window-icon i/project-tree]
[:span (tr "ds.sitemap")] [:span (tr "ds.settings.sitemap")]
[:div.tool-window-close {:on-click close} i/close]] [:div.tool-window-close {:on-click close} i/close]]
[:div.tool-window-content [:div.tool-window-content
[:div.project-title [:div.project-title

View file

@ -63,7 +63,7 @@
(let [{:keys [data] :as form} (fm/use-form ::page-form #(initial-data page))] (let [{:keys [data] :as form} (fm/use-form ::page-form #(initial-data page))]
[:form {:on-submit #(on-submit % form)} [:form {:on-submit #(on-submit % form)}
[:input.input-text [:input.input-text
{:placeholder "Page name" {:placeholder (tr "ds.page.placeholder")
:type "text" :type "text"
:name "name" :name "name"
:class (fm/error-class form :name) :class (fm/error-class form :name)
@ -73,9 +73,9 @@
:auto-focus true}] :auto-focus true}]
[:div.project-size [:div.project-size
[:div.input-element.pixels [:div.input-element.pixels
[:span "Width"] [:span (tr "ds.width")]
[:input#project-witdh.input-text [:input#project-witdh.input-text
{:placeholder "Width" {:placeholder (tr "ds.width")
:name "width" :name "width"
:type "number" :type "number"
:min 0 :min 0
@ -86,9 +86,9 @@
:value (:width data)}]] :value (:width data)}]]
[:a.toggle-layout {:on-click #(swap-size % form)} i/toggle] [:a.toggle-layout {:on-click #(swap-size % form)} i/toggle]
[:div.input-element.pixels [:div.input-element.pixels
[:span "Height"] [:span (tr "ds.height")]
[:input#project-height.input-text [:input#project-height.input-text
{:placeholder "Height" {:placeholder (tr "ds.height")
:name "height" :name "height"
:type "number" :type "number"
:min 0 :min 0
@ -98,7 +98,7 @@
:on-change (fm/on-input-change form :height) :on-change (fm/on-input-change form :height)
:value (:height data)}]]] :value (:height data)}]]]
[:input.btn-primary [:input.btn-primary
{:value "Go go go!" {:value (tr "ds.go")
:type "submit" :type "submit"
:class (when-not (:valid form) "btn-disabled") :class (when-not (:valid form) "btn-disabled")
:disabled (not (:valid form))}]])) :disabled (not (:valid form))}]]))
@ -107,8 +107,8 @@
[{:keys [page] :as props}] [{:keys [page] :as props}]
[:div.lightbox-body [:div.lightbox-body
(if (nil? (:id page)) (if (nil? (:id page))
[:h3 "New page"] [:h3 (tr "ds.page.new")]
[:h3 "Edit page"]) [:h3 (tr "ds.page.edit")])
[:& page-form {:page page}] [:& page-form {:page page}]
[:a.close {:on-click modal/hide!} i/close]]) [:a.close {:on-click modal/hide!} i/close]])

View file

@ -15,7 +15,8 @@
[uxbox.builtins.icons :as i] [uxbox.builtins.icons :as i]
[uxbox.util.data :refer [classnames]] [uxbox.util.data :refer [classnames]]
[uxbox.util.dom :as dom] [uxbox.util.dom :as dom]
[uxbox.util.timers :as ts])) [uxbox.util.timers :as ts]
[uxbox.util.i18n :refer [tr]]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Data Events ;; Data Events
@ -131,10 +132,10 @@
[:div.message-action [:div.message-action
[:a.btn-transparent.btn-small [:a.btn-transparent.btn-small
{:on-click accept} {:on-click accept}
"Accept"] (tr "ds.accept")]
[:a.btn-transparent.btn-small [:a.btn-transparent.btn-small
{:on-click cancel} {:on-click cancel}
"Cancel"]]]]))) (tr "ds.cancel")]]]])))
;; --- Main Component (entry point) ;; --- Main Component (entry point)