diff --git a/frontend/src/uxbox/view.cljs b/frontend/src/uxbox/view.cljs index e6a60735c..ea5df00a9 100644 --- a/frontend/src/uxbox/view.cljs +++ b/frontend/src/uxbox/view.cljs @@ -6,6 +6,7 @@ (ns uxbox.view (:require [uxbox.config] + [uxbox.view.locales :as lc] [uxbox.view.store :as st] [uxbox.view.ui :as ui])) diff --git a/frontend/src/uxbox/view/locales.cljs b/frontend/src/uxbox/view/locales.cljs new file mode 100644 index 000000000..d8f1ebcf7 --- /dev/null +++ b/frontend/src/uxbox/view/locales.cljs @@ -0,0 +1,15 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) 2015-2016 Andrey Antukh +;; Copyright (c) 2015-2016 Juan de la Cruz + +(ns uxbox.view.locales + "Initialization namespace for i18n locale data." + (:require [uxbox.util.i18n :as i18n] + [uxbox.view.locales.en :as en])) + +(defn init + [] + (vswap! i18n/locales assoc :en en/locales)) diff --git a/frontend/src/uxbox/view/locales/en.cljs b/frontend/src/uxbox/view/locales/en.cljs new file mode 100644 index 000000000..bb47c3b55 --- /dev/null +++ b/frontend/src/uxbox/view/locales/en.cljs @@ -0,0 +1,14 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) 2015-2016 Andrey Antukh +;; Copyright (c) 2015-2016 Juan de la Cruz + +(ns uxbox.view.locales.en) + +(defonce locales + {"viewer.sitemap" "sitemap" + "viewer.interactions" "view interactions" + "viewer.share" "share" + "viewer.save" "save SVG"}) diff --git a/frontend/src/uxbox/view/locales/fr.cljs b/frontend/src/uxbox/view/locales/fr.cljs new file mode 100644 index 000000000..5a9dc75a4 --- /dev/null +++ b/frontend/src/uxbox/view/locales/fr.cljs @@ -0,0 +1,14 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) 2015-2016 Andrey Antukh +;; Copyright (c) 2015-2016 Juan de la Cruz + +(ns uxbox.view.locales.en) + +(defonce locales + {"viewer.sitemap" "plan du site" + "viewer.interactions" "voir les interactions" + "viewer.share" "partager" + "viewer.save" "sauvegarder en SVG"}) diff --git a/frontend/src/uxbox/view/ui/viewer/nav.cljs b/frontend/src/uxbox/view/ui/viewer/nav.cljs index 469774bd6..d93d6b3f0 100644 --- a/frontend/src/uxbox/view/ui/viewer/nav.cljs +++ b/frontend/src/uxbox/view/ui/viewer/nav.cljs @@ -10,6 +10,7 @@ [uxbox.builtins.icons :as i] [rumext.core :as mx :include-macros true] [uxbox.main.data.lightbox :as udl] + [uxbox.util.i18n :refer (tr)] [uxbox.view.store :as st] [uxbox.view.data.viewer :as dv])) @@ -23,18 +24,20 @@ [:div.view-nav [:ul.view-options-btn [:li.tooltip.tooltip-right - {:alt "sitemap" + {:alt (tr "viewer.sitemap") :class (when sitemap? "selected") :on-click toggle-sitemap} i/project-tree] [:li.tooltip.tooltip-right - {:alt "view interactions" + {:alt (tr "viewer.interactions") :class (when interactions? "selected") :on-click toggle-interactions} i/action] [:li.tooltip.tooltip-right - {:alt "share"} i/export] + {:alt (tr "viewer.share") + :class "disabled" + :disabled true} i/export] [:li.tooltip.tooltip-right - {:alt "save SVG" + {:alt (tr "viewer.save") :on-click on-download} i/save]]]))