0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

Merge pull request #4843 from penpot/eva-remove-unused-locale-fn

♻️  Remove unused locale fn
This commit is contained in:
Belén Albeza 2024-07-05 09:22:24 +02:00 committed by GitHub
commit e492284abe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 25 deletions

View file

@ -18,16 +18,12 @@ $lh-115: 1.15;
$lh-133: 1.33;
$size-4: 1rem;
:root {
--font-family: "worksans", "vazirmatn", sans-serif;
}
body {
background-color: var(--db-primary);
color: var(--df-primary);
display: flex;
flex-direction: column;
font-family: var(--font-family);
font-family: "worksans", "vazirmatn", sans-serif;
width: 100vw;
height: 100vh;
overflow: hidden;

View file

@ -317,8 +317,7 @@
(effect [_ _ _]
;; We prefer to keek some stuff in the storage like the current-team-id and the profile
(swap! storage dissoc :redirect-url)
(set-current-team! nil)
(i18n/reset-locale)))))
(set-current-team! nil)))))
(defn logout
([] (logout {}))

View file

@ -10,7 +10,6 @@
[app.common.data :as d]
[app.common.logging :as log]
[app.config :as cfg]
[app.util.dom :as dom]
[app.util.globals :as globals]
[app.util.storage :refer [storage]]
[cuerdas.core :as str]
@ -106,23 +105,6 @@
(swap! storage assoc ::locale lname)
(reset! locale lname))))
(defn reset-locale
"Set the current locale to the browser detected one if it is
supported or default locale if not."
[]
(swap! storage dissoc ::locale)
(reset! locale (autodetect)))
(add-watch locale "browser-font"
(fn [_ _ _ locale]
(log/info :hint "locale changed" :locale locale)
(dom/set-html-lang! locale)
(let [node (dom/get-body)]
(if (or (= locale "fa")
(= locale "ar"))
(dom/set-css-property! node "--font-family" "'vazirmatn', 'worksans', sans-serif")
(dom/unset-css-property! node "--font-family")))))
(deftype C [val]
IDeref
(-deref [_] val))