8000 Don't understand :missing-resource-fn · Issue #9 · taoensso/tempura · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't understand :missing-resource-fn #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brjann opened this issue Mar 28, 2017 · 3 comments
Closed

Don't understand :missing-resource-fn #9

brjann opened this issue Mar 28, 2017 · 3 comments
Labels

Comments

@brjann
Copy link
brjann commented Mar 28, 2017

I'm trying to use the :missing-resource-fn option to handle translation keys without a corresponding resource. But I can't get it to work. I would expect the following code to return "missing" but instead it returns nothing. Help much appreciated.

(tr
  {:missing-resource-fn (fn [x] "missing")
   :dict {:en {
               :example {:x "Hello %1"
                         :z "Goodbye %1, it was nice to meet you!"}}}}
  [:en]
  [:example/y]
  ["Steve"])
@ptaoussanis
Copy link
Member

Hi @brjann, you understand just fine - you've just discovered a silly bug :-)

Thanks for the report, should be fixed with [com.taoensso/tempura "1.1.2"] (on Clojars now).

Cheers!

@brjann
Copy link
Author
brjann commented Mar 28, 2017

Awesome, thanks!

@ptaoussanis
Copy link
Member

No problem, appreciate the report :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0