Hey guys! I'm looking for a recommendation for an M17n/internalisation library for Reagent. I'm mostly interested just in M17n, so just plain old translations, less bothered by full internalisation, date formats and such. Something light and simple preferably 🙏:skin-tone-3:
I can't recommend mozilla fluent enough. I am using it in a big project of mine and it has been a breeze. Interop very easily with js. https://github.com/projectfluent/fluent.js/ and https://github.com/projectfluent/fluent.js/tree/master/fluent-react
I'm pretty happy with https://github.com/ptaoussanis/tempura
This isn't a library, but some macros/functions that we use at my work: https://www.isaksky.com/posts/macro-assisted-translations-in-clojurescript/
In Clojurescript 1.10.773, I could reliably tell whether a symbol sym
(at macro-expansion time) referred to a protocol by examining the following:
(:protocol-symbol (cljs.analyzer.api/resolve &env sym))
When I update to Clojurescript 1.10.866, this doesn't seem to work any longer. As far as I can tell, nothing obvious has changed in the code -- defprotocol
still attaches this data, and cljs.core
still https://github.com/clojure/clojurescript/blob/ac23fec265bdf0ca971eb35c16da4b59191da5ca/src/main/clojure/cljs/core.cljc#L1421. Is there a better / supported way to do this?@thheller Thank you!
Update: 1.10.844 appears to still return :protocol-symbol
.
Are you clearing the cache before building? It's been a while, but I remember some var information only being available when building from scratch
I'll check that.
Yeah, unless I'm doing something very wrong, that's not the issue here; also, our CI also is failing on 866, and afaik it's building cacheless.
dang
Thanks for the idea!
I've narrowed down the commit that breaks my tool to this one: https://github.com/clojure/clojurescript/commit/a8422ee060d7d98f7578c9acb2824a5e346e7958 I'll try to take time later to read through and understand how.