mirror of
https://github.com/penpot/penpot.git
synced 2025-06-08 18:51:39 +02:00
feat(frontend): improve i18n
This commit is contained in:
parent
bd11b5864b
commit
c98e89278f
11 changed files with 70 additions and 52 deletions
|
@ -6,13 +6,24 @@
|
|||
|
||||
(ns uxbox.view
|
||||
(:require [uxbox.config]
|
||||
[uxbox.view.locales :as lc]
|
||||
[uxbox.view.store :as st]
|
||||
[uxbox.view.ui :as ui]))
|
||||
[uxbox.view.ui :as ui]
|
||||
[uxbox.main.locales.en :as en]
|
||||
[uxbox.main.locales.fr :as fr]
|
||||
[uxbox.util.i18n :as i18n]))
|
||||
|
||||
(i18n/update-locales! (fn [locales]
|
||||
(-> locales
|
||||
(assoc :en en/locales)
|
||||
(assoc :fr fr/locales))))
|
||||
|
||||
(i18n/on-locale-change!
|
||||
(fn [new old]
|
||||
(println "Locale changed from" old " to " new)
|
||||
(ui/init)))
|
||||
|
||||
(defn ^:export init
|
||||
[]
|
||||
(lc/init)
|
||||
(st/init)
|
||||
(ui/init-routes)
|
||||
(ui/init))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue