From 1c5c9002e6a4ca15fae7b0dbcb8b739943ac8a41 Mon Sep 17 00:00:00 2001 From: Simon Belak <simon@metabase.com> Date: Thu, 25 Oct 2018 11:35:59 +0200 Subject: [PATCH] Don't use msgctxt --- src/metabase/automagic_dashboards/rules.clj | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/metabase/automagic_dashboards/rules.clj b/src/metabase/automagic_dashboards/rules.clj index 5eb90313cff..336110c97c2 100644 --- a/src/metabase/automagic_dashboards/rules.clj +++ b/src/metabase/automagic_dashboards/rules.clj @@ -361,7 +361,7 @@ [path] (get-in @rules (concat path [::leaf]))) -(defn- extract-i18n-strings +(defn- extract-localized-strings [[path rule]] (let [strings (atom [])] ((spec/run-checker @@ -382,8 +382,7 @@ (sort-by second) ; keep the same context together (map (fn [[s ctx]] (let [ctx (str/join "/" ctx)] - (format "#: resources/%s%s.yaml\nmsgctxt \"%s\"\nmsgid \"%s\"\nmsgstr \"\"\n" - rules-dir ctx ctx s)))) + (format "#: resources/%s%s.yaml\nmsgid \"%s\"\nmsgstr \"\"\n" rules-dir ctx s)))) (str/join "\n"))) (defn- all-rules @@ -401,7 +400,7 @@ "Entry point for lein task `generate-automagic-dashboards-pot`" [& _] (->> (all-rules) - (mapcat extract-i18n-strings) + (mapcat extract-localized-strings) make-pot (spit "locales/metabase-automatic-dashboards.pot")) (System/exit 0)) -- GitLab