Best options for translating a rails app - ruby-on-rails

Since there are so many options there available for internationalization of a rails app, which gems or plugins are the best (today) for adding i18n support to a rails app.
Im using I18n bundled with rails for the application messages, button labels, and model attribue names.
But I also need to let the users to input content and the translated version of the content, but there are so many options for this right now that I don't really know which one to use.

We at Mynewsdesk (the guys behind the translate plugin) has moved on, now we're using Web Translate It to manage our locales. We've bloged about our translation workflow.

I like this one:
https://www.github.com/mynewsdesk/translate
because it has a nice webGUI for translating new/changed strings

Related

How do I turn a RoR view to Responsive (html5)

I have a normal view in html in Rails, containing images and links. How do I turn it to be responsive? (I want it to fit also mobile browser sizes, make it html5)
I know I should use fluid, but what is the full command? Or is there another/better way directly from the text editor?
Rails has limited control on the HTML that comes on to the browse.
Try looking at frameworks like Bootstrap or Foundation.
There are some gems that can help you
Foundation-rails
twitter-bootstrap-rails
There is also a railscast episode on Bootstrap basics.
This has nothing much to do with Rails. Rails is a server side language and responsive templates are frontend (html/css) dependent.
However if you are specifically using bootstrap as many beginners do, you could try : https://github.com/seyhunak/twitter-bootstrap-rails gem for a quick integration of things.

Rails - overriding features

I'm surprised to see how simple is to customize things in rails.
You start by installing a gem that provides some functionality you need and then you just customize what you need to.
An example is Spree, which can be customized by simply overriding templates and ruby files with custom code.
I'm just wondering who's allowing me to do this:
Is it Ruby?
Is it the architecture of these Gems?
Is it the Rails architecture?
Ruby allows meta-programming since its evaluated at runtime.
In a rails application, you can add classes like ruby String to the initializers folder and add new declarative methods, which will then be added to the String class and can be used with Strings.
Read more http://www.vitarara.org/cms/ruby_metaprogamming_declaratively_adding_methods_to_a_class
It's part rails and part ruby. Rails has been written (and has been rewritten to be more) extendable by developers and plugins over the years. Certain ways of hooking in and overriding functionality are enabled through ruby and others would be the same in many less dynamic languages.

Can an admin template be used in a Ruby on Rails web app?

I have been doing UI research and have come across admin templates at http://themeforest.net/. I was wondering how do you apply these onto a web app built on Rails. These templates look very similar to wordpress themes. Are they that easy to configure? Is it just as simple as setting up a link to the database to make the fields form capture data? I've been looking at this theme.
For admin templates I recommend using Active Admin. It's relatively easy to implement and gives you great admin screens with little effort.
Yes, You can. I'm trying to solve the same problem and so far I have a couple options:
1.) do it by hand, I've done this before, it works but takes a lot of time to truly understand how your theme is put together. First I would recommend using the included themes assets exactly as they are bundled with the theme. Don't assume that just because you have twitter-bootstrap-rails gem that the bootstrap classes in the theme will work. Link the assets statically and slowly extract out the static assets and replace them in the asset pipeline once you know they work.
2.) Use the strategy suggested in the install_theme gem (http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/) the gem itself is not maintained any longer (i'm not sure about any forks), but the strategy is sound. Extract the core parts of the template into partials.
The short answer is yes, but there is no straight forward way to "import to rails"

ruby on rails 3.1 web design

May I ask you how to make rails web design more efficient?
Is compass plus blueprint the perfect match?
Is the current version of compass support rails3.1
Are there any other frameworks that will make rails web deign easier?
Thanks
Definitely a framework like compass is awesome, it includes a lot of helpers, and provides a good solid base.
For form-styling I would recommend using a gem like [formtastic][1], which not only greatly simplifies making forms, but also provides a standard css file. So all needed tags are then known (and can be overwritten if needed).
There a few alternatives to kickstart your application's layout:
twitter-bootstrap: it is plainly awesome and provides a great start (it does not play nice with formtastic, but works perfectly well with simple_form).
web-app-theme provides generators, and a set of templates to style your application quickly
activo is a template that is contained in web-app-theme, but can also be used standalone
Hope this helps.

Is Prince the best way to create PDFs in Ruby on Rails?

After several Google searches, it appears that the way to create PDFs in Rails from HTML and CSS (versus a new markup language) is to use Prince.
With licensing at $3800 for my non-big-commercial app, I'm wondering if this is, in fact, consensus or people have an alternative they can share the whats and hows.
You may check out prawn too. Tutorial can be found on railscasts.com.
This may fit the bill: http://code.google.com/p/wkhtmltopdf/
We tried tow solutions:
using latex generate pdf, there is ruby gem code rtex
using java library iText, use it you may need rjb which allow you using java lib directly in ruby code, just like jruby, but you don't need build all you application on jruby.
I create tons of different PDF files on the fly from various data sources using Rails, including finest layout. I create need to create them for presenting products to customers.
After having tried all the tools mentioned above, Prince is the best tool for this task.
Prince's rendering quality & CSS support (better than some browsers) is its main selling point. If you're only generating documents with simple layouts, stick with Prawn.

Resources