diff --git a/src/main/frontend/components/header.cljs b/src/main/frontend/components/header.cljs index a13993619ab..fe9e0243419 100644 --- a/src/main/frontend/components/header.cljs +++ b/src/main/frontend/components/header.cljs @@ -58,7 +58,7 @@ [{:keys [on-click]}] (ui/with-shortcut :ui/toggle-left-sidebar "bottom" [:button.#left-menu.cp__header-left-menu.button.icon - {:title "Toggle left menu" + {:title (t :header/toggle-left-sidebar) :on-click on-click} (ui/icon "menu-2" {:size ui/icon-size})])) @@ -86,7 +86,7 @@ (fn [{:keys [toggle-fn]}] [:button.button.icon.toolbar-dots-btn {:on-click toggle-fn - :title "More"} + :title (t :header/more)} (ui/icon "dots" {:size ui/icon-size})]) (->> [(when (state/enable-editing?) @@ -148,12 +148,12 @@ (ui/with-shortcut :go/backward "bottom" [:button.it.navigation.nav-left.button.icon - {:title "Go back" :on-click #(js/window.history.back)} + {:title (t :header/go-back) :on-click #(js/window.history.back)} (ui/icon "arrow-left" {:size ui/icon-size})]) (ui/with-shortcut :go/forward "bottom" [:button.it.navigation.nav-right.button.icon - {:title "Go forward" :on-click #(js/window.history.forward)} + {:title (t :header/go-forward) :on-click #(js/window.history.forward)} (ui/icon "arrow-right" {:size ui/icon-size})])]) (rum/defc updater-tips-new-version @@ -218,13 +218,13 @@ (when-not (or (state/home?) custom-home-page? (state/whiteboard-dashboard?)) (ui/with-shortcut :go/backward "bottom" [:button.it.navigation.nav-left.button.icon.opacity-70 - {:title "Go back" :on-click #(js/window.history.back)} + {:title (t :header/go-back) :on-click #(js/window.history.back)} (ui/icon "chevron-left" {:size 26})])) ;; search button for non-mobile (when current-repo (ui/with-shortcut :go/search "right" [:button.button.icon#search-button - {:title "Search" + {:title (t :header/search) :on-click #(do (when (or (mobile-util/native-android?) (mobile-util/native-iphone?)) (state/set-left-sidebar-open! false)) diff --git a/src/main/frontend/components/onboarding.cljs b/src/main/frontend/components/onboarding.cljs index abb78363ee3..ab2dc132c76 100644 --- a/src/main/frontend/components/onboarding.cljs +++ b/src/main/frontend/components/onboarding.cljs @@ -16,7 +16,7 @@ [:span.mr-1 (t :help/forum-community)] (ui/icon "message-circle" {:style {:font-size 20}})] list - [{:title "Usage" + [{:title (t :help/title-usage) :children [[[:a {:on-click (fn [] (state/sidebar-add-block! (state/get-current-repo) "shortcut-settings" :shortcut-settings))} [:div.flex-row.inline-flex.items-center @@ -26,21 +26,21 @@ [(t :help/start) "https://docs.logseq.com/#/page/tutorial"] ["FAQ" "https://docs.logseq.com/#/page/faq"]]} - {:title "Community" + {:title (t :help/title-community) :children [[(t :help/awesome-logseq) "https://github.com/logseq/awesome-logseq"] [(t :help/blog) "https://blog.logseq.com"] [discourse-with-icon "https://discuss.logseq.com"]]} - {:title "Development" + {:title (t :help/title-development) :children [[(t :help/roadmap) "https://trello.com/b/8txSM12G/roadmap"] [(t :help/bug) "https://github.com/logseq/logseq/issues/new?labels=from:in-app&template=bug_report.yaml"] [(t :help/feature) "https://discuss.logseq.com/c/feature-requests/"] [(t :help/changelog) "https://docs.logseq.com/#/page/changelog"]]} - {:title "About" + {:title (t :help/title-about) :children [[(t :help/about) "https://blog.logseq.com/about/"]]} - {:title "Terms" + {:title (t :help/title-terms) :children [[(t :help/privacy) "https://blog.logseq.com/privacy-policy/"] [(t :help/terms) "https://blog.logseq.com/terms/"]]}]] diff --git a/src/main/frontend/components/plugins.cljs b/src/main/frontend/components/plugins.cljs index dfadc2a5707..078b98d0a00 100644 --- a/src/main/frontend/components/plugins.cljs +++ b/src/main/frontend/components/plugins.cljs @@ -191,10 +191,7 @@ (ui/admonition :warning [:p.text-md - "Plugins can access your graph and your local files, issue network requests. - They can also cause data corruption or loss. We're working on proper access rules for your graphs. - Meanwhile, make sure you have regular backups of your graphs and only install the plugins when you can read and - understand the source code."])) + (t :plugin/security-warning)])) (rum/defc card-ctls-of-market < rum/static [item stat installed? installing-or-updating?] @@ -365,7 +362,7 @@ (.focus target))} (ui/icon "x")]) [:input.form-input.is-small - {:placeholder "Search plugins" + {:placeholder (t :plugin/search-plugin) :ref *search-ref :auto-focus true :on-key-down (fn [^js e] @@ -585,11 +582,11 @@ (when (state/developer-mode?) [{:hr true} - {:title [:span.flex.items-center (ui/icon "file-code") "Open Preferences"] + {:title [:span.flex.items-center (ui/icon "file-code") (t :plugin/open-preferences)] :options {:on-click #(p/let [root (plugin-handler/get-ls-dotdir-root)] (js/apis.openPath (str root "/preferences.json")))}} - {:title [:span.flex.items-center (ui/icon "bug") "Open\u00A0" [:code "~/.logseq"]] + {:title [:span.flex.items-center (ui/icon "bug") (str (t :plugin/open-logseq-dir) "\u00A0") [:code "~/.logseq"]] :options {:on-click #(p/let [root (plugin-handler/get-ls-dotdir-root)] (js/apis.openPath root))}}])) @@ -730,7 +727,7 @@ [:p.flex.justify-center.py-20 svg/loading] @*error - [:p.flex.justify-center.pt-20.opacity-50 "Remote error: " (.-message @*error)] + [:p.flex.justify-center.pt-20.opacity-50 (t :plugin/remote-error) (.-message @*error)] :else [:div.cp__plugins-marketplace-cnt @@ -895,7 +892,7 @@ [:span.opacity-30.hover:opacity-80 (ui/icon "info-circle")]))]])] ;; all done - [:div.py-4 [:strong.text-4xl "\uD83C\uDF89 All updated!"]]) + [:div.py-4 [:strong.text-4xl (str "\uD83C\uDF89 " (t :plugin/all-updated))]]) ;; actions (when (seq updates) @@ -1183,7 +1180,7 @@ [sub-content, _set-sub-content!] (rum-utils/use-atom *updates-sub-content) notify! (fn [content status] (if auto-checking? - (println "Plugin Updates: " content) + (println (t :plugin/list-of-updates) content) (let [cb #(plugin-handler/cancel-user-checking!)] (try (set-uid (notification/show! content status false uid nil cb)) @@ -1195,7 +1192,7 @@ (if check-pending? (notify! [:div - [:div (str "Checking for plugin updates ...")] + [:div (str (t :plugin/checking-for-updates))] (when sub-content [:p.opacity-60 sub-content])] (ui/loading "")) (when uid (notification/clear! uid)))) diff --git a/src/main/frontend/components/right_sidebar.cljs b/src/main/frontend/components/right_sidebar.cljs index d12705e5bbe..d688b6473ca 100644 --- a/src/main/frontend/components/right_sidebar.cljs +++ b/src/main/frontend/components/right_sidebar.cljs @@ -29,7 +29,7 @@ (when-not (util/sm-breakpoint?) (ui/with-shortcut :ui/toggle-right-sidebar "left" [:button.button.icon.toggle-right-sidebar - {:title "Toggle right sidebar" + {:title (t :right-side-bar/toggle-right-sidebar) :on-click ui-handler/toggle-right-sidebar!} (ui/icon "layout-sidebar-right" {:size 20})]))) diff --git a/src/main/frontend/components/search.cljs b/src/main/frontend/components/search.cljs index 2c9755aa1bd..c9e91062b37 100644 --- a/src/main/frontend/components/search.cljs +++ b/src/main/frontend/components/search.cljs @@ -312,7 +312,7 @@ :else (do (log/error "search result with non-existing uuid: " data) - (str "Cache is outdated. Please click the 'Re-index' button in the graph's dropdown menu."))))]) + (str (t :search/cache-outdated)))))]) :page-content (let [{:block/keys [snippet uuid]} data ;; content here is normalized @@ -327,7 +327,7 @@ (if page (page-content-search-result-item repo uuid format snippet search-q search-mode) (do (log/error "search result with non-existing uuid: " data) - (str "Cache is outdated. Please click the 'Re-index' button in the graph's dropdown menu."))))])) + (str (t :search/cache-outdated)))))])) nil)])) @@ -396,11 +396,11 @@ [in-page-search?] [:div.recent-search [:div.wrap.px-4.pb-2.text-sm.opacity-70.flex.flex-row.justify-between.align-items.mx-1.sm:mx-0 - [:div "Recent search:"] + [:div (t :search/recent)] [:div.hidden.md:flex (ui/with-shortcut :go/search-in-page "bottom" [:div.flex-row.flex.align-items - [:div.mr-3.flex "Search blocks in page:"] + [:div.mr-3.flex (t :search/blocks-in-page)] [:div.flex.items-center (ui/toggle in-page-search? (fn [_value] diff --git a/src/resources/dicts/en.edn b/src/resources/dicts/en.edn index 351076cf8be..2948c39ec60 100644 --- a/src/resources/dicts/en.edn +++ b/src/resources/dicts/en.edn @@ -17,6 +17,11 @@ :on-boarding/tour-whiteboard-home-description "Whiteboards have their own section in the app where you can see them at a glance, create new ones or delete them easily." :on-boarding/tour-whiteboard-new "{1} Create new whiteboard" :on-boarding/tour-whiteboard-new-description "There are multiple ways of creating a new whiteboard. One of them is always right here in the dashboard." + :help/title-usage "Usage" + :help/title-community "Community" + :help/title-development "Development" + :help/title-about "About" + :help/title-terms "Terms" :help/start "Getting started" :help/about "About Logseq" :help/roadmap "Roadmap" @@ -41,6 +46,9 @@ :search/result-for "Search result for " :search/items "items" :search/page-names "Search page names" + :search/recent "Recent search:" + :search/blocks-in-page "Search blocks in page:" + :search/cache-outdated "Cache is outdated. Please click the 'Re-index' button in the graph's dropdown menu." :search-item/whiteboard "Whiteboard" :search-item/page "Page" :search-item/file "File" @@ -67,6 +75,7 @@ :right-side-bar/new-page "New page" :right-side-bar/show-journals "Show Journals" :right-side-bar/separator "Right sidebar resize handler" + :right-side-bar/toggle-right-sidebar "Toggle right sidebar" :left-side-bar/journals "Journals" :left-side-bar/create "Create" :left-side-bar/new-page "New page" @@ -402,6 +411,7 @@ :plugin/found-updates "New updates" :plugin/found-n-updates "Found {1} updates" :plugin/update-all-selected "Update all of selected" + :plugin/all-updated "All updated!" :plugin/updates-downloading "Downloading updates" :plugin/refresh-lists "Refresh lists" :plugin/enabled "Enabled" @@ -424,6 +434,16 @@ :plugin/contribute "✨ Write and submit new plugin" :plugin/up-to-date "It's up to date" :plugin/custom-js-alert "Found the custom.js file, is it allowed to execute? (If you don't understand the content of this file, it is recommended not to allow execution, which has certain security risks.)" + :plugin/security-warning "Plugins can access your graph and your local files, issue network requests. + They can also cause data corruption or loss. We're working on proper access rules for your graphs. + Meanwhile, make sure you have regular backups of your graphs and only install the plugins when you can read and + understand the source code." + :plugin/search-plugin "Search plugins" + :plugin/open-preferences "Open Preferences" + :plugin/open-logseq-dir "Open" + :plugin/remote-error "Remote error: " + :plugin/checking-for-updates "Checking for plugin updates ..." + :plugin/list-of-updates "Plugin Updates: " :plugin.install-from-file/menu-title "Install from plugins.edn" :plugin.install-from-file/title "Install plugins from plugins.edn" :plugin.install-from-file/notice "The following plugins will replace your plugins:" @@ -473,6 +493,11 @@ :window/close "Close" :window/exit-fullscreen "Exit full screen" + :header/toggle-left-sidebar "Toggle left sidebar" + :header/search "Search" + :header/more "More" + :header/go-back "Go back" + :header/go-forward "Go forward" ;; Commands are nested for now to stay in sync with the shortcuts system. ;; Other languages should not nest keys under :commands :commands