Merge branch 'i18n/main' of github.com:Monogramm/uxbox into i18n/main

This commit is contained in:
mathieu.brunot 2019-09-12 16:49:07 +02:00
commit 0e8da8e39b
No known key found for this signature in database
GPG key ID: C438ED0898C9E020
15 changed files with 170 additions and 71 deletions

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,29 @@
"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.width" "Width"
"ds.height" "Height"
"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)"
@ -89,6 +110,31 @@
"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"
"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 +193,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,29 @@
"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.width" "Largeur"
"ds.height" "Hauteur"
"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)"
@ -89,6 +110,31 @@
"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" "Snap to grid"
"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"
"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 +193,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 +216,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

@ -134,7 +134,7 @@
{:style {:background-image (str "url('" @url "')")}}] {:style {:background-image (str "url('" @url "')")}}]
[: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")}]])))
@ -172,7 +172,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

@ -93,16 +93,16 @@
(assoc-value :height (:width data))))] (assoc-value :height (:width data))))]
[:form {:on-submit on-submit} [:form {:on-submit on-submit}
[:input#project-name.input-text [:input#project-name.input-text
{:placeholder "New project name" {:placeholder (tr "ds.project.placeholder")
:type "text" :type "text"
:value (:name data) :value (:name data)
:auto-focus true :auto-focus true
:on-change update-name}] :on-change update-name}]
[: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")
:type "number" :type "number"
:min 0 ;;TODO check this value :min 0 ;;TODO check this value
:max 666666 ;;TODO check this value :max 666666 ;;TODO check this value
@ -110,9 +110,9 @@
:on-change (partial update-size :width)}]] :on-change (partial update-size :width)}]]
[:a.toggle-layout {:on-click swap-size} i/toggle] [:a.toggle-layout {:on-click swap-size} 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"
:min 0 ;;TODO check this value :min 0 ;;TODO check this value
:max 666666 ;;TODO check this value :max 666666 ;;TODO check this value
@ -124,7 +124,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? "btn-disabled") :class (when-not valid? "btn-disabled")
:disabled (not valid?) :disabled (not valid?)
:type "submit"}]])))) :type "submit"}]]))))
@ -140,7 +140,7 @@
:render :render
(fn [own] (fn [own]
[:div.lightbox-body [:div.lightbox-body
[:h3 "New project"] [:h3 (tr "ds.project.new")]
(create-project-form) (create-project-form)
[:a.close {:on-click #(st/emit! (udl/close-lightbox))} [:a.close {:on-click #(st/emit! (udl/close-lightbox))}
i/close]])) 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]))
@ -54,7 +55,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
@ -62,76 +63,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

@ -93,7 +93,7 @@
[:div#form-tools.tool-window.drawing-tools [:div#form-tools.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 [[i props] (map-indexed vector tools)] (for [[i props] (map-indexed vector 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

@ -18,7 +18,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
@ -69,7 +70,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

@ -19,7 +19,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
@ -170,7 +171,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

@ -28,7 +28,7 @@
[uxbox.main.ui.workspace.sidebar.options.text :as options-text] [uxbox.main.ui.workspace.sidebar.options.text :as options-text]
[uxbox.util.data :as data] [uxbox.util.data :as data]
[uxbox.util.dom :as dom] [uxbox.util.dom :as dom]
[uxbox.util.i18n :refer [tr]])) [uxbox.util.i18n :refer (tr)]))
;; --- Constants ;; --- Constants
@ -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 (tr "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 (tr "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 (tr "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 (tr "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 (tr "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 (tr "element.fill")
:id ::stroke :id ::stroke
:icon i/stroke :icon i/stroke
:comp options-stroke/stroke-menu} :comp options-stroke/stroke-menu}
{:name "Text" {:name (tr "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 (tr "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 (tr "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 (tr "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

@ -15,7 +15,7 @@
[uxbox.main.ui.workspace.colorpicker :refer [colorpicker-modal]] [uxbox.main.ui.workspace.colorpicker :refer [colorpicker-modal]]
[uxbox.util.data :refer [parse-float]] [uxbox.util.data :refer [parse-float]]
[uxbox.util.dom :as dom] [uxbox.util.dom :as dom]
[uxbox.util.i18n :refer [tr]])) [uxbox.util.i18n :refer (tr)]))
(mf/defc fill-menu (mf/defc fill-menu
[{:keys [menu shape]}] [{:keys [menu shape]}]

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

View file

@ -106,7 +106,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

@ -17,7 +17,7 @@
[uxbox.util.data :refer [parse-int]] [uxbox.util.data :refer [parse-int]]
[uxbox.util.dom :as dom] [uxbox.util.dom :as dom]
[uxbox.util.forms :as fm] [uxbox.util.forms :as fm]
[uxbox.util.i18n :refer [tr]] [uxbox.util.i18n :refer (tr)]
[uxbox.util.router :as r] [uxbox.util.router :as r]
[rumext.core :as mx :include-macros true])) [rumext.core :as mx :include-macros true]))
@ -88,16 +88,16 @@
(st/emit! (udp/persist-page-update-form id data))))] (st/emit! (udp/persist-page-update-form id data))))]
[:form [:form
[:input#project-name.input-text [:input#project-name.input-text
{:placeholder "Page name" {:placeholder (tr "ds.page.placeholder")
:type "text" :type "text"
:value (:name data "") :value (:name data "")
:auto-focus true :auto-focus true
:on-change update-name}] :on-change update-name}]
[: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")
:type "number" :type "number"
:min 0 :min 0
:max 4000 :max 4000
@ -105,9 +105,9 @@
:on-change #(update-size :width %)}]] :on-change #(update-size :width %)}]]
[:a.toggle-layout {:on-click toggle-sizes} i/toggle] [:a.toggle-layout {:on-click toggle-sizes} 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"
:min 0 :min 0
:max 4000 :max 4000
@ -121,7 +121,7 @@
(layout-input data "desktop")] (layout-input data "desktop")]
[:input#project-btn.btn-primary [:input#project-btn.btn-primary
{:value "Go go go!" {:value (tr "ds.go")
:disabled (not valid?) :disabled (not valid?)
:on-click on-save :on-click on-save
:type "button"}]]))) :type "button"}]])))
@ -135,8 +135,8 @@
(let [creation? (nil? id)] (let [creation? (nil? id)]
[:div.lightbox-body [:div.lightbox-body
(if creation? (if creation?
[:h3 "New page"] [:h3 (tr "ds.page.new")]
[:h3 "Edit page"]) [:h3 (tr "ds.page.edit")])
(page-form page) (page-form page)
[:a.close {:on-click on-cancel} i/close]]))) [:a.close {:on-click on-cancel} i/close]])))

View file

@ -14,7 +14,8 @@
[uxbox.util.timers :as ts] [uxbox.util.timers :as ts]
[rumext.core :as mx :include-macros true] [rumext.core :as mx :include-macros true]
[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]]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Data Events ;; Data Events
@ -135,10 +136,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)