I suspect that the problem is that the __("LEARN HERE")
inside:
'<div id="learn-mode" class="learw">#{__("LEARN HERE")}</div>'
is not a function call, it is just a literal string. From the fine manual:
String Interpolation, Block Strings, and Block Comments
Ruby-style string interpolation is included in CoffeeScript. Double-quoted strings allow for interpolated values, using
#{ ... }
, and single-quoted strings are literal.
So #{...}
does not do string interpolation inside single quoted strings and the I18N tools will need see the __("LEARN HERE")
call. Change your quotes to allow string interpolation and things should work better:
btnLearn.replace "<div id=\"learn-mode\" class=\"learw\">#{__("LEARN HERE")}</div>"
btnLearn.replace "<div id='learn-mode' class='learw'>#{__("LEARN HERE")}</div>"
#...