Split out command and category descs

Move them to a more appropriate ns that is just dictionary focused.
This _majorly_ slims down dependencies for the main translation ns
Also:
- add tests
- make medley requires consistent
- alter spec to reflect how command data is actually being used in
  command palette component
- add basic translation tests
This commit is contained in:
Gabriel Horner
2022-03-25 16:42:43 -04:00
parent 21e172feb6
commit 5635469d7a
11 changed files with 812 additions and 773 deletions

View File

@@ -6,7 +6,7 @@
[frontend.handler.notification :as notifications]
[camel-snake-kebab.core :as csk]
[frontend.state :as state]
[medley.core :as md]
[medley.core :as medley]
[frontend.fs :as fs]
[electron.ipc :as ipc]
[cljs-bean.core :as bean]
@@ -234,7 +234,7 @@
(defn unregister-plugin-slash-command
[pid]
(swap! state/state md/dissoc-in [:plugin/installed-commands (keyword pid)]))
(swap! state/state medley/dissoc-in [:plugin/installed-commands (keyword pid)]))
(def keybinding-mode-handler-map
{:global :shortcut.handler/editor-global
@@ -278,7 +278,7 @@
(defn unregister-plugin-simple-command
[pid]
(swap! state/state md/dissoc-in [:plugin/simple-commands (keyword pid)]))
(swap! state/state medley/dissoc-in [:plugin/simple-commands (keyword pid)]))
(defn register-plugin-ui-item
[pid {:keys [type] :as opts}]
@@ -498,7 +498,7 @@
;; effects
(unregister-plugin-themes pid)
;; plugins
(swap! state/state md/dissoc-in [:plugin/installed-plugins pid])
(swap! state/state medley/dissoc-in [:plugin/installed-plugins pid])
;; commands
(clear-commands! pid))))