From 8da93f90b6046edb2fc7389a45080026a4ff9252 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 11:59:33 +0200 Subject: [PATCH 1/3] :globe_with_meridians: Image popup i18n Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 5 +++++ frontend/src/uxbox/main/locales/fr.cljs | 5 +++++ frontend/src/uxbox/main/ui/workspace/images.cljs | 12 ++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index bb801b2d0..0a32c450e 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -135,6 +135,11 @@ "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.password" "Password" "auth.signin" "Sign in" diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index d73cfc22d..32e890b3b 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -135,6 +135,11 @@ "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.password" "Mot de passe" "auth.signin" "Se connecter" diff --git a/frontend/src/uxbox/main/ui/workspace/images.cljs b/frontend/src/uxbox/main/ui/workspace/images.cljs index e9fcdfdef..80721778b 100644 --- a/frontend/src/uxbox/main/ui/workspace/images.cljs +++ b/frontend/src/uxbox/main/ui/workspace/images.cljs @@ -70,16 +70,16 @@ (dom/prevent-default event) (modal/hide!))] [:div.lightbox-body - [:h3 "New image"] + [:h3 (tr "image.new")] [:div.row-flex [:div.lightbox-big-btn {:on-click on-select-from-library} [:span.big-svg i/image] - [:span.text "Select from library"]] + [:span.text (tr "image.select")]] [:div.lightbox-big-btn {:on-click on-upload-click} (if uploading? [:span.big-svg.upload i/loader-pencil] [:span.big-svg.upload i/exit]) - [:span.text "Upload file"] + [:span.text (tr "image.upload")] [:input.upload-image-input {:style {:display "none"} :accept "image/jpeg,image/png" @@ -142,16 +142,16 @@ :fn #(st/emit! (udi/fetch-images id))}) [:div.lightbox-body.big-lightbox - [:h3 "Import image from library"] + [:h3 (tr "image.import-library")] [:div.import-img-library [:div.library-actions [:ul.toggle-library [:li.your-images {:class (when own? "current") :on-click #(select-type :own)} - "YOUR IMAGES"] + (tr "ds.your-images-title")] [:li.standard {:class (when builtin? "current") :on-click #(select-type :builtin)} - "IMAGES STORE"]] + (tr "ds.store-images-title")]] [:select.input-select {:on-change on-change} (when own? [:option {:value (pr-str nil)} "Storage"]) From 87a37ca8c11a6079173ca76104ac444f92f4b07b Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 11:22:59 +0200 Subject: [PATCH 2/3] :wrench: Sample allow all CORS origin for compose Signed-off-by: mathieu.brunot --- docker/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 99652570e..34d87123d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -41,10 +41,10 @@ services: - backend_m2:/root/.m2 # - /etc/localtime:/etc/localtime:ro # - /etc/timezone:/etc/timezone:ro - environment: # HTTP setup - UXBOX_HTTP_SERVER_DEBUG=false + - UXBOX_HTTP_SERVER_CORS=* - UXBOX_MEDIA_URI="/media/" - UXBOX_ASSETS_URI="/static/" - UXBOX_MEDIA_DIRECTORY="data/media" From b6232b73cf2e715e721560839da7e48091b84aff Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sat, 14 Sep 2019 12:41:33 +0200 Subject: [PATCH 3/3] :globe_with_meridians: Sidebar options i18n Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 21 ++++++++++++++++++ frontend/src/uxbox/main/locales/fr.cljs | 21 ++++++++++++++++++ .../main/ui/workspace/sidebar/options.cljs | 2 +- .../sidebar/options/circle_measures.cljs | 10 ++++----- .../ui/workspace/sidebar/options/fill.cljs | 6 ++--- .../sidebar/options/icon_measures.cljs | 10 ++++----- .../sidebar/options/image_measures.cljs | 12 +++++----- .../ui/workspace/sidebar/options/page.cljs | 14 ++++++------ .../sidebar/options/rect_measures.cljs | 10 ++++----- .../ui/workspace/sidebar/options/stroke.cljs | 22 +++++++++---------- .../ui/workspace/sidebar/options/text.cljs | 14 ++++++------ 11 files changed, 92 insertions(+), 50 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index 0a32c450e..7179958d5 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -76,8 +76,29 @@ "ds.project.placeholder" "New project name" "ds.project.new" "New project" + "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" diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index 32e890b3b..da61a5577 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -76,8 +76,29 @@ "ds.project.placeholder" "Nom du nouveau projet" "ds.project.new" "Nouveau projet" + "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" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs index 1c9079281..d8adb1e58 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs @@ -28,7 +28,7 @@ [uxbox.main.ui.workspace.sidebar.options.text :as options-text] [uxbox.util.data :as data] [uxbox.util.dom :as dom] - [uxbox.util.i18n :refer (tr)])) + [uxbox.util.i18n :refer [tr]])) ;; --- Constants diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/circle_measures.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/circle_measures.cljs index 2467cf193..035c9a108 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/circle_measures.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/circle_measures.cljs @@ -30,11 +30,11 @@ [:div.element-set-title (:name menu)] [:div.element-set-content ;; SLIDEBAR FOR ROTATION AND OPACITY - [:span "Size"] + [:span (tr "ds.size")] [:div.row-flex [:div.input-element.pixels [:input.input-text - {:placeholder "Width" + {:placeholder (tr "ds.width") :type "number" :min "0" :value (precision-or-0 (:rx shape 0) 2) @@ -45,13 +45,13 @@ [:div.input-element.pixels [:input.input-text - {:placeholder "Height" + {:placeholder (tr "ds.height") :type "number" :min "0" :value (precision-or-0 (:ry shape 0) 2) :on-change #(on-size-change % shape :ry)}]]] - [:span "Position"] + [:span (tr "ds.position")] [:div.row-flex [:div.input-element.pixels [:input.input-text @@ -66,7 +66,7 @@ :value (precision-or-0 (:cy shape 0) 2) :on-change #(on-position-change % shape :y)}]]] - [:span "Rotation"] + [:span (tr "ds.rotation")] [:div.row-flex [:input.slidebar {:type "range" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs index b2b7dc590..488302d4a 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs @@ -15,7 +15,7 @@ [uxbox.main.ui.workspace.colorpicker :refer [colorpicker-modal]] [uxbox.util.data :refer [parse-float]] [uxbox.util.dom :as dom] - [uxbox.util.i18n :refer (tr)])) + [uxbox.util.i18n :refer [tr]])) (mf/defc fill-menu [{:keys [menu shape]}] @@ -42,7 +42,7 @@ [:div.element-set-title (:name menu)] [:div.element-set-content - [:span "Color"] + [:span (tr "ds.color")] [:div.row-flex.color-data [:span.color-th {:style {:background-color (:fill-color shape)} @@ -53,7 +53,7 @@ :value (:fill-color shape "")}]]] ;; SLIDEBAR FOR ROTATION AND OPACITY - [:span "Opacity"] + [:span (tr "ds.opacity")] [:div.row-flex [:input.slidebar {:type "range" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/icon_measures.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/icon_measures.cljs index 7e7306f72..46afbb0ae 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/icon_measures.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/icon_measures.cljs @@ -31,10 +31,10 @@ [:div.element-set-title (:name menu)] [:div.element-set-content ;; SLIDEBAR FOR ROTATION AND OPACITY - [:span "Size"] + [:span (tr "ds.size")] [:div.row-flex [:div.input-element.pixels - [:input.input-text {:placeholder "Width" + [:input.input-text {:placeholder (tr "ds.width") :type "number" :min "0" :value (precision-or-0 (:width size) 2) @@ -44,13 +44,13 @@ (if (:proportion-lock shape) i/lock i/unlock)] [:div.input-element.pixels - [:input.input-text {:placeholder "Height" + [:input.input-text {:placeholder (tr "ds.height") :type "number" :min "0" :value (precision-or-0 (:height size) 2) :on-change #(on-size-change % shape :height)}]]] - [:span "Position"] + [:span (tr "ds.position")] [:div.row-flex [:div.input-element.pixels [:input.input-text @@ -65,7 +65,7 @@ :value (precision-or-0 (:y1 shape 0) 2) :on-change #(on-position-change % shape :y)}]]] - [:span "Rotation"] + [:span (tr "ds.rotation")] [:div.row-flex [:input.slidebar {:type "range" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/image_measures.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/image_measures.cljs index 6116b18d5..5eeefbc53 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/image_measures.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/image_measures.cljs @@ -32,11 +32,11 @@ [:div.element-set-title (:name menu)] [:div.element-set-content ;; SLIDEBAR FOR ROTATION AND OPACITY - [:span "Size"] + [:span (tr "ds.size")] [:div.row-flex [:div.input-element.pixels [:input.input-text - {:placeholder "Width" + {:placeholder (tr "ds.width") :type "number" :min "0" :value (precision-or-0 (:width size) 2) @@ -47,13 +47,13 @@ (if (:proportion-lock shape) i/lock i/unlock)] [:div.input-element.pixels [:input.input-text - {:placeholder "Height" + {:placeholder (tr "ds.height") :type "number" :min "0" :value (precision-or-0 (:height size) 2) :on-change #(on-size-change % shape :height)}]]] - [:span "Position"] + [:span (tr "ds.position")] [:div.row-flex [:div.input-element.pixels [:input.input-text @@ -68,7 +68,7 @@ :value (precision-or-0 (:y1 shape 0) 2) :on-change #(on-position-change % shape :y)}]]] - ;; [:span "Rotation"] + ;; [:span (tr "ds.rotation")] ;; [:div.row-flex ;; [:input.slidebar ;; {:type "range" @@ -91,7 +91,7 @@ ;; {:style {:visibility "hidden"}}]] - [:span "Opacity"] + [:span (tr "ds.opacity")] [:div.row-flex [:input.slidebar {:type "range" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs index 9815e2202..27d5b3819 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs @@ -60,7 +60,7 @@ [:div.element-set [:div.element-set-title (:name menu)] [:div.element-set-content - [:span "Name"] + [:span (tr "ds.name")] [:div.row-flex [:div.input-element [:input.input-text @@ -69,22 +69,22 @@ :value (str (:name page)) :placeholder "page name"}]]] - [:span "Size"] + [:span (tr "ds.size")] [:div.row-flex [:div.input-element.pixels [:input.input-text {:type "number" :on-change #(on-size-change % :width) :value (str (:width metadata)) - :placeholder "width"}]] + :placeholder (tr "ds.width")}]] [:div.input-element.pixels [:input.input-text {:type "number" :on-change #(on-size-change % :height) :value (str (:height metadata)) - :placeholder "height"}]]] + :placeholder (tr "ds.height")}]]] - [:span "Background color"] + [:span (tr "ds.background-color")] [:div.row-flex.color-data [:span.color-th {:style {:background-color (:background metadata)} @@ -128,7 +128,7 @@ [:div.element-set [:div.element-set-title (:name menu)] [:div.element-set-content - [:span "Size"] + [:span (tr "ds.size")] [:div.row-flex [:div.input-element.pixels [:input.input-text @@ -142,7 +142,7 @@ :value (:grid-y-axis metadata) :on-change on-y-change :placeholder "y"}]]] - [:span "Color"] + [:span (tr "ds.color")] [:div.row-flex.color-data [:span.color-th {:style {:background-color (:grid-color metadata)} diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/rect_measures.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/rect_measures.cljs index 711e11b8a..8a541c5b0 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/rect_measures.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/rect_measures.cljs @@ -31,10 +31,10 @@ [:div.element-set-title (:name menu)] [:div.element-set-content ;; SLIDEBAR FOR ROTATION AND OPACITY - [:span "Size"] + [:span (tr "ds.size")] [:div.row-flex [:div.input-element.pixels - [:input.input-text {:placeholder "Width" + [:input.input-text {:placeholder (tr "ds.width") :type "number" :min "0" :value (precision-or-0 (:width size) 2) @@ -45,13 +45,13 @@ (if (:proportion-lock shape) i/lock i/unlock)] [:div.input-element.pixels - [:input.input-text {:placeholder "Height" + [:input.input-text {:placeholder (tr "ds.height") :type "number" :min "0" :value (precision-or-0 (:height size) 2) :on-change #(on-size-change % shape :height)}]]] - [:span "Position"] + [:span (tr "ds.position")] [:div.row-flex [:div.input-element.pixels [:input.input-text {:placeholder "x" @@ -64,7 +64,7 @@ :value (precision-or-0 (:y1 shape 0) 2) :on-change #(on-position-change % shape :y)}]]] - [:span "Rotation"] + [:span (tr "ds.rotation")] [:div.row-flex [:input.slidebar {:type "range" :min 0 diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs index 410422631..d957dd15b 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs @@ -39,25 +39,25 @@ [:div.element-set [:div.element-set-title (:name menu)] [:div.element-set-content - [:span "Style"] + [:span (tr "ds.style")] [:div.row-flex - [:select#style.input-select {:placeholder "Style" + [:select#style.input-select {:placeholder (tr "ds.style") :value (pr-str (:stroke-style shape)) :on-change on-stroke-style-change} - [:option {:value ":none"} "None"] - [:option {:value ":solid"} "Solid"] - [:option {:value ":dotted"} "Dotted"] - [:option {:value ":dashed"} "Dashed"] - [:option {:value ":mixed"} "Mixed"]] + [:option {:value ":none"} (tr "ds.none")] + [:option {:value ":solid"} (tr "ds.solid")] + [:option {:value ":dotted"} (tr "ds.dotted")] + [:option {:value ":dashed"} (tr "ds.dashed")] + [:option {:value ":mixed"} (tr "ds.mixed")]] [:div.input-element.pixels [:input.input-text - {:placeholder "Width" + {:placeholder (tr "ds.width") :type "number" :min "0" :value (precision-or-0 (:stroke-width shape 1) 2) :on-change on-width-change}]]] - [:span "Color"] + [:span (tr "ds.color")] [:div.row-flex.color-data [:span.color-th {:style {:background-color (:stroke-color shape)} @@ -67,7 +67,7 @@ {:on-change on-stroke-color-change :value (:stroke-color shape "")}]]] - [:span "Radius"] + [:span (tr "ds.radius")] [:div.row-flex [:div.input-element.pixels [:input.input-text @@ -86,7 +86,7 @@ :value (precision-or-0 (:ry shape 0) 2) :on-change on-border-change-ry}]]] - [:span "Opacity"] + [:span (tr "ds.opacity")] [:div.row-flex [:input.slidebar {:type "range" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/text.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/text.cljs index dfe0ca283..34bbf652c 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/text.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/text.cljs @@ -75,7 +75,7 @@ [:div.element-set-title (:name menu)] [:div.element-set-content - [:span "Font family"] + [:span (tr "ds.font-family")] [:div.row-flex [:select.input-select {:value (pr-str font-family) :on-change on-font-family-change} @@ -83,7 +83,7 @@ [:option {:value (pr-str (:id font)) :key (:id font)} (:name font)])]] - [:span "Size and Weight"] + [:span (tr "ds.size-weight")] [:div.row-flex [:div.editable-select [:select.input-select @@ -102,7 +102,7 @@ [:option {:value "48"} "48"] [:option {:value "72"} "72"]] [:input.input-text - {:placeholder "Font Size" + {:placeholder (tr "ds.font-size") :type "number" :min "0" :max "200" @@ -115,10 +115,10 @@ [:option {:value (pr-str data) :key (:name style)} (:name style)])]] - [:span "Line height and Letter spacing"] + [:span (tr "ds.line-height-letter-spacing")] [:div.row-flex [:input.input-text - {:placeholder "Line height" + {:placeholder (tr "ds.line-height") :type "number" :step "0.1" :min "0" @@ -126,7 +126,7 @@ :value (precision-or-0 line-height 2) :on-change on-font-line-height-change}] [:input.input-text - {:placeholder "Letter spacing" + {:placeholder (tr "ds.letter-spacing") :type "number" :step "0.1" :min "0" @@ -134,7 +134,7 @@ :value (precision-or-0 letter-spacing 2) :on-change on-font-letter-spacing-change}]] - [:span "Text align"] + [:span (tr "ds.text-align")] [:div.row-flex.align-icons [:span {:class (when (= text-align "left") "current") :on-click #(on-font-align-change % "left")}