taoensso / tower

i18n & L10n library for Clojure/Script
https://www.taoensso.com/tower
Eclipse Public License 1.0
278 stars 24 forks source link

README: Info about msg with arguments #46

Closed holyjak closed 10 years ago

holyjak commented 10 years ago
ptaoussanis commented 10 years ago

Hey Jakub - this looks good, thank you!

The goog.string.format used to format messages with arguments handles nil argument as a missing argument (while Java just prints the string "null").

As an alternative, would you maybe like to submit a patch that makes this behaviour consistent between platforms? I actually hadn't noticed the difference myself. Maybe a simple mod to Encore's cljs format fn like (map #(if (nil? %) "nil" %) args)? What do you think?

Cheers! :-)

holyjak commented 10 years ago

Hi Peter, sorry for the late reply, I've been more busy than expected. Yes, I will send a PR.

holyjak commented 10 years ago

Hi Peter, I have been mistaken, goog.format that format a null %s as null (and %d as NaN). I have removed that part from the patch.

ptaoussanis commented 10 years ago

Great, looks good - thank you!