Permalink
Browse files

`fmt-msg` docstring hk

  • Loading branch information...
1 parent fe24fc4 commit cf0aeefc8552b0e14c4523cc63579c36f2e20e50 @ptaoussanis committed Mar 7, 2014
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/taoensso/tower.clj
View
@@ -187,11 +187,11 @@
^String [loc fmt & args] (String/format (locale loc) fmt (to-array args)))
(defn fmt-msg
- "Creates a localized message formatter and parse pattern string, substituting
- given arguments as per MessageFormat spec."
- ^String [loc pattern & args]
- (let [formatter (java.text.MessageFormat. pattern (locale loc))]
- (.format formatter (to-array args))))
+ "Creates a localized MessageFormat and uses it to format given pattern string,
+ substituting arguments as per MessageFormat spec."
+ ^String [loc ^String pattern & args]
+ (let [mformat (java.text.MessageFormat. pattern (locale loc))]
+ (.format mformat (to-array args))))
(comment
(fmt-msg :de "foobar {0}!" 102.22)

0 comments on commit cf0aeef

Please sign in to comment.