RTeX #l steals I18n #l
-
David Cato
After thinking about this a bit further, it seems that the following version of latex_escape might do the trick and allow RTeX to coexist with Rails' I18n code.
@@@ruby def latex_escape(*args) if Thread.current[:_rendering_rtex]
RTeX::Document.escape(*args)elsif self.respond_to?(:localize)
localize(*args)end end
At least it does the right thing in my application and tests that were previously failing because the code expected l() to be aliased to localize() are now passing, and the code that expects l() to be aliased to latex\_escape() is still passing. -
David Cato
Well, my attempt at including a block of code appears to have failed so I'm attaching it instead.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
