Merge branch 'i18n/main' into i18n/multicanvas

This commit is contained in:
mathieu.brunot 2019-09-14 12:42:33 +02:00
commit 245d2a5ee4
No known key found for this signature in database
GPG key ID: C438ED0898C9E020
13 changed files with 109 additions and 57 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

@ -76,8 +76,29 @@
"ds.project.placeholder" "New project name" "ds.project.placeholder" "New project name"
"ds.project.new" "New project" "ds.project.new" "New project"
"ds.radius" "Radius"
"ds.size" "Size"
"ds.width" "Width" "ds.width" "Width"
"ds.height" "Height" "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.go" "Go go go!"
"ds.accept" "Accept" "ds.accept" "Accept"
@ -136,6 +157,11 @@
"element.page-measures" "Page settings" "element.page-measures" "Page settings"
"element.page-grid-options" "Grid 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"

View file

@ -76,8 +76,29 @@
"ds.project.placeholder" "Nom du nouveau projet" "ds.project.placeholder" "Nom du nouveau projet"
"ds.project.new" "Nouveau projet" "ds.project.new" "Nouveau projet"
"ds.radius" "Rayon"
"ds.size" "Taille"
"ds.width" "Largeur" "ds.width" "Largeur"
"ds.height" "Hauteur" "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.go" "C'est parti !"
"ds.accept" "Accepter" "ds.accept" "Accepter"
@ -136,6 +157,11 @@
"element.page-measures" "Paramètres de la page" "element.page-measures" "Paramètres de la page"
"element.page-grid-options" "Paramètres de la grille" "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"

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

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

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

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

@ -60,7 +60,7 @@
[: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 "Name"] [:span (tr "ds.name")]
[:div.row-flex [:div.row-flex
[:div.input-element [:div.input-element
[:input.input-text [:input.input-text
@ -69,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)}
@ -128,7 +128,7 @@
[: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 "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
@ -142,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")}