[wip] chore: use fully namespaced keys

pull/8722/head
Konstantinos Kaloutas 2023-03-03 15:08:09 +02:00
parent 394daaf312
commit 094648eae3
7 changed files with 4522 additions and 4464 deletions

View File

@ -569,7 +569,7 @@
:else
(let [original-name (util/get-page-original-name page-entity)
s (cond untitled?
(t :untitled)
(t ::untitled)
;; The page-name-in-block generated by the auto-complete is not page-name-sanitized
(pdf-utils/hls-file? page-name)

View File

@ -66,7 +66,7 @@
[]
[:div.flex-1.overflow-hidden
[:h1.title
(t :all-files)]
(t ::all-files)]
(files-all)
])

View File

@ -275,7 +275,7 @@
:on-key-down (fn [^js e]
(when (= (gobj/get e "key") "Enter")
(blur-fn e)))
:placeholder (when untitled? (t :untitled))
:placeholder (when untitled? (t ::untitled))
:on-key-up (fn [^js e]
;; Esc
(when (= 27 (.-keyCode e))
@ -334,7 +334,7 @@
:data-ref page-name
:style {:opacity (when @*edit? 0)}}
(cond @*edit? [:span {:style {:white-space "pre"}} (rum/react *input-value)]
untitled? [:span.opacity-50 (t :untitled)]
untitled? [:span.opacity-50 (t ::untitled)]
:else title)]]])))
(defn- page-mouse-over
@ -926,7 +926,7 @@
(reset! *current-page 1))]
[:div.flex-1.cp__all_pages
[:h1.title (t :all-pages)]
[:h1.title (t ::all-pages)]
[:div.text-sm.ml-1.opacity-70.mb-4 (t ::pagination-pages total-items)]
@ -1057,7 +1057,7 @@
(refresh-pages))))
(notification/show! (t ::no-orphaned-pages) :success))))}
:icon (ui/icon "file-x")}
{:title (t :all-files)
{:title (t ::all-files)
:options {:href (rfe/href :all-files)}
:icon (ui/icon "files")}]
{})]]

View File

@ -89,7 +89,7 @@
(route-handler/redirect-to-page! name {:click-from-recent? recent?})))))}
[:span.page-icon (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)]
[:span.page-title {:class (when untitiled? "opacity-50")}
(if untitiled? (t :untitled)
(if untitiled? (t ::untitled)
(pdf-utils/fix-local-asset-pagename original-name))]]))
(defn get-page-icon [page-entity]

View File

@ -166,7 +166,7 @@
[:div.flex.w-full.items-center
[:div.dashboard-card-title-name.font-bold
(if (model/untitled-page? page-name)
[:span.opacity-50 (t :untitled)]
[:span.opacity-50 (t ::untitled)]
(get-page-display-name page-name))]
[:div.flex-1]
[:div.dashboard-card-checkbox

File diff suppressed because it is too large Load Diff

View File

@ -98,23 +98,23 @@
[name path-params]
(case name
:home
"Logseq"
(t ::home)
:repos
"Repos"
(t ::repos)
:repo-add
"Add another repo"
(t ::repo-add)
:graph
(t ::graph)
:all-files
(t :all-files)
(t ::all-files)
:all-pages
(t :all-pages)
(t ::all-pages)
:all-journals
(t ::all-journals)
:file
(str "File " (:path path-params))
(t ::file (:path path-params))
:new-page
"Create a new page"
(t ::new-page)
:page
(let [name (:name path-params)
block? (util/uuid-string? name)]
@ -125,20 +125,20 @@
(if (> (count content) 48)
(str (subs content 0 48) "...")
content))
"Page no longer exists!!")
(t ::page-no-longer-exists))
(let [page (db/pull [:block/name (util/page-name-sanity-lc name)])]
(or (util/get-page-original-name page)
"Logseq"))))
:tag
(str "#" (:name path-params))
(str "#" (:name path-params))
:diff
"Git diff"
(t ::diff)
:draw
"Draw"
(t ::draw)
:settings
"Settings"
(t ::settings)
:import
"Import data into Logseq"
(t ::import)
"Logseq"))
(defn update-page-title!