Fork me on GitHub
#clojurescript
<
2021-06-23
>
Jakub Šťastný14:06:07

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:

isak15:06:45

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/

👍 3
Martin Mariano18:06:38

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

👍 3
galdre23:06:04

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?

galdre23:06:04

Update: 1.10.844 appears to still return :protocol-symbol.

phronmophobic23:06:27

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

galdre23:06:06

I'll check that.

galdre23:06:47

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.

👍 2
galdre23:06:00

Thanks for the idea!

galdre23:06:17

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.

thheller06:06:51

there are a couple other regressions caused by that commit already reported.