mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 15:09:41 +00:00
Update valid dicts lint and delete an unused key
This commit is contained in:
committed by
Gabriel Horner
parent
1a59dc184f
commit
f8780a910c
@@ -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)))))
|
||||
|
||||
Reference in New Issue
Block a user