From 1d5bfd33d4b56ecc4b527f2495346236018405c5 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sat, 10 Aug 2019 20:52:41 +0200 Subject: [PATCH 01/16] :globe_with_meridians: Project, sitemap and layers i18n Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 15 +++++++++++++++ frontend/src/uxbox/main/locales/fr.cljs | 15 +++++++++++++++ .../main/ui/dashboard/projects_createform.cljs | 14 +++++++------- .../uxbox/main/ui/workspace/sidebar/layers.cljs | 5 +++-- .../ui/workspace/sidebar/sitemap_pageform.cljs | 16 ++++++++-------- 5 files changed, 48 insertions(+), 17 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index 5dbcf720d..4337215ab 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -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)" diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index 8c9120797..ede8eaeeb 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -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)" diff --git a/frontend/src/uxbox/main/ui/dashboard/projects_createform.cljs b/frontend/src/uxbox/main/ui/dashboard/projects_createform.cljs index 483dec174..e9d3bfc0a 100644 --- a/frontend/src/uxbox/main/ui/dashboard/projects_createform.cljs +++ b/frontend/src/uxbox/main/ui/dashboard/projects_createform.cljs @@ -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]])) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs index 52bb3bdb4..03c65df39 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs @@ -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}]])) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs index 362f02f78..6a45567bd 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs @@ -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]]))) From 5c12bd988dbe9146520be3b7f082b25f15b4ff3b Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sat, 10 Aug 2019 21:55:56 +0200 Subject: [PATCH 02/16] :globe_with_meridians: History, icons and messages i18n Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 11 ++++++++--- frontend/src/uxbox/main/locales/fr.cljs | 17 +++++++++++------ .../main/ui/workspace/sidebar/history.cljs | 8 ++++---- .../uxbox/main/ui/workspace/sidebar/icons.cljs | 5 +++-- frontend/src/uxbox/util/messages.cljs | 7 ++++--- 5 files changed, 30 insertions(+), 18 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index 4337215ab..7c581e2c3 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -78,19 +78,23 @@ "ds.height" "Height" "ds.go" "Go go go!" + "ds.accept" "Accept" + "ds.cancel" "Cancel" + + "ds.icons" "Icons" "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.history-versions" "History" + "ds.pinned-version" "Pinned" + "ds.help.rect" "Box (Ctrl + B)" "ds.help.circle" "Circle (Ctrl + E)" "ds.help.line" "Line (Ctrl + L)" @@ -162,6 +166,7 @@ "settings.update-settings" "Update settings" "history.alert-message" "You are seeing version %s" + "errors.api.form.old-password-not-match" "Incorrect old password" "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." diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index ede8eaeeb..c0fdbfd08 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -78,18 +78,22 @@ "ds.height" "Hauteur" "ds.go" "Go go go!" + "ds.accept" "Accepter" + "ds.cancel" "Annuler" + + "ds.icons" "Icônes" "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" "Nom de la page" + "ds.page.new" "Nouvelle page" + "ds.page.edit" "Éditer la page" - "ds.page.placeholder" "Page name" - "ds.page.new" "New page" - "ds.page.edit" "Edit page" + "ds.history-versions" "Historique" + "ds.pinned-version" "Épinglés" "ds.help.rect" "Boîte (Ctrl + B)" "ds.help.circle" "Cercle (Ctrl + E)" @@ -162,6 +166,7 @@ "settings.update-settings" "Mettre à jour les paramètres" "history.alert-message" "Vous voyez la version %s" + "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.email-already-exists" "L'email est déjà utilisé par un autre utilisateur." @@ -184,4 +189,4 @@ "errors.generic" "Quelque chose c'est mal passé." "errors.conflict" "Conflit sur la sauvegarde des données, actualisez et réessayez." -}) + }) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs index c5d359e92..bc3ea9fcd 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs @@ -108,10 +108,10 @@ [:ul.history-tabs {} [:li {:on-click show-main :class (when main? "selected")} - "History"] + (tr "ds.history-versions")] [:li {:on-click show-pinned :class (when pinned? "selected")} - "Pinned"]] + (tr "ds.pinned-version")]] (if (= section :pinned) (history-pinned-list history) (history-list history))]]))) @@ -131,5 +131,5 @@ {:class (when (:deselecting history) "hide-message")} [:span {} (tr "history.alert-message" (or version "00")) [:div.message-action {} - [:a.btn-transparent {:on-click on-accept} "Accept"] - [:a.btn-transparent {:on-click on-cancel} "Cancel"]]]])))) + [:a.btn-transparent {:on-click on-accept} (tr "ds.accept")] + [:a.btn-transparent {:on-click on-cancel} (tr "ds.cancel")]]]])))) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs index 0728cf077..ebb06f6b0 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs @@ -19,7 +19,8 @@ [uxbox.builtins.icons :as i] [rumext.core :as mx :include-macros true] [uxbox.util.dom :as dom] - [uxbox.util.data :refer (read-string)])) + [uxbox.util.data :refer (read-string)] + [uxbox.util.i18n :refer [tr]])) ;; --- Refs @@ -70,7 +71,7 @@ [:div#form-figures.tool-window [:div.tool-window-bar [:div.tool-window-icon i/icon-set] - [:span "Icons"] + [:span (tr "ds.icons")] [:div.tool-window-close {:on-click on-close} i/close]] [:div.tool-window-content [:div.figures-catalog diff --git a/frontend/src/uxbox/util/messages.cljs b/frontend/src/uxbox/util/messages.cljs index e31239729..764b06c69 100644 --- a/frontend/src/uxbox/util/messages.cljs +++ b/frontend/src/uxbox/util/messages.cljs @@ -14,7 +14,8 @@ [uxbox.util.timers :as ts] [rumext.core :as mx :include-macros true] [uxbox.util.data :refer [classnames]] - [uxbox.util.dom :as dom])) + [uxbox.util.dom :as dom] + [uxbox.util.i18n :refer [tr]])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Data Events @@ -135,10 +136,10 @@ [:div.message-action [:a.btn-transparent.btn-small {:on-click accept} - "Accept"] + (tr "ds.accept")] [:a.btn-transparent.btn-small {:on-click cancel} - "Cancel"]]]]))) + (tr "ds.cancel")]]]]))) ;; --- Main Component (entry point) From b3caa93e8b612310bacf5a0a4006ab170e02205d Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sat, 10 Aug 2019 22:27:48 +0200 Subject: [PATCH 03/16] :globe_with_meridians: Header i18n Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 17 ++++++++++ frontend/src/uxbox/main/locales/fr.cljs | 17 ++++++++++ .../src/uxbox/main/ui/workspace/header.cljs | 33 ++++++++++--------- 3 files changed, 51 insertions(+), 16 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index 7c581e2c3..400ba56e0 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -108,6 +108,23 @@ "ds.user.notifications" "Notifications" "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)" + "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 c0fdbfd08..af738487f 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -108,6 +108,23 @@ "ds.user.notifications" "Notifications" "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)" + "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/header.cljs b/frontend/src/uxbox/main/ui/workspace/header.cljs index 4d9d44278..3fd8ed628 100644 --- a/frontend/src/uxbox/main/ui/workspace/header.cljs +++ b/frontend/src/uxbox/main/ui/workspace/header.cljs @@ -22,6 +22,7 @@ [uxbox.main.ui.users :refer [user]] [uxbox.main.ui.workspace.clipboard] [uxbox.util.data :refer [index-of]] + [uxbox.util.i18n :refer (tr)] [uxbox.util.geom.point :as gpt] [uxbox.util.math :as mth] [uxbox.util.router :as rt])) @@ -54,7 +55,7 @@ [:div.main-icon [:a {:on-click #(st/emit! (rt/nav :dashboard/projects))} i/logo-icon]] [:div.project-tree-btn - {:alt "Sitemap (Ctrl + Shift + M)" + {:alt (tr "header.sitemap") :class (when (contains? flags :sitemap) "selected") :on-click (partial toggle :sitemap)} i/project-tree @@ -62,76 +63,76 @@ [:div.workspace-options [:ul.options-btn [:li.tooltip.tooltip-bottom - {:alt "Draw tools (Ctrl + Shift + S)" + {:alt (tr "header.draw-tools") :class (when (contains? flags :drawtools) "selected") :on-click (partial toggle :drawtools)} i/shapes] [:li.tooltip.tooltip-bottom - {:alt "Color Palette (---)" + {:alt (tr "header.color-palette") :class (when (contains? flags :colorpalette) "selected") :on-click (partial toggle :colorpalette)} i/palette] [:li.tooltip.tooltip-bottom - {:alt "Icons (Ctrl + Shift + I)" + {:alt (tr "header.icons") :class (when (contains? flags :icons) "selected") :on-click (partial toggle :icons)} i/icon-set] [:li.tooltip.tooltip-bottom - {:alt "Layers (Ctrl + Shift + L)" + {:alt (tr "header.layers") :class (when (contains? flags :layers) "selected") :on-click (partial toggle :layers)} i/layers] [:li.tooltip.tooltip-bottom - {:alt "Element options (Ctrl + Shift + O)" + {:alt (tr "header.element-options") :class (when (contains? flags :element-options) "selected") :on-click (partial toggle :element-options)} i/options] [:li.tooltip.tooltip-bottom - {:alt "History (Ctrl + Shift + H)" + {:alt (tr "header.document-history") :class (when (contains? flags :document-history) "selected") :on-click (partial toggle :document-history)} i/undo-history]] [:ul.options-btn [:li.tooltip.tooltip-bottom - {:alt "Undo (Ctrl + Z)" + {:alt (tr "header.undo") :on-click on-undo} i/undo] [:li.tooltip.tooltip-bottom - {:alt "Redo (Ctrl + Shift + Z)" + {:alt (tr "header.redo") :on-click on-redo} i/redo]] [:ul.options-btn [:li.tooltip.tooltip-bottom - {:alt "Download (Ctrl + E)" + {:alt (tr "header.download") ;; :on-click on-download } i/download] [:li.tooltip.tooltip-bottom - {:alt "Image (Ctrl + I)" + {:alt (tr "header.image") :on-click on-image} i/image]] [:ul.options-btn [:li.tooltip.tooltip-bottom - {:alt "Rules" + {:alt (tr "header.rules") :class (when (contains? flags :rules) "selected") :on-click (partial toggle :rules)} i/ruler] [:li.tooltip.tooltip-bottom - {:alt "Grid (Ctrl + G)" + {:alt (tr "header.grid") :class (when (contains? flags :grid) "selected") :on-click (partial toggle :grid)} i/grid] [:li.tooltip.tooltip-bottom - {:alt "Snap to grid" + {:alt (tr "header.grid-snap") :class (when (contains? flags :grid-snap) "selected") :on-click (partial toggle :grid-snap)} i/grid-snap]] ;; [:li.tooltip.tooltip-bottom - ;; {:alt "Align (Ctrl + A)"} + ;; {:alt (tr "header.align")} ;; i/alignment]] [:ul.options-btn [:li.tooltip.tooltip-bottom.view-mode - {:alt "View mode (Ctrl + P)" + {:alt (tr "header.view-mode") :on-click #(st/emit! (dw/->OpenView (:id page))) } i/play]] From 5d62c70cc5e6de66f6c56a374b611673ad3346ef Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sun, 11 Aug 2019 00:04:41 +0200 Subject: [PATCH 04/16] :globe_with_meridians: Element options i18n Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 8 ++++++++ frontend/src/uxbox/main/locales/fr.cljs | 8 ++++++++ .../main/ui/workspace/sidebar/options.cljs | 20 +++++++++---------- .../ui/workspace/sidebar/options/page.cljs | 1 + 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index 400ba56e0..ce54d2009 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -125,6 +125,14 @@ "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.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 af738487f..910267301 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -125,6 +125,14 @@ "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.password" "Mot de passe" "auth.signin" "Se connecter" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs index e85f6431a..8c6c18e61 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs @@ -41,43 +41,43 @@ ::page [::page-measures ::page-grid-options]}) (def ^:private +menus+ - [{:name "Size, position & rotation" + [{:name (tr "element.measures") :id ::icon-measures :icon i/infocard :comp options-iconm/icon-measures-menu} - {:name "Size, position & rotation" + {:name (tr "element.measures") :id ::image-measures :icon i/infocard :comp options-imagem/image-measures-menu} - {:name "Size, position & rotation" + {:name (tr "element.measures") :id ::rect-measures :icon i/infocard :comp options-rectm/rect-measures-menu} - {:name "Size, position & rotation" + {:name (tr "element.measures") :id ::circle-measures :icon i/infocard :comp options-circlem/circle-measures-menu} - {:name "Fill" + {:name (tr "element.fill") :id ::fill :icon i/fill :comp options-fill/fill-menu} - {:name "Stroke" + {:name (tr "element.fill") :id ::stroke :icon i/stroke :comp options-stroke/stroke-menu} - {:name "Text" + {:name (tr "element.text") :id ::text :icon i/text :comp options-text/text-menu} - {:name "Interactions" + {:name (tr "element.interactions") :id ::interactions :icon i/action :comp options-interactions/interactions-menu} - {:name "Page settings" + {:name (tr "element.page-measures") :id ::page-measures :icon i/page :comp options-page/measures-menu} - {:name "Grid settings" + {:name (tr "element.page-grid-options") :id ::page-grid-options :icon i/grid :comp options-page/grid-options-menu}]) 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 980a6962f..9815e2202 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs @@ -20,6 +20,7 @@ [uxbox.main.ui.workspace.colorpicker :refer [colorpicker-modal]] [uxbox.util.data :refer [parse-int]] [uxbox.util.dom :as dom] + [uxbox.util.i18n :refer [tr]] [uxbox.util.spec :refer [color?]])) (mf/defc measures-menu From b799d26a10ff947f0089fb63482dc4275fdcaf89 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sun, 11 Aug 2019 01:08:10 +0200 Subject: [PATCH 05/16] :truck: Change translation keys to avoid conflicts Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 16 ++++++++-------- frontend/src/uxbox/main/locales/fr.cljs | 18 +++++++++--------- .../main/ui/workspace/sidebar/drawtools.cljs | 2 +- .../main/ui/workspace/sidebar/history.cljs | 6 +++--- .../uxbox/main/ui/workspace/sidebar/icons.cljs | 2 +- .../main/ui/workspace/sidebar/layers.cljs | 2 +- .../main/ui/workspace/sidebar/options.cljs | 2 +- .../main/ui/workspace/sidebar/sitemap.cljs | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index ce54d2009..f74554a07 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -81,19 +81,19 @@ "ds.accept" "Accept" "ds.cancel" "Cancel" - "ds.icons" "Icons" - "ds.element-options" "Element options" - "ds.draw-tools" "Draw tools" - "ds.sitemap" "Sitemap" - "ds.layers" "Layers" - "ds.document-history" "Document history" + "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.pinned-version" "Pinned" + "ds.history.versions" "History" + "ds.history.pinned" "Pinned" "ds.help.rect" "Box (Ctrl + B)" "ds.help.circle" "Circle (Ctrl + E)" diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index 910267301..e8a70967d 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -76,24 +76,24 @@ "ds.width" "Largeur" "ds.height" "Hauteur" - "ds.go" "Go go go!" + "ds.go" "C'est parti !" "ds.accept" "Accepter" "ds.cancel" "Annuler" - "ds.icons" "Icônes" - "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.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.pinned-version" "Épinglés" + "ds.history.versions" "Historique" + "ds.history.pinned" "Épinglés" "ds.help.rect" "Boîte (Ctrl + B)" "ds.help.circle" "Cercle (Ctrl + E)" diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/drawtools.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/drawtools.cljs index b80ac6898..6bc363213 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/drawtools.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/drawtools.cljs @@ -94,7 +94,7 @@ [:div#form-tools.tool-window.drawing-tools [:div.tool-window-bar [: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-content (for [[i props] (map-indexed vector tools)] diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs index bc3ea9fcd..afc6a8bf5 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs @@ -102,16 +102,16 @@ [:div.document-history.tool-window {} [:div.tool-window-bar {} [: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-content {} [:ul.history-tabs {} [:li {:on-click show-main :class (when main? "selected")} - (tr "ds.history-versions")] + (tr "ds.history.versions")] [:li {:on-click show-pinned :class (when pinned? "selected")} - (tr "ds.pinned-version")]] + (tr "ds.history.pinned")]] (if (= section :pinned) (history-pinned-list history) (history-list history))]]))) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs index ebb06f6b0..2e72d9695 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs @@ -71,7 +71,7 @@ [:div#form-figures.tool-window [:div.tool-window-bar [:div.tool-window-icon i/icon-set] - [:span (tr "ds.icons")] + [:span (tr "ds.settings.icons")] [:div.tool-window-close {:on-click on-close} i/close]] [:div.tool-window-content [:div.figures-catalog diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs index 03c65df39..c3b803771 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs @@ -169,7 +169,7 @@ [:div#layers.tool-window [:div.tool-window-bar [:div.tool-window-icon i/layers] - [:span (tr "ds.layers")] + [:span (tr "ds.settings.layers")] [:div.tool-window-close {:on-click on-click} i/close]] [:& layers-list {:shapes (:shapes page) :selected selected}]])) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs index 8c6c18e61..2cb9008c3 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs @@ -114,7 +114,7 @@ [:div.elementa-options.tool-window [:div.tool-window-bar [: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-content [:div.element-options diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap.cljs index 0b98a1ea4..20dd38fb4 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap.cljs @@ -105,7 +105,7 @@ [:div.sitemap.tool-window [:div.tool-window-bar [: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-content [:div.project-title From dcb6a66d8ad405efcfb9ec5349d004d3b23e9226 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Mon, 12 Aug 2019 10:42:37 +0200 Subject: [PATCH 06/16] :globe_with_meridians: Translate project title and update Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 2 ++ frontend/src/uxbox/main/locales/fr.cljs | 2 ++ frontend/src/uxbox/main/ui/dashboard/projects.cljs | 4 ++-- frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs | 2 +- frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs | 2 +- frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs | 2 +- .../src/uxbox/main/ui/workspace/sidebar/options/fill.cljs | 2 +- .../src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index f74554a07..bb801b2d0 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -14,6 +14,7 @@ "%s projects"] "ds.project-title" "Your projects" "ds.project-new" "+ New project" + "ds.project-thumbnail.alt" "Project title" "ds.ordering" "Sort by" "ds.ordering.by-name" "name" @@ -21,6 +22,7 @@ "ds.ordering.by-creation-date" "creation date" "ds.search.placeholder" "Search..." "ds.uploaded-at" "Uploaded at %s" + "ds.updated-at" "Updated %s" "ds.confirm-title" "Are you sure?" "ds.confirm-ok" "Ok" diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index e8a70967d..381abe820 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -14,6 +14,7 @@ "%s projets"] "ds.project-title" "Vos projets" "ds.project-new" "+ Nouveau projet" + "ds.project-thumbnail.alt" "Titre du projet" "ds.ordering" "Trier par" "ds.ordering.by-name" "nom" @@ -21,6 +22,7 @@ "ds.ordering.by-creation-date" "date de création" "ds.search.placeholder" "Rechercher..." "ds.uploaded-at" "Mise en ligne : %s" + "ds.updated-at" "Mis à jour %s" "ds.confirm-title" "Êtes-vous sûr ?" "ds.confirm-ok" "Ok" diff --git a/frontend/src/uxbox/main/ui/dashboard/projects.cljs b/frontend/src/uxbox/main/ui/dashboard/projects.cljs index d9ea84bfb..0659152d7 100644 --- a/frontend/src/uxbox/main/ui/dashboard/projects.cljs +++ b/frontend/src/uxbox/main/ui/dashboard/projects.cljs @@ -134,7 +134,7 @@ {:style {:background-image (str "url('" @url "')")}}] [:div.grid-item-th [: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)}] [:h3 (:name project)]) [: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-icon.pages i/page diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs index afc6a8bf5..b87c37e40 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/history.cljs @@ -14,7 +14,7 @@ [uxbox.main.data.workspace :as dw] [uxbox.util.data :refer [read-string]] [uxbox.util.dom :as dom] - [uxbox.util.i18n :refer [tr]] + [uxbox.util.i18n :refer (tr)] [rumext.alpha :as mf] [uxbox.util.router :as r] [uxbox.util.time :as dt])) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs index 2e72d9695..e1ae60e54 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/icons.cljs @@ -20,7 +20,7 @@ [rumext.core :as mx :include-macros true] [uxbox.util.dom :as dom] [uxbox.util.data :refer (read-string)] - [uxbox.util.i18n :refer [tr]])) + [uxbox.util.i18n :refer (tr)])) ;; --- Refs diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs index 2cb9008c3..a4411816a 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs @@ -27,7 +27,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/fill.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs index 16836fa82..b2b7dc590 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]}] diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs index 6a45567bd..e1704e58e 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_pageform.cljs @@ -17,7 +17,7 @@ [uxbox.util.data :refer [parse-int]] [uxbox.util.dom :as dom] [uxbox.util.forms :as fm] - [uxbox.util.i18n :refer [tr]] + [uxbox.util.i18n :refer (tr)] [uxbox.util.router :as r] [rumext.core :as mx :include-macros true])) From 0f4316a5ae1a6680e0fc103d66e08ab2aaccc17c Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 9 Aug 2019 16:49:01 +0200 Subject: [PATCH 07/16] :memo: Add server CORS env var in doc Signed-off-by: mathieu.brunot --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0756e6e20..610d6ae80 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Available at runtime: - `-e LC_ALL=...` (defaults to `C.UTF-8`) - `-e UXBOX_HTTP_SERVER_PORT=...` (defaults to `6060`) - `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to `true`) +- `-e UXBOX_HTTP_SERVER_CORS=...` (defaults to `http://localhost:3449`) - `-e UXBOX_DATABASE_USERNAME="..."` (defaults to `nil`) - `-e UXBOX_DATABASE_PASSWORD="..."` (defaults to `nil`) - `-e UXBOX_DATABASE_URI="..."` (defaults to ` `, will be computed based on other DATABASE parameters if empty) From 7536241be0240d23f62adcce0aeb78afff040bbb Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 02:12:08 +0200 Subject: [PATCH 08/16] :globe_with_meridians: Merge i18n for projects and sitemap Signed-off-by: mathieu.brunot --- .../uxbox/main/ui/dashboard/projects_forms.cljs | 14 +++++++------- .../main/ui/workspace/sidebar/sitemap_forms.cljs | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/src/uxbox/main/ui/dashboard/projects_forms.cljs b/frontend/src/uxbox/main/ui/dashboard/projects_forms.cljs index d6695623b..9cd2b8540 100644 --- a/frontend/src/uxbox/main/ui/dashboard/projects_forms.cljs +++ b/frontend/src/uxbox/main/ui/dashboard/projects_forms.cljs @@ -49,7 +49,7 @@ (let [{:keys [data] :as form} (fm/use-form ::project-form defaults)] [:form {:on-submit #(on-submit % form)} [:input.input-text - {:placeholder "New project name" + {:placeholder (tr "ds.project.placeholder") :type "text" :name "name" :value (:name data) @@ -59,9 +59,9 @@ :auto-focus true}] [:div.project-size [:div.input-element.pixels - [:span "Width"] + [:span (tr "ds.width")] [:input#project-witdh.input-text - {:placeholder "Width" + {:placeholder (tr "ds.width") :name "width" :type "number" :min 0 @@ -72,9 +72,9 @@ :value (:width data)}]] [:a.toggle-layout {:on-click #(swap-size % form)} 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" :name "height" :min 0 @@ -86,7 +86,7 @@ ;; Submit [:input#project-btn.btn-primary - {:value "Go go go!" + {:value (tr "ds.go") :class (when-not (:valid form) "btn-disabled") :disabled (not (:valid form)) :type "submit"}]])) @@ -96,7 +96,7 @@ (mf/defc create-project-dialog [props] [:div.lightbox-body - [:h3 "New project"] + [:h3 (tr "ds.project.new")] [:& create-project-form] [:a.close {:on-click modal/hide!} i/close]]) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_forms.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_forms.cljs index 15c16e69e..5919e86c0 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_forms.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/sitemap_forms.cljs @@ -63,7 +63,7 @@ (let [{:keys [data] :as form} (fm/use-form ::page-form #(initial-data page))] [:form {:on-submit #(on-submit % form)} [:input.input-text - {:placeholder "Page name" + {:placeholder (tr "ds.page.placeholder") :type "text" :name "name" :class (fm/error-class form :name) @@ -73,9 +73,9 @@ :auto-focus true}] [:div.project-size [:div.input-element.pixels - [:span "Width"] + [:span (tr "ds.width")] [:input#project-witdh.input-text - {:placeholder "Width" + {:placeholder (tr "ds.width") :name "width" :type "number" :min 0 @@ -86,9 +86,9 @@ :value (:width data)}]] [:a.toggle-layout {:on-click #(swap-size % form)} i/toggle] [:div.input-element.pixels - [:span "Height"] + [:span (tr "ds.height")] [:input#project-height.input-text - {:placeholder "Height" + {:placeholder (tr "ds.height") :name "height" :type "number" :min 0 @@ -98,7 +98,7 @@ :on-change (fm/on-input-change form :height) :value (:height data)}]]] [:input.btn-primary - {:value "Go go go!" + {:value (tr "ds.go") :type "submit" :class (when-not (:valid form) "btn-disabled") :disabled (not (:valid form))}]])) @@ -107,8 +107,8 @@ [{:keys [page] :as props}] [:div.lightbox-body (if (nil? (:id page)) - [:h3 "New page"] - [:h3 "Edit page"]) + [:h3 (tr "ds.page.new")] + [:h3 (tr "ds.page.edit")]) [:& page-form {:page page}] [:a.close {:on-click modal/hide!} i/close]]) From 78f9e33ed4de5064a3d8e48773ba0aef7b95e1e4 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 11:33:21 +0200 Subject: [PATCH 09/16] :globe_with_meridians: Canvas tool text Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/en.cljs | 1 + frontend/src/uxbox/main/locales/fr.cljs | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/src/uxbox/main/locales/en.cljs b/frontend/src/uxbox/main/locales/en.cljs index bb801b2d0..e7a379077 100644 --- a/frontend/src/uxbox/main/locales/en.cljs +++ b/frontend/src/uxbox/main/locales/en.cljs @@ -104,6 +104,7 @@ "ds.help.path" "Path" "ds.help.curve" "Curve" "ds.help.ruler" "Ruler" + "ds.help.canvas" "Canvas" "ds.user.profile" "Profile" "ds.user.password" "Password" diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index 381abe820..ce5d6b92d 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -104,6 +104,7 @@ "ds.help.path" "Chemin" "ds.help.curve" "Courbe" "ds.help.ruler" "Règle" + "ds.help.canvas" "Calque" "ds.user.profile" "Profil" "ds.user.password" "Mot de passe" From c013b79ec909c08c39bfc60db04e2128c8b87231 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 11:36:50 +0200 Subject: [PATCH 10/16] :globe_with_meridians: Snap to Grid French Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/fr.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index ce5d6b92d..2d82f2293 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -124,7 +124,7 @@ "header.image" "Image (Ctrl + I)" "header.rules" "Règles" "header.grid" "Grille (Ctrl + G)" - "header.grid-snap" "Snap to grid" + "header.grid-snap" "Coller à la grille" "header.align" "Aligner (Ctrl + A)" "header.view-mode" "Mode visualisation (Ctrl + P)" From 294734ce9367e1cc8c893c10c8995978eff6140e Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 11:44:47 +0200 Subject: [PATCH 11/16] :globe_with_meridians: Snap to Grid French Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/locales/fr.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/uxbox/main/locales/fr.cljs b/frontend/src/uxbox/main/locales/fr.cljs index 381abe820..d73cfc22d 100644 --- a/frontend/src/uxbox/main/locales/fr.cljs +++ b/frontend/src/uxbox/main/locales/fr.cljs @@ -123,7 +123,7 @@ "header.image" "Image (Ctrl + I)" "header.rules" "Règles" "header.grid" "Grille (Ctrl + G)" - "header.grid-snap" "Snap to grid" + "header.grid-snap" "Coller à la grille" "header.align" "Aligner (Ctrl + A)" "header.view-mode" "Mode visualisation (Ctrl + P)" From 1e44747acfbd15530e17ec4b088758978e85196c Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 11:45:36 +0200 Subject: [PATCH 12/16] :pencil2: Use correct i18n key for strokes Signed-off-by: mathieu.brunot --- frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs index 2ade5d2fb..1c9079281 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs @@ -62,7 +62,7 @@ :id ::fill :icon i/fill :comp options-fill/fill-menu} - {:name (tr "element.fill") + {:name (tr "element.stroke") :id ::stroke :icon i/stroke :comp options-stroke/stroke-menu} From 8da93f90b6046edb2fc7389a45080026a4ff9252 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Fri, 13 Sep 2019 11:59:33 +0200 Subject: [PATCH 13/16] :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 14/16] :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 15/16] :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")} From 72172a3b97b540f97551d6183a77c8190f51ddcf Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sat, 14 Sep 2019 15:16:32 +0200 Subject: [PATCH 16/16] :globe_with_meridians: Element options i18n Signed-off-by: mathieu.brunot --- .../main/ui/workspace/sidebar/options.cljs | 20 +++++++++---------- .../ui/workspace/sidebar/options/page.cljs | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs index d8adb1e58..361ff2dfc 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options.cljs @@ -42,43 +42,43 @@ ::page [::page-measures ::page-grid-options]}) (def ^:private +menus+ - [{:name (tr "element.measures") + [{:name "element.measures" :id ::icon-measures :icon i/infocard :comp options-iconm/icon-measures-menu} - {:name (tr "element.measures") + {:name "element.measures" :id ::image-measures :icon i/infocard :comp options-imagem/image-measures-menu} - {:name (tr "element.measures") + {:name "element.measures" :id ::rect-measures :icon i/infocard :comp options-rectm/rect-measures-menu} - {:name (tr "element.measures") + {:name "element.measures" :id ::circle-measures :icon i/infocard :comp options-circlem/circle-measures-menu} - {:name (tr "element.fill") + {:name "element.fill" :id ::fill :icon i/fill :comp options-fill/fill-menu} - {:name (tr "element.stroke") + {:name "element.stroke" :id ::stroke :icon i/stroke :comp options-stroke/stroke-menu} - {:name (tr "element.text") + {:name "element.text" :id ::text :icon i/text :comp options-text/text-menu} - {:name (tr "element.interactions") + {:name "element.interactions" :id ::interactions :icon i/action :comp options-interactions/interactions-menu} - {:name (tr "element.page-measures") + {:name "element.page-measures" :id ::page-measures :icon i/page :comp options-page/measures-menu} - {:name (tr "element.page-grid-options") + {:name "element.page-grid-options" :id ::page-grid-options :icon i/grid :comp options-page/grid-options-menu}]) 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 5c88ddfd6..3914db58b 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs @@ -58,7 +58,7 @@ (modal/show! colorpicker-modal props)))] [:div.element-set - [:div.element-set-title (:name menu)] + [:div.element-set-title (tr (:name menu))] [:div.element-set-content [:span (tr "ds.name")] [:div.row-flex @@ -126,7 +126,7 @@ :on-change change-color}] (modal/show! colorpicker-modal props)))] [:div.element-set - [:div.element-set-title (:name menu)] + [:div.element-set-title (tr (:name menu))] [:div.element-set-content [:span (tr "ds.size")] [:div.row-flex