mutoh / gettext_rails Goto Github PK
View Code? Open in Web Editor NEWRuby on Rails (>=2.3) localization support with Ruby-GetText-Package.
Home Page: http://www.rubyforge.org/projects/gettext/
License: Other
Ruby on Rails (>=2.3) localization support with Ruby-GetText-Package.
Home Page: http://www.rubyforge.org/projects/gettext/
License: Other
I'm unable to render a JSON response from my controller, because every time when I try with 'render :json => result' I get the following error:
ActionView::MissingTemplate (Missing template offer/search_items_json.erb in view path app/views):
/usr/lib/ruby/gems/1.8/gems/locale_rails-2.0.4/lib/locale_rails/action_view.rb:46:in `find_template'
public/dispatch.fcgi:24
it looks like that the gettext is eating the :json parameter as it their parameter
Hi,
When translating messages in a layout, GetText takes most of the request time to translate the message, because it seems that its domaintext isn't set (even if we force it with GetText.bindtextdomain).
For example, just rendering the following code in a layout takes more than 30s, where it takes less than a second when the code is in a view. Am I doing something wrong to have such difference between a layout and a view rendering?
Regards.
<% 1000.times.each do |i| %>
<%= _("toto #{i}") %>
<% end %>
I've install gettext_rails and the other gems, active record validation errors are translated, but distance_of_time_in_words gives me an error:
With gettext_rails 2.2.0 and Rails 2.3.8 (was also a case with older Rails for sure) localized implicit multipart views (in the form on foo.text.plain.erb, foo.text.html.erb, foo_el_GR.text.plain.erb, foo_el_GR.text.html.erb) do not work. The default views are always rendered regardless of the current locale. The reason (in essence) is the the original_template_path that's passed to find_template_with_locale_rails is already initialized and (responds to :render) and thus find_template_with_locale_rails returns it as is without trying to localize it.
Here's an ugly monkey patch for ActionMailer::Base#create! that provides a workaround for this issue : https://gist.github.com/663970
Let me know if this should go into gettext_rails instead
It seems that version 2.2.0 of gettext_rails, the one that supports Rails 2.3.5, has not been pushed to RubyGems.
Masao, I know I sent you an email about this, this is just so others can see the issue too, comment and keep track of it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.