Browse files

Change default :missing translation to avoid use of <>'s

  • Loading branch information...
1 parent f9612c9 commit 1c18e01f5908cf4564f402af33d8a6cc55b2f2a7 @ptaoussanis committed Apr 10, 2014
Showing with 10 additions and 5 deletions.
  1. +5 −0
  2. +1 −1 src/taoensso/tower.clj
  3. +4 −4 test/taoensso/tower/tests/main.clj
@@ -1,3 +1,8 @@
+## Pending / unreleased
+ * **CHANGE**: Default :missing translations entry now avoids <>'s (no need for html escaping).
## v2.1.0-RC1 / 2014 Mar 30
> This is a **significant update** that **may be BREAKING** in certain cases.
@@ -314,7 +314,7 @@
:with-exclaim! "<tag>**strong**</tag>"
:greeting-alias :example/greeting
- :missing "<Missing translation: [%1$s %2$s %3$s]>"}
+ :missing "|Missing translation: [%1$s %2$s %3$s]|"}
:en-US {:example {:foo ":en-US :example/foo text"}}
:de {:example {:foo ":de :example/foo text"}}
:ja "test_ja.clj" ; Import locale's map from external resource
@@ -148,16 +148,16 @@
(expect Exception ((tower/make-t {:dictionary {}}) :en :anything "Any arg"))
;;; Missing keys & key fallback
-(expect "&lt;Missing translation: [:en nil [:invalid]]&gt;"
+(expect "|Missing translation: [:en nil [:invalid]]|"
(pt :en :invalid))
(expect nil (pt :de :invalid)) ; No locale-appropriate :missing key
-(expect "&lt;Missing translation: [:en :whatever [:invalid]]&gt;"
+(expect "|Missing translation: [:en :whatever [:invalid]]|"
(with-tscope :whatever (pt :en :invalid)))
-(expect "&lt;Missing translation: [:en nil [:invalid]]&gt;"
+(expect "|Missing translation: [:en nil [:invalid]]|"
(pt :en :invalid "arg"))
(expect ":en :example/foo text"
(pt :en [:invalid :example/foo]))
-(expect "&lt;Missing translation: [:en nil [:invalid :invalid]]&gt;"
+(expect "|Missing translation: [:en nil [:invalid :invalid]]|"
(pt :en [:invalid :invalid]))
(expect "Explicit fallback" (pt :en [:invalid "Explicit fallback"]))
(expect nil (pt :en [:invalid nil]))

0 comments on commit 1c18e01

Please sign in to comment.