Update valid dicts lint and delete an unused key

pull/9572/head
Gabriel Horner 2023-06-02 16:18:01 -04:00 committed by Gabriel Horner
parent 1a59dc184f
commit f8780a910c
2 changed files with 9 additions and 1 deletions

View File

@ -115,6 +115,14 @@
"(t title" []
"(t subtitle" [:asset/physical-delete]})
(defn- whiteboard-dicts
[]
(->> (shell {:out :string}
"grep -E -oh" "\\bt\\('[^ ']+" "-r" "tldraw/apps/tldraw-logseq/src/components")
:out
string/split-lines
(map #(keyword (subs % 3)))))
(defn- validate-ui-translations-are-used
"This validation checks to see that translations done by (t ...) are equal to
the ones defined for the default :en lang. This catches translations that have
@ -129,6 +137,7 @@
string/split-lines
(map #(keyword (subs % 4)))
(concat (mapcat val manual-ui-dicts))
(concat (whiteboard-dicts))
set)
expected-dicts (set (remove #(re-find #"^(command|shortcut)\." (str (namespace %)))
(keys (:en (get-dicts)))))

View File

@ -324,7 +324,6 @@
:whiteboard/references "References"
:whiteboard/link-to-any-page-or-block "Link to any page or block"
:whiteboard/start-typing-to-search "Start typing to search..."
:whiteboard/new-block-colon "New block:"
:whiteboard/new-block-no-colon "New block"
:whiteboard/new-block "New block:"
:whiteboard/new-page "New page:"