0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-11 01:28:30 -05:00

🌐 Merge i18n for projects and sitemap

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
mathieu.brunot 2019-09-13 02:12:08 +02:00
parent d8afb97c7a
commit 7536241be0
No known key found for this signature in database
GPG key ID: C438ED0898C9E020
2 changed files with 15 additions and 15 deletions

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

@ -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]])