Add Globalize2 so that we get some nice fall backs to other languages when a translation is missing in the requested language.
This commit is contained in:
parent
6ba51da46e
commit
283a3e9ba9
42 changed files with 2670 additions and 0 deletions
0
vendor/plugins/globalize2/generators/db_backend.rb
vendored
Normal file
0
vendor/plugins/globalize2/generators/db_backend.rb
vendored
Normal file
25
vendor/plugins/globalize2/generators/templates/db_backend_migration.rb
vendored
Normal file
25
vendor/plugins/globalize2/generators/templates/db_backend_migration.rb
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
class ActsAsTaggableMigration < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :globalize_translations do |t|
|
||||
t.string :locale, :null => false
|
||||
t.string :key, :null => false
|
||||
t.string :translation
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
# TODO: FINISH DOING MIGRATION -- stopped in the middle
|
||||
|
||||
create_table :globalize_translations_map do |t|
|
||||
t.string :key, :null => false
|
||||
t.integer :translation_id, :null => false
|
||||
end
|
||||
|
||||
add_index :taggings, :tag_id
|
||||
add_index :taggings, [:taggable_id, :taggable_type]
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :globalize_translations
|
||||
drop_table :tags
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue