diff --git a/src/metabase/automagic_dashboards/rules.clj b/src/metabase/automagic_dashboards/rules.clj index 336110c97c2193a779c6c179aba49412e91e5fed..2f7d009f9053c693cbd11fa9f87ce1c20f903d1f 100644 --- a/src/metabase/automagic_dashboards/rules.clj +++ b/src/metabase/automagic_dashboards/rules.clj @@ -379,10 +379,11 @@ (defn- make-pot [strings] (->> strings - (sort-by second) ; keep the same context together - (map (fn [[s ctx]] - (let [ctx (str/join "/" ctx)] - (format "#: resources/%s%s.yaml\nmsgid \"%s\"\nmsgstr \"\"\n" rules-dir ctx s)))) + (group-by first) + (mapcat (fn [[s ctxs]] + (concat (for [[_ ctx] ctxs] + (format "#: resources/%s%s.yaml" rules-dir (str/join "/" ctx))) + [(format "msgid \"%s\"\nmsgstr \"\"\n" s)]))) (str/join "\n"))) (defn- all-rules