🌐 Project, sitemap and layers i18n

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
mathieu.brunot 2019-08-10 20:52:41 +02:00
parent 775166f5f2
commit 1d5bfd33d4
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
5 changed files with 48 additions and 17 deletions

View file

@ -71,11 +71,26 @@
"ds.your-libraries-title" "YOUR LIBRARIES"
"ds.default-library-title" "Unnamed Collection (%s)"
"ds.project.placeholder" "New project name"
"ds.project.new" "New project"
"ds.width" "Width"
"ds.height" "Height"
"ds.go" "Go go go!"
"ds.element-options" "Element options"
"ds.draw-tools" "Draw tools"
"ds.sitemap" "Sitemap"
"ds.layers" "Layers"
"ds.document-history" "Document history"
"ds.project.placeholder" "New project name"
"ds.project.new" "New project"
"ds.page.placeholder" "Page name"
"ds.page.new" "New page"
"ds.page.edit" "Edit page"
"ds.help.rect" "Box (Ctrl + B)"
"ds.help.circle" "Circle (Ctrl + E)"
"ds.help.line" "Line (Ctrl + L)"

View file

@ -71,11 +71,26 @@
"ds.your-libraries-title" "VOS LIBRAIRIES"
"ds.default-library-title" "Collection sans nom (%s)"
"ds.project.placeholder" "Nom du nouveau projet"
"ds.project.new" "Nouveau projet"
"ds.width" "Largeur"
"ds.height" "Hauteur"
"ds.go" "Go go go!"
"ds.element-options" "Options d'élément"
"ds.draw-tools" "Outils de dessin"
"ds.sitemap" "Plan du site"
"ds.layers" "Couches"
"ds.document-history" "Historique du document"
"ds.project.placeholder" "New project name"
"ds.project.new" "New project"
"ds.page.placeholder" "Page name"
"ds.page.new" "New page"
"ds.page.edit" "Edit page"
"ds.help.rect" "Boîte (Ctrl + B)"
"ds.help.circle" "Cercle (Ctrl + E)"
"ds.help.line" "Ligne (Ctrl + L)"

View file

@ -93,16 +93,16 @@
(assoc-value :height (:width data))))]
[:form {:on-submit on-submit}
[:input#project-name.input-text
{:placeholder "New project name"
{:placeholder (tr "ds.project.placeholder")
:type "text"
:value (:name data)
:auto-focus true
:on-change update-name}]
[:div.project-size
[:div.input-element.pixels
[:span "Width"]
[:span (tr "ds.width")]
[:input#project-witdh.input-text
{:placeholder "Width"
{:placeholder (tr "ds.width")
:type "number"
:min 0 ;;TODO check this value
:max 666666 ;;TODO check this value
@ -110,9 +110,9 @@
:on-change (partial update-size :width)}]]
[:a.toggle-layout {:on-click swap-size} i/toggle]
[:div.input-element.pixels
[:span "Height"]
[:span (tr "ds.height")]
[:input#project-height.input-text
{:placeholder "Height"
{:placeholder (tr "ds.height")
:type "number"
:min 0 ;;TODO check this value
:max 666666 ;;TODO check this value
@ -124,7 +124,7 @@
;; Submit
[:input#project-btn.btn-primary
{:value "Go go go!"
{:value (tr "ds.go")
:class (when-not valid? "btn-disabled")
:disabled (not valid?)
:type "submit"}]]))))
@ -140,7 +140,7 @@
:render
(fn [own]
[:div.lightbox-body
[:h3 "New project"]
[:h3 (tr "ds.project.new")]
(create-project-form)
[:a.close {:on-click #(st/emit! (udl/close-lightbox))}
i/close]]))

View file

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

View file

@ -88,16 +88,16 @@
(st/emit! (udp/persist-page-update-form id data))))]
[:form
[:input#project-name.input-text
{:placeholder "Page name"
{:placeholder (tr "ds.page.placeholder")
:type "text"
:value (:name data "")
:auto-focus true
:on-change update-name}]
[:div.project-size
[:div.input-element.pixels
[:span "Width"]
[:span (tr "ds.width")]
[:input#project-witdh.input-text
{:placeholder "Width"
{:placeholder (tr "ds.width")
:type "number"
:min 0
:max 4000
@ -105,9 +105,9 @@
:on-change #(update-size :width %)}]]
[:a.toggle-layout {:on-click toggle-sizes} i/toggle]
[:div.input-element.pixels
[:span "Height"]
[:span (tr "ds.height")]
[:input#project-height.input-text
{:placeholder "Height"
{:placeholder (tr "ds.height")
:type "number"
:min 0
:max 4000
@ -121,7 +121,7 @@
(layout-input data "desktop")]
[:input#project-btn.btn-primary
{:value "Go go go!"
{:value (tr "ds.go")
:disabled (not valid?)
:on-click on-save
:type "button"}]])))
@ -135,8 +135,8 @@
(let [creation? (nil? id)]
[:div.lightbox-body
(if creation?
[:h3 "New page"]
[:h3 "Edit page"])
[:h3 (tr "ds.page.new")]
[:h3 (tr "ds.page.edit")])
(page-form page)
[:a.close {:on-click on-cancel} i/close]])))