tr8n 3.1.5 → 3.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/.gitignore +5 -1
  2. data/.rvmrc +1 -1
  3. data/Gemfile.lock +5 -5
  4. data/README.rdoc +36 -17
  5. data/app/assets/javascripts/tr8n/tr8n.js +31 -19
  6. data/app/controllers/tr8n/help_controller.rb +12 -2
  7. data/app/models/tr8n/language.rb +7 -3
  8. data/app/models/tr8n/translation.rb +11 -8
  9. data/app/models/tr8n/translation_domain.rb +1 -1
  10. data/app/models/tr8n/translation_key.rb +29 -13
  11. data/app/models/tr8n/translation_key_source.rb +0 -1
  12. data/app/models/tr8n/translation_source.rb +5 -5
  13. data/app/models/tr8n/translation_source_language.rb +39 -0
  14. data/app/models/tr8n/translator.rb +2 -11
  15. data/app/views/tr8n/common/_language_strip.html.erb +1 -1
  16. data/app/views/tr8n/common/_scripts.html.erb +3 -4
  17. data/app/views/tr8n/help/lb_shortcuts.html.erb +23 -22
  18. data/app/views/tr8n/help/lb_stats.html.erb +63 -0
  19. data/bin/tr8n.rb +24 -0
  20. data/db/migrate/20100405201417_create_tr8n_tables.rb +1 -1
  21. data/db/migrate/20111003194443_create_tr8n_sync_tables.rb +23 -0
  22. data/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +23 -0
  23. data/db/migrate/20111026230545_create_tr8n_translation_source_languages.rb +34 -0
  24. data/{config → lib/generators/tr8n/templates/config}/tr8n/config.yml +18 -14
  25. data/{config → lib/generators/tr8n/templates/config}/tr8n/data/ip_locations.csv +0 -0
  26. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_date_rules.yml +0 -0
  27. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_gender_list_rules.yml +0 -0
  28. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_gender_rules.yml +0 -0
  29. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_language_cases.yml +0 -0
  30. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_list_rules.yml +0 -0
  31. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_numeric_rules.yml +0 -0
  32. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_value_rules.yml +0 -0
  33. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/default_glossary.yml +0 -0
  34. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/default_languages.yml +0 -0
  35. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/features.yml +1 -6
  36. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/shortcuts.yml +4 -0
  37. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/sitemap.json +0 -0
  38. data/{config → lib/generators/tr8n/templates/config}/tr8n/tokens/data.yml +0 -0
  39. data/{config → lib/generators/tr8n/templates/config}/tr8n/tokens/decorations.yml +0 -0
  40. data/lib/generators/tr8n/templates/db/create_tr8n_tables.rb +77 -55
  41. data/lib/generators/tr8n/tr8n_generator.rb +1 -1
  42. data/lib/tr8n/cache.rb +109 -8
  43. data/lib/tr8n/config.rb +14 -4
  44. data/lib/tr8n/extensions/action_controller_extension.rb +36 -38
  45. data/lib/tr8n/extensions/action_view_extension.rb +3 -17
  46. data/lib/tr8n/extensions/date_extension.rb +0 -1
  47. data/lib/tr8n/extensions/hash_extension.rb +66 -0
  48. data/lib/tr8n/extensions/string_extension.rb +1 -1
  49. data/lib/tr8n/extensions/time_extension.rb +0 -1
  50. data/lib/tr8n/version.rb +1 -1
  51. data/local/tr8n_server/app/views/layouts/_footer.html.erb +1 -1
  52. data/local/tr8n_server/config/tr8n/config.yml +18 -14
  53. data/local/tr8n_server/config/tr8n/site/features.yml +1 -6
  54. data/local/tr8n_server/config/tr8n/site/shortcuts.yml +4 -0
  55. data/local/tr8n_server/db/migrate/20110930041150_create_tr8n_tables.rb +78 -56
  56. data/local/tr8n_server/db/schema.rb +10 -1
  57. metadata +56 -61
  58. data/app/views/tr8n/help/lb_credits.html.erb +0 -9
  59. data/local/tr8n_server/app/views/layouts/tr8n.html.erb +0 -51
  60. data/local/tr8n_server/app/views/layouts/tr8n_admin.html.erb +0 -61
  61. data/local/tr8n_server/db/migrate/20111003194443_create_tr8n_sync_tables.rb +0 -22
  62. data/local/tr8n_server/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +0 -5
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2010-2011 Michael Berkovich
2
+ # Copyright (c) 2010-2012 Michael Berkovich, tr8n.net
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining
5
5
  # a copy of this software and associated documentation files (the
@@ -37,7 +37,7 @@ class CreateTr8nTables < ActiveRecord::Migration
37
37
  t.string :facebook_key
38
38
  t.timestamps
39
39
  end
40
- add_index :tr8n_languages, [:locale]
40
+ add_index :tr8n_languages, [:locale], :name => :tr8n_ll
41
41
 
42
42
  create_table :tr8n_language_rules do |t|
43
43
  t.integer :language_id, :null => false
@@ -46,8 +46,8 @@ class CreateTr8nTables < ActiveRecord::Migration
46
46
  t.text :definition
47
47
  t.timestamps
48
48
  end
49
- add_index :tr8n_language_rules, [:language_id]
50
- add_index :tr8n_language_rules, [:language_id, :translator_id]
49
+ add_index :tr8n_language_rules, [:language_id], :name => :tr8n_lr_l
50
+ add_index :tr8n_language_rules, [:language_id, :translator_id], :name => :tr8n_lr_lt
51
51
 
52
52
  create_table :tr8n_language_cases do |t|
53
53
  t.integer :language_id, :null => false
@@ -59,9 +59,9 @@ class CreateTr8nTables < ActiveRecord::Migration
59
59
  t.string :application
60
60
  t.timestamps
61
61
  end
62
- add_index :tr8n_language_cases, [:language_id]
63
- add_index :tr8n_language_cases, [:language_id, :translator_id]
64
- add_index :tr8n_language_cases, [:language_id, :keyword]
62
+ add_index :tr8n_language_cases, [:language_id], :name => :tr8n_lc_l
63
+ add_index :tr8n_language_cases, [:language_id, :translator_id], :name => :tr8n_lc_lt
64
+ add_index :tr8n_language_cases, [:language_id, :keyword], :name => :tr8n_lc_lk
65
65
 
66
66
  create_table :tr8n_language_case_value_maps do |t|
67
67
  t.string :keyword, :null => false
@@ -71,8 +71,8 @@ class CreateTr8nTables < ActiveRecord::Migration
71
71
  t.boolean :reported
72
72
  t.timestamps
73
73
  end
74
- add_index :tr8n_language_case_value_maps, [:keyword, :language_id]
75
- add_index :tr8n_language_case_value_maps, [:translator_id]
74
+ add_index :tr8n_language_case_value_maps, [:keyword, :language_id], :name => :tr8n_lcvm_kl
75
+ add_index :tr8n_language_case_value_maps, [:translator_id], :name => :tr8n_lcvm_t
76
76
 
77
77
  create_table :tr8n_language_users do |t|
78
78
  t.integer :language_id, :null => false
@@ -81,11 +81,11 @@ class CreateTr8nTables < ActiveRecord::Migration
81
81
  t.boolean :manager, :default => false
82
82
  t.timestamps
83
83
  end
84
- add_index :tr8n_language_users, [:user_id]
85
- add_index :tr8n_language_users, [:language_id, :user_id]
86
- add_index :tr8n_language_users, [:language_id, :translator_id]
87
- add_index :tr8n_language_users, [:created_at]
88
- add_index :tr8n_language_users, [:updated_at]
84
+ add_index :tr8n_language_users, [:user_id], :name => :tr8n_lu_u
85
+ add_index :tr8n_language_users, [:language_id, :user_id], :name => :tr8n_lu_lu
86
+ add_index :tr8n_language_users, [:language_id, :translator_id], :name => :tr8n_lu_lt
87
+ add_index :tr8n_language_users, [:created_at], :name => :tr8n_lu_ca
88
+ add_index :tr8n_language_users, [:updated_at], :name => :tr8n_lu_ua
89
89
 
90
90
  create_table :tr8n_language_metrics do |t|
91
91
  t.string :type
@@ -100,8 +100,8 @@ class CreateTr8nTables < ActiveRecord::Migration
100
100
 
101
101
  t.timestamps
102
102
  end
103
- add_index :tr8n_language_metrics, [:language_id]
104
- add_index :tr8n_language_metrics, [:created_at]
103
+ add_index :tr8n_language_metrics, [:language_id], :name => :tr8n_lm_l
104
+ add_index :tr8n_language_metrics, [:created_at], :name => :tr8n_lm_c
105
105
 
106
106
  create_table :tr8n_translators do |t|
107
107
  t.integer :user_id, :null => false
@@ -121,12 +121,13 @@ class CreateTr8nTables < ActiveRecord::Migration
121
121
  t.integer :manager
122
122
  t.string :last_ip
123
123
  t.string :country_code
124
+ t.integer :remote_id
124
125
  t.timestamps
125
126
  end
126
- add_index :tr8n_translators, [:user_id]
127
- add_index :tr8n_translators, [:created_at]
128
- add_index :tr8n_translators, [:email]
129
- add_index :tr8n_translators, [:email, :password]
127
+ add_index :tr8n_translators, [:user_id], :name => :tr8n_t_u
128
+ add_index :tr8n_translators, [:created_at], :name => :tr8n_t_c
129
+ add_index :tr8n_translators, [:email], :name => :tr8n_t_e
130
+ add_index :tr8n_translators, [:email, :password], :name => :tr8n_t_ep
130
131
 
131
132
  create_table :tr8n_translator_logs do |t|
132
133
  t.integer :translator_id
@@ -137,9 +138,9 @@ class CreateTr8nTables < ActiveRecord::Migration
137
138
  t.string :reference
138
139
  t.timestamps
139
140
  end
140
- add_index :tr8n_translator_logs, [:translator_id]
141
- add_index :tr8n_translator_logs, [:user_id]
142
- add_index :tr8n_translator_logs, [:created_at]
141
+ add_index :tr8n_translator_logs, [:translator_id], :name => :tr8n_tl_t
142
+ add_index :tr8n_translator_logs, [:user_id], :name => :tr8n_tl_u
143
+ add_index :tr8n_translator_logs, [:created_at], :name => :tr8n_tl_c
143
144
 
144
145
  create_table :tr8n_translator_metrics do |t|
145
146
  t.integer :translator_id, :null => false
@@ -152,13 +153,13 @@ class CreateTr8nTables < ActiveRecord::Migration
152
153
  t.integer :rejected_translations, :default => 0
153
154
  t.timestamps
154
155
  end
155
- add_index :tr8n_translator_metrics, [:translator_id]
156
- add_index :tr8n_translator_metrics, [:translator_id, :language_id]
157
- add_index :tr8n_translator_metrics, [:created_at]
156
+ add_index :tr8n_translator_metrics, [:translator_id], :name => :tr8n_tm_t
157
+ add_index :tr8n_translator_metrics, [:translator_id, :language_id], :name => :tr8n_tm_tl
158
+ add_index :tr8n_translator_metrics, [:created_at], :name => :tr8n_tm_c
158
159
 
159
160
  create_table :tr8n_translation_keys do |t|
160
161
  t.string :type
161
- t.string :key, :null => false
162
+ t.string :key, :null => false
162
163
  t.text :label, :null => false
163
164
  t.text :description
164
165
  t.timestamp :verified_at
@@ -166,16 +167,17 @@ class CreateTr8nTables < ActiveRecord::Migration
166
167
  t.boolean :admin
167
168
  t.string :locale
168
169
  t.integer :level, :default => 0
170
+ t.timestamp :synced_at
169
171
  t.timestamps
170
172
  end
171
- add_index :tr8n_translation_keys, [:key], :unique => true
173
+ add_index :tr8n_translation_keys, [:key], :unique => true, :name => :tr8n_tk_k
172
174
 
173
175
  create_table :tr8n_translation_sources do |t|
174
176
  t.string :source
175
177
  t.integer :translation_domain_id
176
178
  t.timestamps
177
179
  end
178
- add_index :tr8n_translation_sources, [:source], :name => "tr8n_sources_source"
180
+ add_index :tr8n_translation_sources, [:source], :name => :tr8n_ts_s
179
181
 
180
182
  create_table :tr8n_translation_key_sources do |t|
181
183
  t.integer :translation_key_id, :null => false
@@ -183,8 +185,8 @@ class CreateTr8nTables < ActiveRecord::Migration
183
185
  t.text :details
184
186
  t.timestamps
185
187
  end
186
- add_index :tr8n_translation_key_sources, [:translation_key_id], :name => "tr8n_trans_keys_key_id"
187
- add_index :tr8n_translation_key_sources, [:translation_source_id], :name => "tr8n_trans_keys_source_id"
188
+ add_index :tr8n_translation_key_sources, [:translation_key_id], :name => :tr8n_tks_tk
189
+ add_index :tr8n_translation_key_sources, [:translation_source_id], :name => :tr8n_tks_ts
188
190
 
189
191
  create_table :tr8n_translation_key_locks do |t|
190
192
  t.integer :translation_key_id, :null => false
@@ -193,7 +195,7 @@ class CreateTr8nTables < ActiveRecord::Migration
193
195
  t.boolean :locked, :default => false
194
196
  t.timestamps
195
197
  end
196
- add_index :tr8n_translation_key_locks, [:translation_key_id, :language_id], :name => "tr8n_locks_key_id_lang_id"
198
+ add_index :tr8n_translation_key_locks, [:translation_key_id, :language_id], :name => :tr8n_tkl_tl
197
199
 
198
200
  create_table :tr8n_translations do |t|
199
201
  t.integer :translation_key_id, :null => false
@@ -203,11 +205,12 @@ class CreateTr8nTables < ActiveRecord::Migration
203
205
  t.integer :rank, :default => 0
204
206
  t.integer :approved_by_id, :limit => 8
205
207
  t.text :rules
208
+ t.timestamp :synced_at
206
209
  t.timestamps
207
210
  end
208
- add_index :tr8n_translations, [:translator_id], :name => "r8n_trans_translator_id"
209
- add_index :tr8n_translations, [:translation_key_id, :translator_id, :language_id], :name => "tr8n_trans_key_id_translator_id_lang_id"
210
- add_index :tr8n_translations, [:created_at], :name => "tr8n_trans_created_at"
211
+ add_index :tr8n_translations, [:translator_id], :name => :tr8n_trn_t
212
+ add_index :tr8n_translations, [:translation_key_id, :translator_id, :language_id], :name => :tr8n_trn_tktl
213
+ add_index :tr8n_translations, [:created_at], :name => :tr8n_trn_c
211
214
 
212
215
  create_table :tr8n_translation_votes do |t|
213
216
  t.integer :translation_id, :null => false
@@ -215,8 +218,8 @@ class CreateTr8nTables < ActiveRecord::Migration
215
218
  t.integer :vote, :null => false
216
219
  t.timestamps
217
220
  end
218
- add_index :tr8n_translation_votes, [:translator_id], :name => "tr8n_trans_votes_translator_id"
219
- add_index :tr8n_translation_votes, [:translation_id, :translator_id], :name => "tr8n_trans_votes_trans_id_translator_id"
221
+ add_index :tr8n_translation_votes, [:translator_id], :name => :tr8n_tv_t
222
+ add_index :tr8n_translation_votes, [:translation_id, :translator_id], :name => :tr8n_tv_tt
220
223
 
221
224
  create_table :tr8n_glossary do |t|
222
225
  t.string :keyword
@@ -231,8 +234,8 @@ class CreateTr8nTables < ActiveRecord::Migration
231
234
  t.text :topic, :null => false
232
235
  t.timestamps
233
236
  end
234
- add_index :tr8n_language_forum_topics, [:language_id], :name => "tr8n_forum_topics_lang_id"
235
- add_index :tr8n_language_forum_topics, [:translator_id], :name => "tr8n_forum_topics_translator_id"
237
+ add_index :tr8n_language_forum_topics, [:language_id], :name => :tr8n_lft_l
238
+ add_index :tr8n_language_forum_topics, [:translator_id], :name => :tr8n_lft_t
236
239
 
237
240
  create_table :tr8n_language_forum_messages do |t|
238
241
  t.integer :language_id, :null => false
@@ -241,9 +244,9 @@ class CreateTr8nTables < ActiveRecord::Migration
241
244
  t.text :message, :null => false
242
245
  t.timestamps
243
246
  end
244
- add_index :tr8n_language_forum_messages, [:language_id], :name => "tr8n_forum_msgs_lang_id"
245
- add_index :tr8n_language_forum_messages, [:translator_id], :name => "tr8n_forums_msgs_translator_id"
246
- add_index :tr8n_language_forum_messages, [:language_id, :language_forum_topic_id], :name => "tr8n_forum_msgs_lang_id_topic_id"
247
+ add_index :tr8n_language_forum_messages, [:language_id], :name => :tr8n_lfm_l
248
+ add_index :tr8n_language_forum_messages, [:translator_id], :name => :tr8n_lfm_t
249
+ add_index :tr8n_language_forum_messages, [:language_id, :language_forum_topic_id], :name => :tr8n_lfm_ll
247
250
 
248
251
  create_table :tr8n_language_forum_abuse_reports do |t|
249
252
  t.integer :language_id, :null => false
@@ -252,9 +255,9 @@ class CreateTr8nTables < ActiveRecord::Migration
252
255
  t.string :reason
253
256
  t.timestamps
254
257
  end
255
- add_index :tr8n_language_forum_abuse_reports, [:language_id], :name => "tr8n_forum_reports_lang_id"
256
- add_index :tr8n_language_forum_abuse_reports, [:language_id, :translator_id], :name => "tr8n_forum_reports_lang_id_translator_id"
257
- add_index :tr8n_language_forum_abuse_reports, [:language_forum_message_id], :name => "tr8n_forum_reports_message_id"
258
+ add_index :tr8n_language_forum_abuse_reports, [:language_id], :name => :tr8n_lfar_l
259
+ add_index :tr8n_language_forum_abuse_reports, [:language_id, :translator_id], :name => :tr8n_lfar_lt
260
+ add_index :tr8n_language_forum_abuse_reports, [:language_forum_message_id], :name => :tr8n_lfar_lfm
258
261
 
259
262
  create_table :tr8n_translation_key_comments do |t|
260
263
  t.integer :language_id, :null => false
@@ -263,9 +266,9 @@ class CreateTr8nTables < ActiveRecord::Migration
263
266
  t.text :message, :null => false
264
267
  t.timestamps
265
268
  end
266
- add_index :tr8n_translation_key_comments, [:language_id], :name => "tr8n_tkey_msgs_lang_id"
267
- add_index :tr8n_translation_key_comments, [:translator_id], :name => "tr8n_tkey_msgs_translator_id"
268
- add_index :tr8n_translation_key_comments, [:language_id, :translation_key_id], :name => "tr8n_tkey_msgs_lang_id_tkey_id"
269
+ add_index :tr8n_translation_key_comments, [:language_id], :name => :tr8n_tkc_l
270
+ add_index :tr8n_translation_key_comments, [:translator_id], :name => :tr8n_tkc_t
271
+ add_index :tr8n_translation_key_comments, [:language_id, :translation_key_id], :name => :tr8n_tkc_lt
269
272
 
270
273
  create_table :tr8n_language_case_rules do |t|
271
274
  t.integer :language_case_id, :null => false
@@ -275,9 +278,9 @@ class CreateTr8nTables < ActiveRecord::Migration
275
278
  t.integer :position
276
279
  t.timestamps
277
280
  end
278
- add_index :tr8n_language_case_rules, [:language_case_id], :name => "tr8n_lcr_case_id"
279
- add_index :tr8n_language_case_rules, [:language_id], :name => "tr8n_lcr_lang_id"
280
- add_index :tr8n_language_case_rules, [:translator_id], :name => "tr8n_lcr_translator_id"
281
+ add_index :tr8n_language_case_rules, [:language_case_id], :name => :tr8n_lcr_lc
282
+ add_index :tr8n_language_case_rules, [:language_id], :name => :tr8n_lcr_l
283
+ add_index :tr8n_language_case_rules, [:translator_id], :name => :tr8n_lcr_t
281
284
 
282
285
  create_table :tr8n_translation_domains do |t|
283
286
  t.string :name
@@ -285,7 +288,7 @@ class CreateTr8nTables < ActiveRecord::Migration
285
288
  t.integer :source_count, :default => 0
286
289
  t.timestamps
287
290
  end
288
- add_index :tr8n_translation_domains, [:name], :unique => true
291
+ add_index :tr8n_translation_domains, [:name], :unique => true, :name => :tr8n_td_n
289
292
 
290
293
  create_table :tr8n_translator_following do |t|
291
294
  t.integer :translator_id
@@ -293,7 +296,7 @@ class CreateTr8nTables < ActiveRecord::Migration
293
296
  t.string :object_type
294
297
  t.timestamps
295
298
  end
296
- add_index :tr8n_translator_following, [:translator_id]
299
+ add_index :tr8n_translator_following, [:translator_id], :name => :tr8n_tf_t
297
300
 
298
301
  create_table :tr8n_translator_reports do |t|
299
302
  t.integer :translator_id
@@ -304,7 +307,7 @@ class CreateTr8nTables < ActiveRecord::Migration
304
307
  t.text :comment
305
308
  t.timestamps
306
309
  end
307
- add_index :tr8n_translator_reports, [:translator_id]
310
+ add_index :tr8n_translator_reports, [:translator_id], :name => :tr8n_tr_t
308
311
 
309
312
  create_table :tr8n_ip_locations do |t|
310
313
  t.integer :low, :limit => 8
@@ -316,8 +319,25 @@ class CreateTr8nTables < ActiveRecord::Migration
316
319
  t.string :country, :limit => 80
317
320
  t.timestamps
318
321
  end
319
- add_index :tr8n_ip_locations, [:low]
320
- add_index :tr8n_ip_locations, [:high]
322
+ add_index :tr8n_ip_locations, [:low], :name => :tr8n_il_l
323
+ add_index :tr8n_ip_locations, [:high], :name => :tr8n_il_h
324
+
325
+ create_table :tr8n_translation_source_languages do |t|
326
+ t.integer :language_id
327
+ t.integer :translation_source_id
328
+ t.timestamps
329
+ end
330
+ add_index :tr8n_translation_source_languages, [:language_id, :translation_source_id], :name => :tr8n_tsl_lt
331
+
332
+ create_table :tr8n_sync_logs do |t|
333
+ t.timestamp :started_at
334
+ t.timestamp :finished_at
335
+ t.integer :keys_sent
336
+ t.integer :translations_sent
337
+ t.integer :keys_received
338
+ t.integer :translations_received
339
+ t.timestamps
340
+ end
321
341
  end
322
342
 
323
343
  def self.down
@@ -346,5 +366,7 @@ class CreateTr8nTables < ActiveRecord::Migration
346
366
  drop_table :tr8n_translator_following
347
367
  drop_table :tr8n_translator_reports
348
368
  drop_table :tr8n_ip_locations
369
+ drop_table :tr8n_translation_source_languages
370
+ drop_table :tr8n_sync_logs
349
371
  end
350
372
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20111011013640) do
14
+ ActiveRecord::Schema.define(:version => 20111026230545) do
15
15
 
16
16
  create_table "admins", :force => true do |t|
17
17
  t.integer "user_id"
@@ -261,6 +261,15 @@ ActiveRecord::Schema.define(:version => 20111011013640) do
261
261
 
262
262
  add_index "tr8n_translation_keys", ["key"], :name => "index_tr8n_translation_keys_on_key", :unique => true
263
263
 
264
+ create_table "tr8n_translation_source_languages", :force => true do |t|
265
+ t.integer "language_id"
266
+ t.integer "translation_source_id"
267
+ t.datetime "created_at"
268
+ t.datetime "updated_at"
269
+ end
270
+
271
+ add_index "tr8n_translation_source_languages", ["language_id", "translation_source_id"], :name => "tsllt"
272
+
264
273
  create_table "tr8n_translation_sources", :force => true do |t|
265
274
  t.string "source"
266
275
  t.integer "translation_domain_id"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tr8n
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.5
4
+ version: 3.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-26 00:00:00.000000000Z
12
+ date: 2012-01-06 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2166011540 !ruby/object:Gem::Requirement
16
+ requirement: &2164773560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2166011540
24
+ version_requirements: *2164773560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: will_filter
27
- requirement: &2166010960 !ruby/object:Gem::Requirement
27
+ requirement: &2164772700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.1.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2166010960
35
+ version_requirements: *2164772700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: kaminari
38
- requirement: &2166010440 !ruby/object:Gem::Requirement
38
+ requirement: &2164772000 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2166010440
46
+ version_requirements: *2164772000
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sass
49
- requirement: &2166009920 !ruby/object:Gem::Requirement
49
+ requirement: &2164771300 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2166009920
57
+ version_requirements: *2164771300
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: coffee-script
60
- requirement: &2166009380 !ruby/object:Gem::Requirement
60
+ requirement: &2164770460 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2166009380
68
+ version_requirements: *2164770460
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
- requirement: &2166008840 !ruby/object:Gem::Requirement
71
+ requirement: &2164769780 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2166008840
79
+ version_requirements: *2164769780
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: bundler
82
- requirement: &2166008340 !ruby/object:Gem::Requirement
82
+ requirement: &2164764600 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.0.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2166008340
90
+ version_requirements: *2164764600
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: sqlite3
93
- requirement: &2166007820 !ruby/object:Gem::Requirement
93
+ requirement: &2164763580 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2166007820
101
+ version_requirements: *2164763580
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rspec
104
- requirement: &2166007280 !ruby/object:Gem::Requirement
104
+ requirement: &2164762820 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *2166007280
112
+ version_requirements: *2164762820
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rspec-rails
115
- requirement: &2166006800 !ruby/object:Gem::Requirement
115
+ requirement: &2164761940 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *2166006800
123
+ version_requirements: *2164761940
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: factory_girl
126
- requirement: &2166006300 !ruby/object:Gem::Requirement
126
+ requirement: &2164761040 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *2166006300
134
+ version_requirements: *2164761040
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: rr
137
- requirement: &2166005740 !ruby/object:Gem::Requirement
137
+ requirement: &2164760200 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *2166005740
145
+ version_requirements: *2164760200
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: steak
148
- requirement: &2166005180 !ruby/object:Gem::Requirement
148
+ requirement: &2164759440 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *2166005180
156
+ version_requirements: *2164759440
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: capybara
159
- requirement: &2166004680 !ruby/object:Gem::Requirement
159
+ requirement: &2164758620 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *2166004680
167
+ version_requirements: *2164758620
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: database_cleaner
170
- requirement: &2166004140 !ruby/object:Gem::Requirement
170
+ requirement: &2164757760 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ! '>='
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: '0'
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *2166004140
178
+ version_requirements: *2164757760
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: memcache-client
181
- requirement: &2166003660 !ruby/object:Gem::Requirement
181
+ requirement: &2164756800 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,7 +186,7 @@ dependencies:
186
186
  version: 1.8.5
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *2166003660
189
+ version_requirements: *2164756800
190
190
  description: Crowd-sourced translation and localization engine for Rails.
191
191
  email:
192
192
  - michael@tr8n.net
@@ -655,6 +655,7 @@ files:
655
655
  - app/models/tr8n/translation_key_source_filter.rb
656
656
  - app/models/tr8n/translation_source.rb
657
657
  - app/models/tr8n/translation_source_filter.rb
658
+ - app/models/tr8n/translation_source_language.rb
658
659
  - app/models/tr8n/translation_vote.rb
659
660
  - app/models/tr8n/translation_vote_filter.rb
660
661
  - app/models/tr8n/translator.rb
@@ -764,8 +765,8 @@ files:
764
765
  - app/views/tr8n/help/index.html.erb
765
766
  - app/views/tr8n/help/inline_translator.html.erb
766
767
  - app/views/tr8n/help/language_selector.html.erb
767
- - app/views/tr8n/help/lb_credits.html.erb
768
768
  - app/views/tr8n/help/lb_shortcuts.html.erb
769
+ - app/views/tr8n/help/lb_stats.html.erb
769
770
  - app/views/tr8n/help/license.html.erb
770
771
  - app/views/tr8n/help/management.html.erb
771
772
  - app/views/tr8n/help/phrases.html.erb
@@ -828,26 +829,12 @@ files:
828
829
  - app/views/tr8n/translator/_header_key_report.html.erb
829
830
  - app/views/tr8n/translator/index.html.erb
830
831
  - app/views/tr8n/translator/lb_report.html.erb
832
+ - bin/tr8n.rb
831
833
  - config/routes.rb
832
- - config/tr8n/config.yml
833
- - config/tr8n/data/ip_locations.csv
834
- - config/tr8n/rules/default_date_rules.yml
835
- - config/tr8n/rules/default_gender_list_rules.yml
836
- - config/tr8n/rules/default_gender_rules.yml
837
- - config/tr8n/rules/default_language_cases.yml
838
- - config/tr8n/rules/default_list_rules.yml
839
- - config/tr8n/rules/default_numeric_rules.yml
840
- - config/tr8n/rules/default_value_rules.yml
841
- - config/tr8n/site/default_glossary.yml
842
- - config/tr8n/site/default_languages.yml
843
- - config/tr8n/site/features.yml
844
- - config/tr8n/site/shortcuts.yml
845
- - config/tr8n/site/sitemap.json
846
- - config/tr8n/tokens/data.yml
847
- - config/tr8n/tokens/decorations.yml
848
834
  - db/migrate/20100405201417_create_tr8n_tables.rb
849
835
  - db/migrate/20111003194443_create_tr8n_sync_tables.rb
850
836
  - db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb
837
+ - db/migrate/20111026230545_create_tr8n_translation_source_languages.rb
851
838
  - doc/README_FOR_APP
852
839
  - doc/cheat sheet.docx
853
840
  - doc/cheat sheet.pdf
@@ -857,6 +844,22 @@ files:
857
844
  - doc/integration.doc
858
845
  - doc/integration.docx
859
846
  - doc/pixel client sdk.graffle
847
+ - lib/generators/tr8n/templates/config/tr8n/config.yml
848
+ - lib/generators/tr8n/templates/config/tr8n/data/ip_locations.csv
849
+ - lib/generators/tr8n/templates/config/tr8n/rules/default_date_rules.yml
850
+ - lib/generators/tr8n/templates/config/tr8n/rules/default_gender_list_rules.yml
851
+ - lib/generators/tr8n/templates/config/tr8n/rules/default_gender_rules.yml
852
+ - lib/generators/tr8n/templates/config/tr8n/rules/default_language_cases.yml
853
+ - lib/generators/tr8n/templates/config/tr8n/rules/default_list_rules.yml
854
+ - lib/generators/tr8n/templates/config/tr8n/rules/default_numeric_rules.yml
855
+ - lib/generators/tr8n/templates/config/tr8n/rules/default_value_rules.yml
856
+ - lib/generators/tr8n/templates/config/tr8n/site/default_glossary.yml
857
+ - lib/generators/tr8n/templates/config/tr8n/site/default_languages.yml
858
+ - lib/generators/tr8n/templates/config/tr8n/site/features.yml
859
+ - lib/generators/tr8n/templates/config/tr8n/site/shortcuts.yml
860
+ - lib/generators/tr8n/templates/config/tr8n/site/sitemap.json
861
+ - lib/generators/tr8n/templates/config/tr8n/tokens/data.yml
862
+ - lib/generators/tr8n/templates/config/tr8n/tokens/decorations.yml
860
863
  - lib/generators/tr8n/templates/db/create_tr8n_tables.rb
861
864
  - lib/generators/tr8n/templates/layouts/tr8n.html.erb
862
865
  - lib/generators/tr8n/templates/layouts/tr8n_admin.html.erb
@@ -932,8 +935,6 @@ files:
932
935
  - local/tr8n_server/app/views/layouts/_header.html.erb
933
936
  - local/tr8n_server/app/views/layouts/admin.html.erb
934
937
  - local/tr8n_server/app/views/layouts/application.html.erb
935
- - local/tr8n_server/app/views/layouts/tr8n.html.erb
936
- - local/tr8n_server/app/views/layouts/tr8n_admin.html.erb
937
938
  - local/tr8n_server/app/views/login/index.html.erb
938
939
  - local/tr8n_server/app/views/login/register.html.erb
939
940
  - local/tr8n_server/config.ru
@@ -973,8 +974,6 @@ files:
973
974
  - local/tr8n_server/db/migrate/20110113223509_create_admins.rb
974
975
  - local/tr8n_server/db/migrate/20110930041143_create_will_filter_filters.rb
975
976
  - local/tr8n_server/db/migrate/20110930041150_create_tr8n_tables.rb
976
- - local/tr8n_server/db/migrate/20111003194443_create_tr8n_sync_tables.rb
977
- - local/tr8n_server/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb
978
977
  - local/tr8n_server/db/schema.rb
979
978
  - local/tr8n_server/db/test.sqlite3
980
979
  - local/tr8n_server/lib/assets/.gitkeep
@@ -1007,7 +1006,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1007
1006
  version: '0'
1008
1007
  segments:
1009
1008
  - 0
1010
- hash: -1993706980949355961
1009
+ hash: 10071629170750443
1011
1010
  required_rubygems_version: !ruby/object:Gem::Requirement
1012
1011
  none: false
1013
1012
  requirements:
@@ -1016,7 +1015,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1016
1015
  version: '0'
1017
1016
  segments:
1018
1017
  - 0
1019
- hash: -1993706980949355961
1018
+ hash: 10071629170750443
1020
1019
  requirements: []
1021
1020
  rubyforge_project: tr8n
1022
1021
  rubygems_version: 1.8.11
@@ -1061,8 +1060,6 @@ test_files:
1061
1060
  - local/tr8n_server/app/views/layouts/_header.html.erb
1062
1061
  - local/tr8n_server/app/views/layouts/admin.html.erb
1063
1062
  - local/tr8n_server/app/views/layouts/application.html.erb
1064
- - local/tr8n_server/app/views/layouts/tr8n.html.erb
1065
- - local/tr8n_server/app/views/layouts/tr8n_admin.html.erb
1066
1063
  - local/tr8n_server/app/views/login/index.html.erb
1067
1064
  - local/tr8n_server/app/views/login/register.html.erb
1068
1065
  - local/tr8n_server/config.ru
@@ -1102,8 +1099,6 @@ test_files:
1102
1099
  - local/tr8n_server/db/migrate/20110113223509_create_admins.rb
1103
1100
  - local/tr8n_server/db/migrate/20110930041143_create_will_filter_filters.rb
1104
1101
  - local/tr8n_server/db/migrate/20110930041150_create_tr8n_tables.rb
1105
- - local/tr8n_server/db/migrate/20111003194443_create_tr8n_sync_tables.rb
1106
- - local/tr8n_server/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb
1107
1102
  - local/tr8n_server/db/schema.rb
1108
1103
  - local/tr8n_server/db/test.sqlite3
1109
1104
  - local/tr8n_server/lib/assets/.gitkeep