From a3990fe61b3b5efdc058fa172c76e0743578c6bb Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Thu, 20 Sep 2018 11:14:43 +0300 Subject: [PATCH] fix translations for locales with underscore (like es_419) --- src/status_im/i18n.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/status_im/i18n.cljs b/src/status_im/i18n.cljs index fb4368da35..d0fcc1a322 100644 --- a/src/status_im/i18n.cljs +++ b/src/status_im/i18n.cljs @@ -14,7 +14,11 @@ ;; translations (def translations-by-locale (->> (i18n/translations [:en :ko :ru :pl :es_419]) - (map (fn [[k t]] [k (types/json->clj t)])) + (map (fn [[k t]] + (let [k' (-> (name k) + (string/replace "_" "-") + keyword)] + [k' (types/json->clj t)]))) (into {}))) ;; english as source of truth