Skip to content
Snippets Groups Projects
Commit 76a8441a authored by Simon Belak's avatar Simon Belak
Browse files

Group same strings

parent 1c5c9002
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment