Refactor and simplify dicts

- frontend.dicts encapsulates dicts behavior for all other namespaces
- Each dict ns only has one var which prepares us
- No longer need shortcut.dicts
- Fix remaining lints that were broken
- Also bring back frontend.dicts
- Update guide
- Add a false binding to :editor/toggle-undo-redo-mode which throws a
  needless warning
This commit is contained in:
Gabriel Horner
2023-05-18 18:13:50 -04:00
parent 0434a2b7f8
commit 514b5faf6e
28 changed files with 383 additions and 446 deletions

View File

@@ -2,13 +2,11 @@
"This ns is a system component that handles translation for the entire
application. The ns dependencies for this ns must be small since it is used
throughout the application."
(:require [frontend.dicts.core :as dicts]
[frontend.modules.shortcut.dicts :as shortcut-dicts]
(:require [frontend.dicts :as dicts]
[tongue.core :as tongue]
[frontend.state :as state]))
(def dicts
(merge-with merge dicts/dicts shortcut-dicts/dicts))
(def dicts (merge dicts/dicts {:tongue/fallback :en}))
(def translate
(tongue/build-translate dicts))