tr8n 3.1.8 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. data/.gitignore +2 -1
  2. data/.rspec +1 -0
  3. data/.rvmrc +1 -1
  4. data/.watchr +18 -0
  5. data/Gemfile.lock +16 -10
  6. data/app/assets/images/tr8n/minus_node.png +0 -0
  7. data/app/assets/images/tr8n/pixel.gif +0 -0
  8. data/app/assets/images/tr8n/plus_node.png +0 -0
  9. data/app/assets/javascripts/tr8n/tr8n.js +1 -0
  10. data/app/assets/javascripts/tr8n/tr8n_client_sdk.js +581 -425
  11. data/app/assets/stylesheets/tr8n/layout.css.scss +1 -1
  12. data/app/assets/stylesheets/tr8n/tr8n.css.scss +20 -0
  13. data/app/controllers/tr8n/admin/base_controller.rb +4 -1
  14. data/app/controllers/tr8n/admin/clientsdk_controller.rb +1 -1
  15. data/app/controllers/tr8n/admin/metrics_controller.rb +30 -0
  16. data/app/controllers/tr8n/api/v1/base_controller.rb +12 -0
  17. data/app/controllers/tr8n/api/v1/language_controller.rb +7 -5
  18. data/app/controllers/tr8n/awards_controller.rb +1 -1
  19. data/app/controllers/tr8n/base_controller.rb +12 -6
  20. data/app/controllers/tr8n/dashboard_controller.rb +1 -1
  21. data/app/controllers/tr8n/forum_controller.rb +1 -1
  22. data/app/controllers/tr8n/glossary_controller.rb +1 -1
  23. data/app/controllers/tr8n/help_controller.rb +1 -1
  24. data/app/controllers/tr8n/phrases_controller.rb +1 -1
  25. data/app/controllers/tr8n/translator_controller.rb +8 -0
  26. data/app/helpers/tr8n/admin/base_helper.rb +1 -1
  27. data/app/helpers/tr8n/base_helper.rb +1 -1
  28. data/app/helpers/tr8n/dashboard_helper.rb +1 -1
  29. data/app/models/tr8n/base_filter.rb +1 -1
  30. data/app/models/tr8n/daily_language_metric.rb +1 -1
  31. data/app/models/tr8n/date_rule.rb +1 -1
  32. data/app/models/tr8n/gender_list_rule.rb +1 -1
  33. data/app/models/tr8n/gender_rule.rb +1 -1
  34. data/app/models/tr8n/glossary.rb +1 -1
  35. data/app/models/tr8n/glossary_filter.rb +1 -1
  36. data/app/models/tr8n/integration/ru/russian_gender_list_rule.rb +1 -1
  37. data/app/models/tr8n/integration/ru/russian_numeric_rule.rb +1 -1
  38. data/app/models/tr8n/ip_location.rb +1 -1
  39. data/app/models/tr8n/ip_location_filter.rb +1 -1
  40. data/app/models/tr8n/language.rb +19 -7
  41. data/app/models/tr8n/language_case.rb +1 -1
  42. data/app/models/tr8n/language_case_filter.rb +1 -1
  43. data/app/models/tr8n/language_case_rule.rb +1 -1
  44. data/app/models/tr8n/language_case_rule_filter.rb +1 -1
  45. data/app/models/tr8n/language_case_value_map.rb +1 -1
  46. data/app/models/tr8n/language_case_value_map_filter.rb +1 -1
  47. data/app/models/tr8n/language_filter.rb +1 -1
  48. data/app/models/tr8n/language_forum_abuse_report.rb +1 -1
  49. data/app/models/tr8n/language_forum_abuse_report_filter.rb +1 -1
  50. data/app/models/tr8n/language_forum_message.rb +1 -1
  51. data/app/models/tr8n/language_forum_message_filter.rb +1 -1
  52. data/app/models/tr8n/language_forum_topic.rb +1 -1
  53. data/app/models/tr8n/language_forum_topic_filter.rb +1 -1
  54. data/app/models/tr8n/language_metric.rb +1 -1
  55. data/app/models/tr8n/language_metric_filter.rb +1 -1
  56. data/app/models/tr8n/language_rule.rb +1 -1
  57. data/app/models/tr8n/language_rule_filter.rb +1 -1
  58. data/app/models/tr8n/language_user.rb +1 -1
  59. data/app/models/tr8n/language_user_filter.rb +1 -1
  60. data/app/models/tr8n/list_rule.rb +1 -1
  61. data/app/models/tr8n/monthly_language_metric.rb +1 -1
  62. data/app/models/tr8n/numeric_rule.rb +35 -28
  63. data/app/models/tr8n/sync_log.rb +1 -1
  64. data/app/models/tr8n/sync_log_filter.rb +1 -1
  65. data/app/models/tr8n/total_language_metric.rb +1 -1
  66. data/app/models/tr8n/translation.rb +4 -3
  67. data/app/models/tr8n/translation_domain.rb +11 -3
  68. data/app/models/tr8n/translation_domain_filter.rb +1 -1
  69. data/app/models/tr8n/translation_filter.rb +1 -1
  70. data/app/models/tr8n/translation_key.rb +73 -36
  71. data/app/models/tr8n/translation_key_comment.rb +1 -1
  72. data/app/models/tr8n/translation_key_comment_filter.rb +1 -1
  73. data/app/models/tr8n/translation_key_filter.rb +1 -1
  74. data/app/models/tr8n/translation_key_lock.rb +1 -1
  75. data/app/models/tr8n/translation_key_lock_filter.rb +1 -1
  76. data/app/models/tr8n/translation_key_source.rb +16 -5
  77. data/app/models/tr8n/translation_key_source_filter.rb +1 -1
  78. data/app/models/tr8n/translation_source.rb +12 -4
  79. data/app/models/tr8n/translation_source_filter.rb +1 -1
  80. data/app/models/tr8n/translation_source_language.rb +1 -1
  81. data/app/models/tr8n/translation_vote.rb +1 -1
  82. data/app/models/tr8n/translation_vote_filter.rb +1 -1
  83. data/app/models/tr8n/translator.rb +21 -5
  84. data/app/models/tr8n/translator_filter.rb +1 -1
  85. data/app/models/tr8n/translator_following.rb +1 -1
  86. data/app/models/tr8n/translator_following_filter.rb +1 -1
  87. data/app/models/tr8n/translator_log.rb +3 -3
  88. data/app/models/tr8n/translator_log_filter.rb +1 -1
  89. data/app/models/tr8n/translator_metric.rb +1 -1
  90. data/app/models/tr8n/translator_metric_filter.rb +1 -1
  91. data/app/models/tr8n/translator_report.rb +1 -1
  92. data/app/models/tr8n/translator_report_filter.rb +1 -1
  93. data/app/models/tr8n/value_rule.rb +1 -1
  94. data/app/views/tr8n/admin/clientsdk/index.html.erb +29 -29
  95. data/app/views/tr8n/admin/clientsdk/lb_samples.html.erb +1 -1
  96. data/app/views/tr8n/admin/metrics/_tabs.html.erb +22 -0
  97. data/app/views/tr8n/admin/metrics/index.html.erb +60 -0
  98. data/app/views/tr8n/common/_header.html.erb +3 -1
  99. data/app/views/tr8n/common/_language_selector.html.erb +4 -2
  100. data/app/views/tr8n/common/_scripts.html.erb +5 -0
  101. data/app/views/tr8n/common/_terms_of_service.html.erb +53 -0
  102. data/app/views/tr8n/help/credits.html.erb +4 -0
  103. data/app/views/tr8n/language/_select.html.erb +5 -1
  104. data/app/views/tr8n/translator/registration.html.erb +21 -0
  105. data/config/routes.rb +3 -1
  106. data/doc/classes.graffle +356 -7194
  107. data/lib/generators/tr8n/templates/config/tr8n/config.yml +9 -1
  108. data/lib/generators/tr8n/templates/config/tr8n/site/shortcuts.yml +1 -1
  109. data/lib/generators/tr8n/templates/config/tr8n/tokens/decorations.yml +4 -1
  110. data/lib/generators/tr8n/tr8n_generator.rb +1 -1
  111. data/lib/tasks/tr8n.rake +1 -1
  112. data/lib/tr8n.rb +23 -0
  113. data/lib/tr8n/active_dumper.rb +1 -1
  114. data/lib/tr8n/cache.rb +1 -8
  115. data/lib/tr8n/cache_adapters/memcached.rb +1 -1
  116. data/lib/tr8n/config.rb +37 -1
  117. data/lib/tr8n/dictionary.rb +1 -1
  118. data/lib/tr8n/engine.rb +4 -1
  119. data/lib/tr8n/exception.rb +1 -1
  120. data/lib/tr8n/extender.rb +1 -1
  121. data/lib/tr8n/extensions/action_controller_extension.rb +5 -4
  122. data/lib/tr8n/extensions/action_view_extension.rb +71 -20
  123. data/lib/tr8n/extensions/array_extension.rb +14 -1
  124. data/lib/tr8n/extensions/date_extension.rb +1 -1
  125. data/lib/tr8n/extensions/fixnum_extension.rb +1 -1
  126. data/lib/tr8n/extensions/hash_extension.rb +1 -1
  127. data/lib/tr8n/extensions/string_extension.rb +1 -1
  128. data/lib/tr8n/extensions/time_extension.rb +1 -1
  129. data/lib/tr8n/ip_address.rb +1 -1
  130. data/lib/tr8n/key_registration_exception.rb +1 -1
  131. data/lib/tr8n/keyboard_mapping.rb +1 -1
  132. data/lib/tr8n/logger.rb +1 -1
  133. data/lib/tr8n/railtie.rb +1 -1
  134. data/lib/tr8n/site_map.rb +1 -1
  135. data/lib/tr8n/site_map_section.rb +1 -1
  136. data/lib/tr8n/token.rb +1 -1
  137. data/lib/tr8n/token_exception.rb +1 -1
  138. data/lib/tr8n/tokenized_label.rb +2 -12
  139. data/lib/tr8n/tokens/data_token.rb +1 -1
  140. data/lib/tr8n/tokens/decoration_token.rb +1 -1
  141. data/lib/tr8n/tokens/hidden_token.rb +1 -1
  142. data/lib/tr8n/tokens/method_token.rb +1 -1
  143. data/lib/tr8n/tokens/transform_token.rb +1 -1
  144. data/lib/tr8n/version.rb +25 -1
  145. data/local/tr8n_server/app/models/user.rb +1 -0
  146. data/local/tr8n_server/config/environments/test.rb +1 -1
  147. data/local/tr8n_server/config/tr8n/config.yml +45 -39
  148. data/local/tr8n_server/config/tr8n/site/shortcuts.yml +1 -1
  149. data/local/tr8n_server/db/schema.rb +2 -0
  150. data/spec/controllers/awards_controller_spec.rb +22 -0
  151. data/spec/controllers/base_controller_spec.rb +6 -0
  152. data/spec/controllers/dashboard_controller_spec.rb +23 -0
  153. data/spec/controllers/forum_controller_spec.rb +23 -0
  154. data/spec/controllers/glossary_controller_spec.rb +22 -0
  155. data/spec/controllers/help_controller_spec.rb +22 -0
  156. data/spec/controllers/language_cases_controller_spec.rb +13 -0
  157. data/spec/controllers/language_controller_spec.rb +10 -0
  158. data/spec/controllers/phrases_controller_spec.rb +22 -0
  159. data/spec/controllers/translations_controller_spec.rb +23 -0
  160. data/spec/controllers/translator_controller_spec.rb +22 -0
  161. data/spec/lib/tokenized_label_spec.rb +42 -0
  162. data/spec/lib/tokens/data_token_spec.rb +49 -0
  163. data/spec/lib/tokens/decoration_token_spec.rb +49 -0
  164. data/spec/lib/tokens/hidden_token_spec.rb +53 -0
  165. data/spec/lib/tokens/method_token_spec.rb +61 -0
  166. data/spec/lib/tokens/transform_token_spec.rb +51 -0
  167. data/spec/models/tr8n/daily_language_metric_spec.rb +5 -0
  168. data/spec/models/tr8n/date_rule_spec.rb +5 -0
  169. data/spec/models/tr8n/gender_list_rule_spec.rb +5 -0
  170. data/spec/models/tr8n/gender_rule_spec.rb +141 -0
  171. data/spec/models/tr8n/glossary_spec.rb +5 -0
  172. data/spec/models/tr8n/ip_location_spec.rb +5 -0
  173. data/spec/models/tr8n/language_case_rule_spec.rb +5 -0
  174. data/spec/models/tr8n/language_case_spec.rb +5 -0
  175. data/spec/models/tr8n/language_case_value_map_spec.rb +5 -0
  176. data/spec/models/tr8n/language_forum_abuse_report_spec.rb +5 -0
  177. data/spec/models/tr8n/language_forum_message_spec.rb +5 -0
  178. data/spec/models/tr8n/language_forum_topic_spec.rb +5 -0
  179. data/spec/models/tr8n/language_metric_spec.rb +5 -0
  180. data/spec/models/tr8n/language_rule_spec.rb +5 -0
  181. data/spec/models/tr8n/language_spec.rb +79 -0
  182. data/spec/models/tr8n/language_user_spec.rb +5 -0
  183. data/spec/models/tr8n/list_rule_spec.rb +5 -0
  184. data/spec/models/tr8n/monthly_language_metric_spec.rb +5 -0
  185. data/spec/models/tr8n/numeric_rule_spec.rb +162 -0
  186. data/spec/models/tr8n/sync_log_spec.rb +5 -0
  187. data/spec/models/tr8n/total_language_metric_spec.rb +5 -0
  188. data/spec/models/tr8n/translation_domain_spec.rb +5 -0
  189. data/spec/models/tr8n/translation_key_comment_spec.rb +5 -0
  190. data/spec/models/tr8n/translation_key_lock_spec.rb +5 -0
  191. data/spec/models/tr8n/translation_key_source_spec.rb +5 -0
  192. data/spec/models/tr8n/translation_key_spec.rb +118 -0
  193. data/spec/models/tr8n/translation_source_language_spec.rb +5 -0
  194. data/spec/models/tr8n/translation_source_spec.rb +5 -0
  195. data/spec/models/tr8n/translation_spec.rb +5 -0
  196. data/spec/models/tr8n/translation_vote_spec.rb +5 -0
  197. data/spec/models/tr8n/translator_following_spec.rb +5 -0
  198. data/spec/models/tr8n/translator_log_spec.rb +5 -0
  199. data/spec/models/tr8n/translator_metric_spec.rb +5 -0
  200. data/spec/models/tr8n/translator_report_spec.rb +5 -0
  201. data/spec/models/tr8n/translator_spec.rb +140 -0
  202. data/spec/spec_helper.rb +26 -27
  203. data/tr8n.gemspec +3 -1
  204. metadata +173 -50
  205. data/local/tr8n_server/db/migrate/20110930041150_create_tr8n_tables.rb +0 -372
  206. data/spec/fake_app.rb +0 -50
  207. data/spec/lib/data_token_spec.rb +0 -26
  208. data/spec/lib/transform_token_spec.rb +0 -22
  209. data/spec/models/translation_key_spec.rb +0 -63
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::SyncLog do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TotalLanguageMetric do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationDomain do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationKeyComment do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationKeyLock do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationKeySource do
4
+
5
+ end
@@ -0,0 +1,118 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationKey do
4
+ describe 'creation' do
5
+
6
+ before :all do
7
+ @user = User.create(:first_name => "Mike", :gender => "male")
8
+ @translator = Tr8n::Translator.create!(:name => "Mike", :user => @user, :gender => "male")
9
+
10
+ @user2 = User.create(:first_name => "Anna", :gender => "female")
11
+ @translator2 = Tr8n::Translator.create!(:name => "Anna", :user => @user2, :gender => "female")
12
+
13
+ @english = Tr8n::Language.create!(:locale => "en-US", :english_name => "English")
14
+ @russian = Tr8n::Language.create!(:locale => "ru", :english_name => "Russian")
15
+ @spanish = Tr8n::Language.create!(:locale => "es", :english_name => "Spanish")
16
+
17
+ Tr8n::Config.init(@english.locale, @translator)
18
+ end
19
+
20
+ context "creating new translation key" do
21
+ it "should create a unique hash" do
22
+ key = Tr8n::TranslationKey.find_or_create("Hello World", "We must start with this sentence!")
23
+ assert key.key
24
+ the_key = Tr8n::TranslationKey.find_or_create("Hello World", "We must start with this sentence!")
25
+ assert key.key, the_key.key
26
+ end
27
+ end
28
+
29
+ context "creating new translation key with tokens" do
30
+ it "should parse the tokens correctly" do
31
+ key = Tr8n::TranslationKey.find_or_create("Hello {user}, you have {count} messages in your inbox")
32
+
33
+ key.key.should_not be(nil)
34
+ key.translation_tokens.should_not be_empty
35
+ key.decoration_tokens.should be_empty
36
+ key.tokens.count.should == 2
37
+ key.tokens.collect{|t| t.sanitized_name}.should include("{user}", "{count}")
38
+ key.translation_tokens.collect{|t| t.sanitized_name}.should include("{user}", "{count}")
39
+ end
40
+ end
41
+
42
+ context "translating simple strings with default language" do
43
+ it "should return original value" do
44
+ key = Tr8n::TranslationKey.find_or_create("Hello World")
45
+ key.translate(@english).should == "Hello World"
46
+
47
+ key = Tr8n::TranslationKey.find_or_create("Hello {world}")
48
+ key.translate(@english, :world => "World").should == "Hello World"
49
+
50
+ key = Tr8n::TranslationKey.find_or_create("{hello_world}")
51
+ key.translate(@english, :hello_world => "Hello World").should == "Hello World"
52
+
53
+ key = Tr8n::TranslationKey.find_or_create("Dear {user:gender}")
54
+ key.translate(@english, :user => @user).should == "Dear Mike"
55
+ key.translate(@english, :user => [@user, @user.name]).should == "Dear Mike"
56
+ key.translate(@english, :user => [@user, :name]).should == "Dear Mike"
57
+ key.translate(@english, :user => [@user, lambda{|user| user.name}]).should == "Dear Mike"
58
+ key.translate(@english, :user => [@user, lambda{|user, tom| "#{user.name} and #{tom}"}, "Tom"]).should == "Dear Mike and Tom"
59
+
60
+ key = Tr8n::TranslationKey.find_or_create("{user:gender} updated {user:gender|his,her} profile")
61
+ key.translate(@english, {:user => @user}).should == "Mike updated his profile"
62
+ key.translate(@english, {:user => @user2}).should == "Anna updated her profile"
63
+ end
64
+ end
65
+
66
+ describe "translating labels into a foreign language" do
67
+ context "labels with no rules" do
68
+ it "should return correct translations" do
69
+ key = Tr8n::TranslationKey.find_or_create("Hello World")
70
+ key.add_translation("Privet Mir", nil, @russian, @translator)
71
+ key.translate(@russian).should eq("Privet Mir")
72
+
73
+ key = Tr8n::TranslationKey.find_or_create("Hello {user}")
74
+ key.add_translation("Privet {user}", nil, @russian, @translator)
75
+ key.translate(@russian, {:user => @user}).should eq("Privet Mike")
76
+
77
+ key = Tr8n::TranslationKey.find_or_create("You have {count} messages.")
78
+ key.add_translation("U vas est {count} soobshenii.", nil, @russian, @translator)
79
+ key.translate(@russian, {:count => 5}).should eq("U vas est 5 soobshenii.")
80
+ end
81
+ end
82
+
83
+ context "labels with numeric rules" do
84
+ it "should return correct translations" do
85
+
86
+ definition = {multipart: true, part1: "ends_in", value1: "1", operator: "and", part2: "does_not_end_in", value2: "11"}
87
+ rule1 = Tr8n::NumericRule.create(:language => @russian, :definition => definition)
88
+
89
+ definition = {multipart: true, part1: "ends_in", value1: "2,3,4", operator: "and", part2: "does_not_end_in", value2: "12,13,14"}
90
+ rule2 = Tr8n::NumericRule.create(:language => @russian, :definition => definition)
91
+
92
+ definition = {multipart: false, part1: "ends_in", value1: "0,5,6,7,8,9,11,12,13,14"}
93
+ rule3 = Tr8n::NumericRule.create(:language => @russian, :definition => definition)
94
+
95
+ key = Tr8n::TranslationKey.find_or_create("You have {count||message}.")
96
+ key.add_translation("U vas est {count} soobshenie.", [{:token=>"count", :rule_id=>[rule1.id]}], @russian, @translator)
97
+ key.add_translation("U vas est {count} soobsheniya.", [{:token=>"count", :rule_id=>[rule2.id]}], @russian, @translator)
98
+ key.add_translation("U vas est {count} soobshenii.", [{:token=>"count", :rule_id=>[rule3.id]}], @russian, @translator)
99
+
100
+ key.translate(@russian, {:count => 1}).should eq("U vas est 1 soobshenie.")
101
+ key.translate(@russian, {:count => 101}).should eq("U vas est 101 soobshenie.")
102
+ key.translate(@russian, {:count => 11}).should eq("U vas est 11 soobshenii.")
103
+ key.translate(@russian, {:count => 111}).should eq("U vas est 111 soobshenii.")
104
+
105
+ key.translate(@russian, {:count => 5}).should eq("U vas est 5 soobshenii.")
106
+ key.translate(@russian, {:count => 26}).should eq("U vas est 26 soobshenii.")
107
+ key.translate(@russian, {:count => 106}).should eq("U vas est 106 soobshenii.")
108
+
109
+ key.translate(@russian, {:count => 3}).should eq("U vas est 3 soobsheniya.")
110
+ key.translate(@russian, {:count => 13}).should eq("U vas est 13 soobshenii.")
111
+ key.translate(@russian, {:count => 23}).should eq("U vas est 23 soobsheniya.")
112
+ key.translate(@russian, {:count => 103}).should eq("U vas est 103 soobsheniya.")
113
+ end
114
+ end
115
+ end
116
+
117
+ end
118
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationSourceLanguage do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationSource do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::Translation do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslationVote do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslatorFollowing do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslatorLog do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslatorMetric do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::TranslatorReport do
4
+
5
+ end
@@ -0,0 +1,140 @@
1
+ require File.expand_path('../../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Tr8n::Translator do
4
+ describe 'finding translator' do
5
+ it 'should create a correct cache_key' do
6
+ user = User.create(:first_name => 'Mike')
7
+ Tr8n::Translator.cache_key(user.id).should eq("translator_#{user.id}")
8
+ end
9
+
10
+ it 'should return nil for guest user' do
11
+ user = User.new(:first_name => 'Mike')
12
+ Tr8n::Translator.for(user).should be_nil
13
+ end
14
+
15
+ it 'should return nil for nil user' do
16
+ Tr8n::Translator.for(nil).should be_nil
17
+ end
18
+
19
+ it 'should return itself if the user is a translator' do
20
+ u = User.new(:first_name => 'Mike')
21
+ t = Tr8n::Translator.create(:user => u)
22
+ Tr8n::Translator.for(u).should eq(t)
23
+ end
24
+
25
+ it 'should not create a new translator for guest user' do
26
+ u = User.new(:first_name => 'Mike')
27
+ t = Tr8n::Translator.find_or_create(u)
28
+ t.should be_nil
29
+ end
30
+
31
+ it 'should create a new translator' do
32
+ u = User.create(:first_name => 'Mike')
33
+ t = Tr8n::Translator.find_or_create(u)
34
+ t.user.should eq(u)
35
+ end
36
+
37
+ it 'should find an existing translator' do
38
+ u = User.new(:first_name => 'Mike')
39
+ t = Tr8n::Translator.create(:user => u)
40
+ Tr8n::Translator.find_or_create(u).should eq(t)
41
+ end
42
+ end
43
+
44
+ describe 'registering a translator' do
45
+ context 'when user is not defined' do
46
+ it 'should not register a translator' do
47
+ Tr8n::Config.init('en-US', nil)
48
+ Tr8n::Translator.register.should be_nil
49
+ end
50
+ it 'should not register a translator for guest user' do
51
+ u = User.new(:first_name => 'Mike')
52
+ Tr8n::Config.init('en-US', u)
53
+ Tr8n::Translator.register.should be_nil
54
+ end
55
+ end
56
+
57
+ context 'when user is defined' do
58
+ it 'should register a translator and update language users' do
59
+ u = User.create(:first_name => 'Mike')
60
+ lang = Tr8n::Language.create(:locale => 'elbonian', :english_name => 'Elbonian')
61
+ Tr8n::LanguageUser.create(:user => u, :language => lang)
62
+
63
+ Tr8n::Config.init('en-US', u)
64
+ t = Tr8n::Translator.register
65
+ t.should be_a(Tr8n::Translator)
66
+ t.language_users.count.should eq(1)
67
+ t.language_users.first.user.should eq(u)
68
+ t.language_users.first.translator.should eq(t)
69
+ end
70
+ end
71
+ end
72
+
73
+ describe 'metric' do
74
+ context 'when translator is created' do
75
+ before :all do
76
+ @u = User.create(:first_name => 'Mike')
77
+ @t = Tr8n::Translator.register(@u)
78
+ end
79
+
80
+ it 'it should have a metric' do
81
+ @t.total_metric.should be_a(Tr8n::TranslatorMetric)
82
+ end
83
+
84
+ it 'it should have zero rank' do
85
+ @t.rank.should eq(0)
86
+ end
87
+ end
88
+ end
89
+
90
+ describe 'blocking and unblocking translators' do
91
+ context 'when translator is blocked' do
92
+ before :all do
93
+ @admin = User.create(:first_name => 'Admin')
94
+ @lang = Tr8n::Language.create(:locale => 'elbonian', :english_name => 'Elbonian')
95
+ @user = User.create(:first_name => 'Mike')
96
+ @translator = Tr8n::Translator.register(@user)
97
+ @translator.block!(@admin)
98
+
99
+ @tkey = Tr8n::TranslationKey.find_or_create("Hello World")
100
+ Tr8n::Config.init(@lang.locale, @user)
101
+ end
102
+
103
+ it 'should prevent the translator from submitting translations' do
104
+ @translator.blocked?.should be_true
105
+ expect { @tkey.add_translation('Privet Mir') }.should raise_error
106
+ end
107
+ end
108
+
109
+ context 'when translator is not blocked' do
110
+ before :all do
111
+ @lang = Tr8n::Language.create(:locale => 'elbonian', :english_name => 'Elbonian')
112
+ @user = User.create(:first_name => 'Mike')
113
+ @translator = Tr8n::Translator.register(@user)
114
+
115
+ @tkey = Tr8n::TranslationKey.find_or_create("Hello World")
116
+ Tr8n::Config.init(@lang.locale, @user)
117
+ end
118
+
119
+ it 'should prevent the translator from submitting translations' do
120
+ @translator.blocked?.should eq(false)
121
+ @tkey.add_translation('Privet Mir').should be_a(Tr8n::Translation)
122
+ end
123
+ end
124
+ end
125
+
126
+ describe 'toggling inline translations' do
127
+ context 'enables it on and off' do
128
+ it 'should be on' do
129
+ @user = User.create(:first_name => 'Mike')
130
+ @translator = Tr8n::Translator.register(@user)
131
+ @translator.inline_mode.should be_false
132
+ @translator.enable_inline_translations!
133
+ @translator.inline_mode.should be_true
134
+ @translator.disable_inline_translations!
135
+ @translator.inline_mode.should be_false
136
+ end
137
+ end
138
+ end
139
+
140
+ end
@@ -1,29 +1,28 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rails'
4
- require 'kaminari'
5
- require 'database_cleaner'
6
- require 'will_filter'
7
- require 'tr8n'
8
-
9
- # Ensure we use 'syck' instead of 'psych' in 1.9.2
10
- # RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
11
- # Psych does not yet support YAML 1.1 merge keys.
12
- # Merge keys is often used in mongoid.yml
13
- # See: http://redmine.ruby-lang.org/issues/show/4300
14
- if RUBY_VERSION >= '1.9.2'
15
- YAML::ENGINE.yamler = 'syck'
1
+ ENV["RAILS_ENV"] = "test"
2
+
3
+ require 'pp'
4
+ require 'spork'
5
+
6
+ Spork.prefork do
7
+
8
+ require File.expand_path("../../local/tr8n_server/config/environment.rb", __FILE__)
9
+ require 'rspec/rails'
10
+
11
+ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
12
+
13
+ # Requires supporting ruby files with custom matchers and macros, etc,
14
+ # in spec/support/ and its subdirectories.
15
+ Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
16
+
17
+ RSpec.configure do |config|
18
+ config.use_transactional_fixtures = true
19
+ config.use_instantiated_fixtures = false
20
+ end
21
+
16
22
  end
17
- require File.join(File.dirname(__FILE__), 'fake_app')
18
-
19
- require 'rspec/rails'
20
- # Requires supporting files with custom matchers and macros, etc,
21
- # in ./support/ and its subdirectories.
22
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
23
-
24
- RSpec.configure do |config|
25
- config.mock_with :rr
26
- config.before :all do
27
- CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'users'
28
- end
23
+
24
+
25
+ Spork.each_run do
26
+ # This code will be run each time you run your specs.
27
+
29
28
  end
@@ -31,8 +31,10 @@ Gem::Specification.new do |s|
31
31
  s.add_development_dependency 'bundler', ['>= 1.0.0']
32
32
  s.add_development_dependency 'sqlite3', ['>= 0']
33
33
  s.add_development_dependency 'rspec', ['>= 0']
34
- s.add_development_dependency 'rspec-rails', ['>= 0']
34
+ s.add_development_dependency 'rspec-rails', ['>= 2.1.0']
35
35
  s.add_development_dependency 'factory_girl', ['>= 0']
36
+ s.add_development_dependency 'spork', ['>= 0']
37
+ s.add_development_dependency 'watchr', ['>= 0']
36
38
  s.add_development_dependency 'rr', ['>= 0']
37
39
  s.add_development_dependency 'steak', ['>= 0']
38
40
  s.add_development_dependency 'capybara', ['>= 0']
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.8
4
+ version: 3.2.0
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: 2012-01-23 00:00:00.000000000Z
12
+ date: 2012-03-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2161128960 !ruby/object:Gem::Requirement
16
+ requirement: &70221453981420 !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: *2161128960
24
+ version_requirements: *70221453981420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: will_filter
27
- requirement: &2161122860 !ruby/object:Gem::Requirement
27
+ requirement: &70221453978980 !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: *2161122860
35
+ version_requirements: *70221453978980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: kaminari
38
- requirement: &2161121960 !ruby/object:Gem::Requirement
38
+ requirement: &70221453977600 !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: *2161121960
46
+ version_requirements: *70221453977600
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sass
49
- requirement: &2161120940 !ruby/object:Gem::Requirement
49
+ requirement: &70221453975980 !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: *2161120940
57
+ version_requirements: *70221453975980
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: coffee-script
60
- requirement: &2161120060 !ruby/object:Gem::Requirement
60
+ requirement: &70221453974720 !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: *2161120060
68
+ version_requirements: *70221453974720
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
- requirement: &2161119400 !ruby/object:Gem::Requirement
71
+ requirement: &70221453973560 !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: *2161119400
79
+ version_requirements: *70221453973560
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: bundler
82
- requirement: &2161118620 !ruby/object:Gem::Requirement
82
+ requirement: &70221453945020 !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: *2161118620
90
+ version_requirements: *70221453945020
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: sqlite3
93
- requirement: &2161117900 !ruby/object:Gem::Requirement
93
+ requirement: &70221453944020 !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: *2161117900
101
+ version_requirements: *70221453944020
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rspec
104
- requirement: &2161117200 !ruby/object:Gem::Requirement
104
+ requirement: &70221453943200 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,21 +109,43 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *2161117200
112
+ version_requirements: *70221453943200
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rspec-rails
115
- requirement: &2161116420 !ruby/object:Gem::Requirement
115
+ requirement: &70221453941400 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
119
119
  - !ruby/object:Gem::Version
120
- version: '0'
120
+ version: 2.1.0
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *2161116420
123
+ version_requirements: *70221453941400
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: factory_girl
126
- requirement: &2161115780 !ruby/object:Gem::Requirement
126
+ requirement: &70221453940140 !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: *70221453940140
135
+ - !ruby/object:Gem::Dependency
136
+ name: spork
137
+ requirement: &70221453937980 !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: *70221453937980
146
+ - !ruby/object:Gem::Dependency
147
+ name: watchr
148
+ requirement: &70221453931040 !ruby/object:Gem::Requirement
127
149
  none: false
128
150
  requirements:
129
151
  - - ! '>='
@@ -131,10 +153,10 @@ dependencies:
131
153
  version: '0'
132
154
  type: :development
133
155
  prerelease: false
134
- version_requirements: *2161115780
156
+ version_requirements: *70221453931040
135
157
  - !ruby/object:Gem::Dependency
136
158
  name: rr
137
- requirement: &2161115020 !ruby/object:Gem::Requirement
159
+ requirement: &70221453929520 !ruby/object:Gem::Requirement
138
160
  none: false
139
161
  requirements:
140
162
  - - ! '>='
@@ -142,10 +164,10 @@ dependencies:
142
164
  version: '0'
143
165
  type: :development
144
166
  prerelease: false
145
- version_requirements: *2161115020
167
+ version_requirements: *70221453929520
146
168
  - !ruby/object:Gem::Dependency
147
169
  name: steak
148
- requirement: &2161114300 !ruby/object:Gem::Requirement
170
+ requirement: &70221453928200 !ruby/object:Gem::Requirement
149
171
  none: false
150
172
  requirements:
151
173
  - - ! '>='
@@ -153,10 +175,10 @@ dependencies:
153
175
  version: '0'
154
176
  type: :development
155
177
  prerelease: false
156
- version_requirements: *2161114300
178
+ version_requirements: *70221453928200
157
179
  - !ruby/object:Gem::Dependency
158
180
  name: capybara
159
- requirement: &2161113340 !ruby/object:Gem::Requirement
181
+ requirement: &70221453926300 !ruby/object:Gem::Requirement
160
182
  none: false
161
183
  requirements:
162
184
  - - ! '>='
@@ -164,10 +186,10 @@ dependencies:
164
186
  version: '0'
165
187
  type: :development
166
188
  prerelease: false
167
- version_requirements: *2161113340
189
+ version_requirements: *70221453926300
168
190
  - !ruby/object:Gem::Dependency
169
191
  name: database_cleaner
170
- requirement: &2161112380 !ruby/object:Gem::Requirement
192
+ requirement: &70221453925200 !ruby/object:Gem::Requirement
171
193
  none: false
172
194
  requirements:
173
195
  - - ! '>='
@@ -175,10 +197,10 @@ dependencies:
175
197
  version: '0'
176
198
  type: :development
177
199
  prerelease: false
178
- version_requirements: *2161112380
200
+ version_requirements: *70221453925200
179
201
  - !ruby/object:Gem::Dependency
180
202
  name: memcache-client
181
- requirement: &2161111320 !ruby/object:Gem::Requirement
203
+ requirement: &70221453916500 !ruby/object:Gem::Requirement
182
204
  none: false
183
205
  requirements:
184
206
  - - ! '>='
@@ -186,7 +208,7 @@ dependencies:
186
208
  version: 1.8.5
187
209
  type: :development
188
210
  prerelease: false
189
- version_requirements: *2161111320
211
+ version_requirements: *70221453916500
190
212
  description: Crowd-sourced translation and localization engine for Rails.
191
213
  email:
192
214
  - michael@tr8n.net
@@ -198,6 +220,7 @@ files:
198
220
  - .gitignore
199
221
  - .rspec
200
222
  - .rvmrc
223
+ - .watchr
201
224
  - Gemfile
202
225
  - Gemfile.lock
203
226
  - MIT-LICENSE
@@ -529,10 +552,13 @@ files:
529
552
  - app/assets/images/tr8n/medals/gold.png
530
553
  - app/assets/images/tr8n/medals/runner.png
531
554
  - app/assets/images/tr8n/medals/silver.png
555
+ - app/assets/images/tr8n/minus_node.png
532
556
  - app/assets/images/tr8n/pencil.png
533
557
  - app/assets/images/tr8n/photo_silhouette.gif
534
558
  - app/assets/images/tr8n/photo_system.gif
559
+ - app/assets/images/tr8n/pixel.gif
535
560
  - app/assets/images/tr8n/plus.png
561
+ - app/assets/images/tr8n/plus_node.png
536
562
  - app/assets/images/tr8n/random.png
537
563
  - app/assets/images/tr8n/random2.png
538
564
  - app/assets/images/tr8n/rating_star0.png
@@ -585,6 +611,7 @@ files:
585
611
  - app/controllers/tr8n/admin/forum_controller.rb
586
612
  - app/controllers/tr8n/admin/glossary_controller.rb
587
613
  - app/controllers/tr8n/admin/language_controller.rb
614
+ - app/controllers/tr8n/admin/metrics_controller.rb
588
615
  - app/controllers/tr8n/admin/translation_controller.rb
589
616
  - app/controllers/tr8n/admin/translation_key_controller.rb
590
617
  - app/controllers/tr8n/admin/translator_controller.rb
@@ -702,6 +729,8 @@ files:
702
729
  - app/views/tr8n/admin/language/rules.html.erb
703
730
  - app/views/tr8n/admin/language/users.html.erb
704
731
  - app/views/tr8n/admin/language/view.html.erb
732
+ - app/views/tr8n/admin/metrics/_tabs.html.erb
733
+ - app/views/tr8n/admin/metrics/index.html.erb
705
734
  - app/views/tr8n/admin/translation/_tabs.html.erb
706
735
  - app/views/tr8n/admin/translation/index.html.erb
707
736
  - app/views/tr8n/admin/translation/view.html.erb
@@ -738,6 +767,7 @@ files:
738
767
  - app/views/tr8n/common/_splash_screen.html.erb
739
768
  - app/views/tr8n/common/_splash_screen_legacy.html.erb
740
769
  - app/views/tr8n/common/_tabs.html.erb
770
+ - app/views/tr8n/common/_terms_of_service.html.erb
741
771
  - app/views/tr8n/common/_translation_votes.html.erb
742
772
  - app/views/tr8n/common/_translator_login.html.erb
743
773
  - app/views/tr8n/dashboard/_forum.html.erb
@@ -831,6 +861,7 @@ files:
831
861
  - app/views/tr8n/translator/_header_key_report.html.erb
832
862
  - app/views/tr8n/translator/index.html.erb
833
863
  - app/views/tr8n/translator/lb_report.html.erb
864
+ - app/views/tr8n/translator/registration.html.erb
834
865
  - bin/tr8n.rb
835
866
  - config/routes.rb
836
867
  - db/migrate/20100405201417_create_tr8n_tables.rb
@@ -975,9 +1006,7 @@ files:
975
1006
  - local/tr8n_server/db/migrate/20101207014543_create_users.rb
976
1007
  - local/tr8n_server/db/migrate/20110113223509_create_admins.rb
977
1008
  - local/tr8n_server/db/migrate/20110930041143_create_will_filter_filters.rb
978
- - local/tr8n_server/db/migrate/20110930041150_create_tr8n_tables.rb
979
1009
  - local/tr8n_server/db/schema.rb
980
- - local/tr8n_server/db/test.sqlite3
981
1010
  - local/tr8n_server/lib/assets/.gitkeep
982
1011
  - local/tr8n_server/log/.gitkeep
983
1012
  - local/tr8n_server/public/404.html
@@ -987,10 +1016,58 @@ files:
987
1016
  - local/tr8n_server/script/rails
988
1017
  - script/rails
989
1018
  - spec/config/config_spec.rb
990
- - spec/fake_app.rb
991
- - spec/lib/data_token_spec.rb
992
- - spec/lib/transform_token_spec.rb
993
- - spec/models/translation_key_spec.rb
1019
+ - spec/controllers/awards_controller_spec.rb
1020
+ - spec/controllers/base_controller_spec.rb
1021
+ - spec/controllers/dashboard_controller_spec.rb
1022
+ - spec/controllers/forum_controller_spec.rb
1023
+ - spec/controllers/glossary_controller_spec.rb
1024
+ - spec/controllers/help_controller_spec.rb
1025
+ - spec/controllers/language_cases_controller_spec.rb
1026
+ - spec/controllers/language_controller_spec.rb
1027
+ - spec/controllers/phrases_controller_spec.rb
1028
+ - spec/controllers/translations_controller_spec.rb
1029
+ - spec/controllers/translator_controller_spec.rb
1030
+ - spec/lib/tokenized_label_spec.rb
1031
+ - spec/lib/tokens/data_token_spec.rb
1032
+ - spec/lib/tokens/decoration_token_spec.rb
1033
+ - spec/lib/tokens/hidden_token_spec.rb
1034
+ - spec/lib/tokens/method_token_spec.rb
1035
+ - spec/lib/tokens/transform_token_spec.rb
1036
+ - spec/models/tr8n/daily_language_metric_spec.rb
1037
+ - spec/models/tr8n/date_rule_spec.rb
1038
+ - spec/models/tr8n/gender_list_rule_spec.rb
1039
+ - spec/models/tr8n/gender_rule_spec.rb
1040
+ - spec/models/tr8n/glossary_spec.rb
1041
+ - spec/models/tr8n/ip_location_spec.rb
1042
+ - spec/models/tr8n/language_case_rule_spec.rb
1043
+ - spec/models/tr8n/language_case_spec.rb
1044
+ - spec/models/tr8n/language_case_value_map_spec.rb
1045
+ - spec/models/tr8n/language_forum_abuse_report_spec.rb
1046
+ - spec/models/tr8n/language_forum_message_spec.rb
1047
+ - spec/models/tr8n/language_forum_topic_spec.rb
1048
+ - spec/models/tr8n/language_metric_spec.rb
1049
+ - spec/models/tr8n/language_rule_spec.rb
1050
+ - spec/models/tr8n/language_spec.rb
1051
+ - spec/models/tr8n/language_user_spec.rb
1052
+ - spec/models/tr8n/list_rule_spec.rb
1053
+ - spec/models/tr8n/monthly_language_metric_spec.rb
1054
+ - spec/models/tr8n/numeric_rule_spec.rb
1055
+ - spec/models/tr8n/sync_log_spec.rb
1056
+ - spec/models/tr8n/total_language_metric_spec.rb
1057
+ - spec/models/tr8n/translation_domain_spec.rb
1058
+ - spec/models/tr8n/translation_key_comment_spec.rb
1059
+ - spec/models/tr8n/translation_key_lock_spec.rb
1060
+ - spec/models/tr8n/translation_key_source_spec.rb
1061
+ - spec/models/tr8n/translation_key_spec.rb
1062
+ - spec/models/tr8n/translation_source_language_spec.rb
1063
+ - spec/models/tr8n/translation_source_spec.rb
1064
+ - spec/models/tr8n/translation_spec.rb
1065
+ - spec/models/tr8n/translation_vote_spec.rb
1066
+ - spec/models/tr8n/translator_following_spec.rb
1067
+ - spec/models/tr8n/translator_log_spec.rb
1068
+ - spec/models/tr8n/translator_metric_spec.rb
1069
+ - spec/models/tr8n/translator_report_spec.rb
1070
+ - spec/models/tr8n/translator_spec.rb
994
1071
  - spec/spec_helper.rb
995
1072
  - tr8n.gemspec
996
1073
  homepage: https://github.com/berk/tr8n
@@ -1008,7 +1085,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1008
1085
  version: '0'
1009
1086
  segments:
1010
1087
  - 0
1011
- hash: -1543792512908225439
1088
+ hash: -402244242122555476
1012
1089
  required_rubygems_version: !ruby/object:Gem::Requirement
1013
1090
  none: false
1014
1091
  requirements:
@@ -1017,10 +1094,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1017
1094
  version: '0'
1018
1095
  segments:
1019
1096
  - 0
1020
- hash: -1543792512908225439
1097
+ hash: -402244242122555476
1021
1098
  requirements: []
1022
1099
  rubyforge_project: tr8n
1023
- rubygems_version: 1.8.11
1100
+ rubygems_version: 1.8.10
1024
1101
  signing_key:
1025
1102
  specification_version: 3
1026
1103
  summary: Crowd-sourced translation engine for Rails.
@@ -1100,9 +1177,7 @@ test_files:
1100
1177
  - local/tr8n_server/db/migrate/20101207014543_create_users.rb
1101
1178
  - local/tr8n_server/db/migrate/20110113223509_create_admins.rb
1102
1179
  - local/tr8n_server/db/migrate/20110930041143_create_will_filter_filters.rb
1103
- - local/tr8n_server/db/migrate/20110930041150_create_tr8n_tables.rb
1104
1180
  - local/tr8n_server/db/schema.rb
1105
- - local/tr8n_server/db/test.sqlite3
1106
1181
  - local/tr8n_server/lib/assets/.gitkeep
1107
1182
  - local/tr8n_server/log/.gitkeep
1108
1183
  - local/tr8n_server/public/404.html
@@ -1111,8 +1186,56 @@ test_files:
1111
1186
  - local/tr8n_server/public/favicon.ico
1112
1187
  - local/tr8n_server/script/rails
1113
1188
  - spec/config/config_spec.rb
1114
- - spec/fake_app.rb
1115
- - spec/lib/data_token_spec.rb
1116
- - spec/lib/transform_token_spec.rb
1117
- - spec/models/translation_key_spec.rb
1189
+ - spec/controllers/awards_controller_spec.rb
1190
+ - spec/controllers/base_controller_spec.rb
1191
+ - spec/controllers/dashboard_controller_spec.rb
1192
+ - spec/controllers/forum_controller_spec.rb
1193
+ - spec/controllers/glossary_controller_spec.rb
1194
+ - spec/controllers/help_controller_spec.rb
1195
+ - spec/controllers/language_cases_controller_spec.rb
1196
+ - spec/controllers/language_controller_spec.rb
1197
+ - spec/controllers/phrases_controller_spec.rb
1198
+ - spec/controllers/translations_controller_spec.rb
1199
+ - spec/controllers/translator_controller_spec.rb
1200
+ - spec/lib/tokenized_label_spec.rb
1201
+ - spec/lib/tokens/data_token_spec.rb
1202
+ - spec/lib/tokens/decoration_token_spec.rb
1203
+ - spec/lib/tokens/hidden_token_spec.rb
1204
+ - spec/lib/tokens/method_token_spec.rb
1205
+ - spec/lib/tokens/transform_token_spec.rb
1206
+ - spec/models/tr8n/daily_language_metric_spec.rb
1207
+ - spec/models/tr8n/date_rule_spec.rb
1208
+ - spec/models/tr8n/gender_list_rule_spec.rb
1209
+ - spec/models/tr8n/gender_rule_spec.rb
1210
+ - spec/models/tr8n/glossary_spec.rb
1211
+ - spec/models/tr8n/ip_location_spec.rb
1212
+ - spec/models/tr8n/language_case_rule_spec.rb
1213
+ - spec/models/tr8n/language_case_spec.rb
1214
+ - spec/models/tr8n/language_case_value_map_spec.rb
1215
+ - spec/models/tr8n/language_forum_abuse_report_spec.rb
1216
+ - spec/models/tr8n/language_forum_message_spec.rb
1217
+ - spec/models/tr8n/language_forum_topic_spec.rb
1218
+ - spec/models/tr8n/language_metric_spec.rb
1219
+ - spec/models/tr8n/language_rule_spec.rb
1220
+ - spec/models/tr8n/language_spec.rb
1221
+ - spec/models/tr8n/language_user_spec.rb
1222
+ - spec/models/tr8n/list_rule_spec.rb
1223
+ - spec/models/tr8n/monthly_language_metric_spec.rb
1224
+ - spec/models/tr8n/numeric_rule_spec.rb
1225
+ - spec/models/tr8n/sync_log_spec.rb
1226
+ - spec/models/tr8n/total_language_metric_spec.rb
1227
+ - spec/models/tr8n/translation_domain_spec.rb
1228
+ - spec/models/tr8n/translation_key_comment_spec.rb
1229
+ - spec/models/tr8n/translation_key_lock_spec.rb
1230
+ - spec/models/tr8n/translation_key_source_spec.rb
1231
+ - spec/models/tr8n/translation_key_spec.rb
1232
+ - spec/models/tr8n/translation_source_language_spec.rb
1233
+ - spec/models/tr8n/translation_source_spec.rb
1234
+ - spec/models/tr8n/translation_spec.rb
1235
+ - spec/models/tr8n/translation_vote_spec.rb
1236
+ - spec/models/tr8n/translator_following_spec.rb
1237
+ - spec/models/tr8n/translator_log_spec.rb
1238
+ - spec/models/tr8n/translator_metric_spec.rb
1239
+ - spec/models/tr8n/translator_report_spec.rb
1240
+ - spec/models/tr8n/translator_spec.rb
1118
1241
  - spec/spec_helper.rb