|
|
@@ -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)))))
|