[gettext-u-en] string not translated
Reynard
reynard.list at gmail.com
Tue Sep 9 17:31:42 EDT 2008
currently I can work around this by calling class method to get the string
like this
----------
class GetTextMsg
def self.get_msg
_('string')
end
end
class TestController < ApplicationController
def index
render :update do |page|
page << GetTextMsg.get_msg
page.test_page
end
end
end
module TestHelper
def test_page
page << GetTextMsg.get_msg
end
end
------------
On Tue, Sep 9, 2008 at 5:17 PM, Reynard <reynard.list at gmail.com> wrote:
>
> No in either case it doesn't work correctly.
> In 1.10.0 actually it still works from inside render :update, not in 1.90.0
> in both 1.10.0 and 1.90.0 it doesn't translate when you call inside a
> function that's executed in the page context (page is
> ActionView::Helpers::PrototypeHelper::JavaScriptGenerator)
>
> I'm attaching a sample application.
>
> the expected behavior is no matter where you call it, it should translate
> the string right?
>
> - reynard
>
>
>
>
>
> On Tue, Sep 9, 2008 at 4:49 PM, Stephan Wehner <stephanwehner at gmail.com>wrote:
>
>> 2008/9/9 Reynard <reynard.list at gmail.com>:
>> > This maybe a bug?
>> >
>> > --------
>> > class TestController < ApplicationController
>> > def index
>> > render :update do |page|
>> > page << _('string') # translated string
>> > page.test_page
>> > end
>> > end
>> > end
>> >
>> > module TestHelper
>> > def test_page
>> > page << _('string') # original string
>> > end
>> > end
>> > -----------
>> >
>> > I'm using gettext 1.10.0
>> >
>> > with gettext 1.90, both of them are not translated
>>
>> You're saying this works with gettext 1.10 but not 1.90?
>>
>> I don't understand what the call to test_page does in your TestController
>> code.
>>
>> Your calling init_gettext elsewhere?
>>
>> Stephan
>> > - reynard
>> >
>> > _______________________________________________
>> > gettext-users-en mailing list
>> > gettext-users-en at rubyforge.org
>> > http://rubyforge.org/mailman/listinfo/gettext-users-en
>> >
>>
>>
>>
>> --
>> Stephan Wehner
>>
>> -> http://stephan.sugarmotor.org
>> -> http://www.thrackle.org
>> -> http://www.buckmaster.ca
>> -> http://www.trafficlife.com
>> -> http://stephansmap.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/gettext-users-en/attachments/20080909/c2349f04/attachment.html>
More information about the gettext-users-en
mailing list