Sha256: ee3e3db57ee8797e99dfd3bc47eb84daad86fcefda92e91c4d5b4bab242563a7
Contents?: true
Size: 1.94 KB
Versions: 6
Compression:
Stored size: 1.94 KB
Contents
Ruby-GetText Sample blog for Ruby on Rails and Ruby-GetText-Package. Requirement ----------- * ruby-1.8.6 or later * rails-2.3.0 or later * rake * sqlite3, sqlite3-ruby gettext family gems: * locale * locale_rails * gettext * gettext_activerecord * gettext_rails (= this library) Installation ------------ 1. Setup rails and sqlite3, Ruby-GetText-Package. 2. Create DB and a table * Edit config/database.yml for your environment. * rake db:create * rake db:schema:load (rake db:create RAILS_ENV=test (for testing)) 3. Then run the http server. $ ruby script/server Access the http server from WWW browser: http://localhost:3000/articles Files ----- * lib/tasks/gettext.rake - a rake file for Ruby-GetText-Package. You need to modify this for your application. ":makemo" task which creates mo files from po files. ":updatepo" task which updates pot/po files from po files. If there is no po/*pot files, it creates po/*.pot. * app/controllers/application.rb - Bind a textdomain to your application. The most important file in this sample. * app/controllers/articles_controller.rb - The main controller which localized. * app/models/article.rb - a model which localized. * app/helpers/articles_helper.rb - a localized helper. * app/views/**/*.erb - Localized ERB files. * vendor/plugins/lang_helper/* - a localized "Vendor plugin". It has its own textdomain. - See vendor/plugins/lang_helper/README for more details. * po/* (blog.po[t]) - Catalog files which translators edit. They are convert to mofiles by "rake makemo". - blog.po[t] is for articles_controller and its views. * db/schema.rb - A file to create a database table with rake db:schema:load. * public/stylesheets/blog.css - a CSS file for this sample. * test/functional/articles_controller_test.rb - a test script. * others - Generated by rails and I've not touched them.
Version data entries
6 entries across 6 versions & 1 rubygems