Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: rkyrychuk/tolk
base: master
...
head fork: jobandtalent/tolk
compare: master
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
6 README.md
View
@@ -1,12 +1,12 @@
# Tolk
-Tolk is a Rails 3.1 engine designed to facilitate the translators doing the dirty work of translating your application to other languages.
+Tolk is a Rails 3.2 engine designed to facilitate the translators doing the dirty work of translating your application to other languages.
## Installation & Setup
To install add the following to your Gemfile:
````ruby
- gem 'tolk', :git => 'git://github.com/panva/tolk.git', :branch => 'master'
+ gem 'tolk', :git => 'git://github.com/jobandtalent/tolk.git', :branch => 'master'
````
To setup just run:
@@ -45,4 +45,4 @@ Upon visiting http://your_app.com/tolk - you will be presented with different op
rake tolk:dump_all
````
-This will generate yml files for all non primary locales and put them in #{Rails.root}/config/locales/ directory by default.
+This will generate yml files for all non primary locales and put them in #{Rails.root}/config/locales/ directory by default.
2  app/models/tolk/locale.rb
View
@@ -49,6 +49,8 @@ class Locale < ActiveRecord::Base
'zh' => 'Chinese'
}
+ attr_accessible :name
+
has_many :phrases, :through => :translations, :class_name => 'Tolk::Phrase'
has_many :translations, :class_name => 'Tolk::Translation', :dependent => :destroy
1  app/models/tolk/phrase.rb
View
@@ -1,5 +1,6 @@
module Tolk
class Phrase < ActiveRecord::Base
+ attr_accessible :key
validates_uniqueness_of :key
3  app/models/tolk/translation.rb
View
@@ -1,5 +1,8 @@
module Tolk
class Translation < ActiveRecord::Base
+ attr_accessible :phrase, :phrase_id, :locale, :locale_id,
+ :text, :previous_text, :primary_updated
+
scope :containing_text, lambda {|query| where("#{self.table_name}.text LIKE ?", "%#{query}%") }
serialize :text

No commit comments for this range

Something went wrong with that request. Please try again.