tr8n 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. data/.gitignore +6 -3
  2. data/.rspec +2 -0
  3. data/Gemfile +3 -6
  4. data/Gemfile.lock +21 -6
  5. data/README.rdoc +61 -33
  6. data/Rakefile +1 -11
  7. data/app/assets/images/tr8n/photo_system.gif +0 -0
  8. data/app/assets/stylesheets/tr8n/application.css +42 -1
  9. data/{test/dummy/app/assets/stylesheets/components.css.scss → app/assets/stylesheets/tr8n/component.css.scss} +0 -0
  10. data/{test/dummy/app/assets/stylesheets → app/assets/stylesheets/tr8n}/layout.css.scss +0 -0
  11. data/app/assets/stylesheets/tr8n/tr8n.css.scss +16 -8
  12. data/app/controllers/tr8n/admin/base_controller.rb +1 -1
  13. data/app/controllers/tr8n/admin/clientsdk_controller.rb +1 -1
  14. data/app/controllers/tr8n/admin/domain_controller.rb +1 -1
  15. data/app/controllers/tr8n/admin/forum_controller.rb +1 -1
  16. data/app/controllers/tr8n/admin/glossary_controller.rb +1 -1
  17. data/app/controllers/tr8n/admin/language_controller.rb +1 -1
  18. data/app/controllers/tr8n/admin/translation_controller.rb +1 -1
  19. data/app/controllers/tr8n/admin/translation_key_controller.rb +5 -1
  20. data/app/controllers/tr8n/admin/translator_controller.rb +1 -1
  21. data/app/{helpers/tr8n/application_helper.rb → controllers/tr8n/api/v1/sync_controller.rb} +6 -3
  22. data/app/controllers/tr8n/awards_controller.rb +12 -12
  23. data/app/controllers/tr8n/base_controller.rb +140 -137
  24. data/app/controllers/tr8n/dashboard_controller.rb +2 -1
  25. data/app/controllers/tr8n/forum_controller.rb +1 -1
  26. data/app/controllers/tr8n/glossary_controller.rb +1 -1
  27. data/app/controllers/tr8n/help_controller.rb +1 -1
  28. data/app/controllers/tr8n/language_cases_controller.rb +43 -45
  29. data/app/controllers/tr8n/language_controller.rb +1 -1
  30. data/app/controllers/tr8n/phrases_controller.rb +1 -1
  31. data/app/controllers/tr8n/translations_controller.rb +1 -1
  32. data/app/controllers/tr8n/translator_controller.rb +1 -1
  33. data/app/helpers/tr8n/base_helper.rb +0 -4
  34. data/app/models/tr8n/base_filter.rb +1 -1
  35. data/app/models/tr8n/daily_language_metric.rb +1 -1
  36. data/app/models/tr8n/date_rule.rb +1 -1
  37. data/app/models/tr8n/gender_list_rule.rb +1 -1
  38. data/app/models/tr8n/gender_rule.rb +1 -1
  39. data/app/models/tr8n/glossary.rb +1 -1
  40. data/app/models/tr8n/glossary_filter.rb +1 -1
  41. data/app/models/tr8n/integration/ru/russian_gender_list_rule.rb +1 -1
  42. data/app/models/tr8n/integration/ru/russian_numeric_rule.rb +1 -1
  43. data/app/models/tr8n/ip_location.rb +1 -1
  44. data/app/models/tr8n/ip_location_filter.rb +1 -1
  45. data/app/models/tr8n/language.rb +17 -8
  46. data/app/models/tr8n/language_case.rb +1 -1
  47. data/app/models/tr8n/language_case_filter.rb +1 -1
  48. data/app/models/tr8n/language_case_rule.rb +1 -1
  49. data/app/models/tr8n/language_case_rule_filter.rb +1 -1
  50. data/app/models/tr8n/language_case_value_map.rb +1 -1
  51. data/app/models/tr8n/language_case_value_map_filter.rb +1 -1
  52. data/app/models/tr8n/language_filter.rb +1 -1
  53. data/app/models/tr8n/language_forum_abuse_report.rb +1 -1
  54. data/app/models/tr8n/language_forum_abuse_report_filter.rb +1 -1
  55. data/app/models/tr8n/language_forum_message.rb +2 -2
  56. data/app/models/tr8n/language_forum_message_filter.rb +1 -1
  57. data/app/models/tr8n/language_forum_topic.rb +3 -3
  58. data/app/models/tr8n/language_forum_topic_filter.rb +1 -1
  59. data/app/models/tr8n/language_metric.rb +2 -2
  60. data/app/models/tr8n/language_metric_filter.rb +1 -1
  61. data/app/models/tr8n/language_rule.rb +37 -2
  62. data/app/models/tr8n/language_rule_filter.rb +1 -1
  63. data/app/models/tr8n/language_user.rb +3 -3
  64. data/app/models/tr8n/language_user_filter.rb +1 -1
  65. data/app/models/tr8n/list_rule.rb +1 -1
  66. data/app/models/tr8n/monthly_language_metric.rb +2 -2
  67. data/app/models/tr8n/numeric_rule.rb +1 -1
  68. data/app/models/tr8n/sync_log.rb +76 -0
  69. data/app/{controllers/tr8n/application_controller.rb → models/tr8n/sync_log_filter.rb} +4 -3
  70. data/app/models/tr8n/total_language_metric.rb +5 -4
  71. data/app/models/tr8n/translation.rb +61 -13
  72. data/app/models/tr8n/translation_domain.rb +1 -1
  73. data/app/models/tr8n/translation_domain_filter.rb +1 -1
  74. data/app/models/tr8n/translation_filter.rb +1 -1
  75. data/app/models/tr8n/translation_key.rb +33 -5
  76. data/app/models/tr8n/translation_key_comment.rb +1 -1
  77. data/app/models/tr8n/translation_key_comment_filter.rb +1 -1
  78. data/app/models/tr8n/translation_key_filter.rb +1 -1
  79. data/app/models/tr8n/translation_key_lock.rb +2 -2
  80. data/app/models/tr8n/translation_key_lock_filter.rb +1 -1
  81. data/app/models/tr8n/translation_key_source.rb +2 -2
  82. data/app/models/tr8n/translation_key_source_filter.rb +1 -1
  83. data/app/models/tr8n/translation_source.rb +2 -2
  84. data/app/models/tr8n/translation_source_filter.rb +1 -1
  85. data/app/models/tr8n/translation_vote.rb +3 -4
  86. data/app/models/tr8n/translation_vote_filter.rb +1 -1
  87. data/app/models/tr8n/translator.rb +19 -5
  88. data/app/models/tr8n/translator_filter.rb +1 -1
  89. data/app/models/tr8n/translator_following.rb +2 -2
  90. data/app/models/tr8n/translator_following_filter.rb +1 -1
  91. data/app/models/tr8n/translator_log.rb +1 -1
  92. data/app/models/tr8n/translator_log_filter.rb +1 -1
  93. data/app/models/tr8n/translator_metric.rb +15 -21
  94. data/app/models/tr8n/translator_metric_filter.rb +1 -1
  95. data/app/models/tr8n/translator_report.rb +2 -2
  96. data/app/models/tr8n/translator_report_filter.rb +1 -1
  97. data/app/models/tr8n/value_rule.rb +1 -1
  98. data/app/views/tr8n/admin/common/_paginator.html.erb +29 -17
  99. data/app/views/tr8n/admin/translation_key/_tabs.html.erb +3 -1
  100. data/app/views/tr8n/admin/translation_key/sync_logs.html.erb +5 -0
  101. data/app/views/tr8n/awards/index.html.erb +0 -2
  102. data/app/views/tr8n/common/_paginator.html.erb +24 -6
  103. data/app/views/tr8n/common/_tabs.html.erb +9 -5
  104. data/app/views/tr8n/forum/_messages.html.erb +1 -1
  105. data/app/views/tr8n/forum/index.html.erb +1 -1
  106. data/app/views/tr8n/glossary/index.html.erb +2 -2
  107. data/app/views/tr8n/{home → help}/credits.html.erb +0 -0
  108. data/app/views/tr8n/{home → help}/license.html.erb +0 -0
  109. data/app/views/tr8n/language_cases/index.html.erb +2 -2
  110. data/app/views/tr8n/phrases/_comments_module.html.erb +1 -1
  111. data/app/views/tr8n/phrases/index.html.erb +2 -6
  112. data/app/views/tr8n/translations/_list.html.erb +2 -6
  113. data/config/routes.rb +2 -2
  114. data/config/tr8n/config.yml +48 -13
  115. data/config/tr8n/rules/default_language_cases.yml +272 -0
  116. data/config/tr8n/tokens/data.yml +3 -1
  117. data/db/migrate/20111003194443_create_tr8n_sync_tables.rb +22 -0
  118. data/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +5 -0
  119. data/doc/classes.graffle +7049 -5152
  120. data/doc/classes.pdf +0 -0
  121. data/lib/generators/tr8n/templates/{create_tr8n_tables.rb → db/create_tr8n_tables.rb} +0 -0
  122. data/lib/generators/tr8n/templates/layouts/tr8n.html.erb +49 -0
  123. data/lib/generators/tr8n/templates/layouts/tr8n_admin.html.erb +61 -0
  124. data/lib/generators/tr8n/tr8n_generator.rb +11 -4
  125. data/lib/tasks/{tr8n_tasks.rake → tr8n.rake} +4 -0
  126. data/{app/controllers/tr8n/home_controller.rb → lib/tr8n/cache_adapters/memcached.rb} +12 -15
  127. data/lib/tr8n/config.rb +96 -53
  128. data/lib/tr8n/extensions/action_controller_extension.rb +1 -1
  129. data/lib/tr8n/extensions/action_view_extension.rb +4 -28
  130. data/lib/tr8n/tokens/data_token.rb +1 -1
  131. data/lib/tr8n/tokens/method_token.rb +1 -1
  132. data/lib/tr8n/tokens/transform_token.rb +1 -1
  133. data/lib/tr8n/version.rb +1 -1
  134. data/{test/dummy → local/tr8n_server}/Rakefile +1 -1
  135. data/{test/dummy → local/tr8n_server}/app/assets/javascripts/application.js +0 -0
  136. data/{test/dummy → local/tr8n_server}/app/assets/stylesheets/admin.css +0 -0
  137. data/{test/dummy → local/tr8n_server}/app/assets/stylesheets/application.css +0 -0
  138. data/local/tr8n_server/app/assets/stylesheets/components.css.scss +211 -0
  139. data/local/tr8n_server/app/assets/stylesheets/layout.css.scss +143 -0
  140. data/{test/dummy → local/tr8n_server}/app/controllers/admin/admins_controller.rb +0 -0
  141. data/{test/dummy → local/tr8n_server}/app/controllers/admin/base_controller.rb +0 -0
  142. data/{test/dummy → local/tr8n_server}/app/controllers/admin/users_controller.rb +0 -0
  143. data/{test/dummy → local/tr8n_server}/app/controllers/application_controller.rb +5 -0
  144. data/{test/dummy → local/tr8n_server}/app/controllers/demo_controller.rb +0 -0
  145. data/local/tr8n_server/app/controllers/home_controller.rb +4 -0
  146. data/{test/dummy → local/tr8n_server}/app/controllers/login_controller.rb +1 -1
  147. data/{test/dummy → local/tr8n_server}/app/helpers/application_helper.rb +0 -0
  148. data/{test/dummy → local/tr8n_server}/app/helpers/home_helper.rb +0 -0
  149. data/{test/dummy → local/tr8n_server}/app/mailers/.gitkeep +0 -0
  150. data/{test/dummy → local/tr8n_server}/app/models/.gitkeep +0 -0
  151. data/{test/dummy → local/tr8n_server}/app/models/admin.rb +0 -0
  152. data/{test/dummy → local/tr8n_server}/app/models/admin_filter.rb +0 -0
  153. data/{test/dummy → local/tr8n_server}/app/models/user.rb +0 -0
  154. data/{test/dummy → local/tr8n_server}/app/views/admin/admins/index.html.erb +0 -0
  155. data/{test/dummy → local/tr8n_server}/app/views/admin/users/index.html.erb +0 -0
  156. data/{test/dummy → local/tr8n_server}/app/views/demo/index.rhtml +0 -0
  157. data/{test/dummy → local/tr8n_server}/app/views/demo/tokens.rhtml +0 -0
  158. data/{app/views/tr8n → local/tr8n_server/app/views}/home/index.html.erb +1 -2
  159. data/local/tr8n_server/app/views/kaminari/_first_page.html.erb +11 -0
  160. data/local/tr8n_server/app/views/kaminari/_gap.html.erb +8 -0
  161. data/local/tr8n_server/app/views/kaminari/_last_page.html.erb +11 -0
  162. data/local/tr8n_server/app/views/kaminari/_next_page.html.erb +11 -0
  163. data/local/tr8n_server/app/views/kaminari/_page.html.erb +12 -0
  164. data/local/tr8n_server/app/views/kaminari/_paginator.html.erb +23 -0
  165. data/local/tr8n_server/app/views/kaminari/_prev_page.html.erb +11 -0
  166. data/{test/dummy → local/tr8n_server}/app/views/layouts/_flashes.html.erb +0 -0
  167. data/{test/dummy → local/tr8n_server}/app/views/layouts/_footer.html.erb +3 -3
  168. data/{test/dummy → local/tr8n_server}/app/views/layouts/_header.html.erb +1 -1
  169. data/{test/dummy → local/tr8n_server}/app/views/layouts/admin.html.erb +0 -0
  170. data/{test/dummy → local/tr8n_server}/app/views/layouts/application.html.erb +0 -0
  171. data/local/tr8n_server/app/views/layouts/tr8n.html.erb +51 -0
  172. data/local/tr8n_server/app/views/layouts/tr8n_admin.html.erb +61 -0
  173. data/{test/dummy → local/tr8n_server}/app/views/login/index.html.erb +0 -0
  174. data/{test/dummy → local/tr8n_server}/app/views/login/register.html.erb +8 -13
  175. data/{test/dummy → local/tr8n_server}/config.ru +1 -1
  176. data/{test/dummy → local/tr8n_server}/config/application.rb +2 -1
  177. data/{test/dummy → local/tr8n_server}/config/boot.rb +0 -0
  178. data/{test/dummy → local/tr8n_server}/config/database.yml +0 -0
  179. data/{test/dummy → local/tr8n_server}/config/environment.rb +1 -1
  180. data/{test/dummy → local/tr8n_server}/config/environments/development.rb +3 -1
  181. data/{test/dummy → local/tr8n_server}/config/environments/production.rb +1 -1
  182. data/{test/dummy → local/tr8n_server}/config/environments/test.rb +1 -1
  183. data/{test/dummy → local/tr8n_server}/config/initializers/backtrace_silencers.rb +0 -0
  184. data/{test/dummy → local/tr8n_server}/config/initializers/inflections.rb +0 -0
  185. data/{test/dummy → local/tr8n_server}/config/initializers/mime_types.rb +0 -0
  186. data/{test/dummy → local/tr8n_server}/config/initializers/secret_token.rb +1 -1
  187. data/{test/dummy → local/tr8n_server}/config/initializers/session_store.rb +2 -2
  188. data/{test/dummy → local/tr8n_server}/config/initializers/wrap_parameters.rb +0 -0
  189. data/{test/dummy → local/tr8n_server}/config/locales/en.yml +0 -0
  190. data/{test/dummy → local/tr8n_server}/config/routes.rb +2 -2
  191. data/{test/dummy → local/tr8n_server}/config/tr8n/config.yml +40 -11
  192. data/{test/dummy → local/tr8n_server}/config/tr8n/data/ip_locations.csv +0 -0
  193. data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_date_rules.yml +0 -0
  194. data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_gender_list_rules.yml +0 -0
  195. data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_gender_rules.yml +0 -0
  196. data/local/tr8n_server/config/tr8n/rules/default_language_cases.yml +272 -0
  197. data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_list_rules.yml +0 -0
  198. data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_numeric_rules.yml +0 -0
  199. data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_value_rules.yml +0 -0
  200. data/{test/dummy → local/tr8n_server}/config/tr8n/site/default_glossary.yml +0 -0
  201. data/{test/dummy → local/tr8n_server}/config/tr8n/site/default_languages.yml +0 -0
  202. data/{test/dummy → local/tr8n_server}/config/tr8n/site/features.yml +0 -0
  203. data/{test/dummy → local/tr8n_server}/config/tr8n/site/shortcuts.yml +0 -0
  204. data/{test/dummy → local/tr8n_server}/config/tr8n/site/sitemap.json +0 -0
  205. data/{test/dummy → local/tr8n_server}/config/tr8n/tokens/data.yml +2 -0
  206. data/{test/dummy → local/tr8n_server}/config/tr8n/tokens/decorations.yml +0 -0
  207. data/{test/dummy → local/tr8n_server}/config/will_filter/config.yml +0 -0
  208. data/{test/dummy → local/tr8n_server}/db/migrate/20101207014543_create_users.rb +0 -0
  209. data/{test/dummy → local/tr8n_server}/db/migrate/20110113223509_create_admins.rb +0 -0
  210. data/{test/dummy → local/tr8n_server}/db/migrate/20110930041143_create_will_filter_filters.rb +0 -0
  211. data/{test/dummy → local/tr8n_server}/db/migrate/20110930041150_create_tr8n_tables.rb +0 -0
  212. data/local/tr8n_server/db/migrate/20111003194443_create_tr8n_sync_tables.rb +22 -0
  213. data/local/tr8n_server/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +5 -0
  214. data/{test/dummy → local/tr8n_server}/db/schema.rb +15 -1
  215. data/{test/dummy → local/tr8n_server}/lib/assets/.gitkeep +0 -0
  216. data/{test/dummy → local/tr8n_server}/public/404.html +0 -0
  217. data/{test/dummy → local/tr8n_server}/public/422.html +0 -0
  218. data/{test/dummy → local/tr8n_server}/public/500.html +0 -0
  219. data/{test/dummy → local/tr8n_server}/public/favicon.ico +0 -0
  220. data/{test/dummy → local/tr8n_server}/script/rails +0 -0
  221. data/script/rails +1 -1
  222. data/spec/config/config_spec.rb +10 -0
  223. data/spec/fake_app.rb +50 -0
  224. data/spec/lib/data_token_spec.rb +26 -0
  225. data/spec/lib/transform_token_spec.rb +22 -0
  226. data/spec/models/translation_key_spec.rb +63 -0
  227. data/spec/spec_helper.rb +29 -0
  228. data/tr8n.gemspec +3 -1
  229. metadata +264 -245
  230. data/app/assets/images/tr8n/tr8n_logo.png +0 -0
  231. data/app/assets/images/tr8n/tr8n_logo2.gif +0 -0
  232. data/app/controllers/tr8n/login_controller.rb +0 -86
  233. data/app/views/layouts/_footer.html.erb +0 -15
  234. data/app/views/layouts/_header.html.erb +0 -12
  235. data/app/views/layouts/_html_head.html.erb +0 -5
  236. data/app/views/layouts/tr8n.html.erb +0 -21
  237. data/app/views/layouts/tr8n/application.html.erb +0 -14
  238. data/app/views/layouts/tr8n_admin.html.erb +0 -33
  239. data/app/views/tr8n/home/languages.html.erb +0 -7
  240. data/app/views/tr8n/login/index.html.erb +0 -33
  241. data/app/views/tr8n/login/register.html.erb +0 -57
  242. data/config/tr8n/rules/default_cases.yml +0 -141
  243. data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/actions.css.scssc +0 -0
  244. data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/buttons.css.scssc +0 -0
  245. data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/calendar.css.scssc +0 -0
  246. data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/exporter.css.scssc +0 -0
  247. data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/filter.css.scssc +0 -0
  248. data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/results.css.scssc +0 -0
  249. data/test/dummy/.sass-cache/3d45bab40fcae805deb2750a9342f5b355a9f2bf/components.css.scssc +0 -0
  250. data/test/dummy/.sass-cache/3d45bab40fcae805deb2750a9342f5b355a9f2bf/layout.css.scssc +0 -0
  251. data/test/dummy/.sass-cache/50f723c1dd802042d0091035528d53e6d5bc5b50/tr8n.css.scssc +0 -0
  252. data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/actions.css.scssc +0 -0
  253. data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/buttons.css.scssc +0 -0
  254. data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/calendar.css.scssc +0 -0
  255. data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/exporter.css.scssc +0 -0
  256. data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/filter.css.scssc +0 -0
  257. data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/results.css.scssc +0 -0
  258. data/test/dummy/app/assets/stylesheets/keyboard.css +0 -147
  259. data/test/dummy/config/tr8n/rules/default_cases.yml +0 -141
  260. data/test/dummy/log/.gitkeep +0 -0
  261. data/test/dummy/test/functional/home_controller_test.rb +0 -9
  262. data/test/dummy/test/unit/helpers/home_helper_test.rb +0 -4
  263. data/test/integration/navigation_test.rb +0 -10
  264. data/test/test_helper.rb +0 -10
  265. data/test/tr8n_test.rb +0 -7
@@ -19,7 +19,7 @@
19
19
  </div>
20
20
 
21
21
  <div style="margin-top:10px; margin-bottom:10px; border: 1px dotted #ccc; padding:10px;">
22
- <%= render :partial => "/tr8n/common/paginator", :locals => {:objects => @maps, :subject => 'case map'} %>
22
+ <%= tr8n_paginator_tag(@maps, :subject => 'case map') %>
23
23
 
24
24
  <table>
25
25
  <tr style="border-bottom:1px solid #ccc;">
@@ -46,7 +46,7 @@
46
46
 
47
47
  </table>
48
48
 
49
- <%= render :partial => "/tr8n/common/paginator", :locals => {:objects => @maps, :subject => 'case map'} %>
49
+ <%= tr8n_paginator_tag(@maps, :subject => 'case map') %>
50
50
  </div>
51
51
 
52
52
  <%= render :partial => "/tr8n/common/footer" %>
@@ -8,7 +8,7 @@
8
8
  <div class="section" id="comments_content">
9
9
  <div style="margin-bottom:10px;">
10
10
  <% if @comments.any? %>
11
- <%=tr8n_paginator_tag(@comments, "comment")%>
11
+ <%=tr8n_paginator_tag(@comments, :subject => "comment")%>
12
12
 
13
13
  <table style="width:100%; ">
14
14
  <% @comments.each do |comment| %>
@@ -27,9 +27,7 @@
27
27
  </div>
28
28
 
29
29
  <div class="section">
30
- <% if @translation_keys.any? %>
31
- <%= tr8n_paginator_tag(@translation_keys, 'phrase') %>
32
- <% end %>
30
+ <%= tr8n_paginator_tag(@translation_keys, :subject => 'phrase') if @translation_keys.any? %>
33
31
 
34
32
  <table style="width:100%">
35
33
  <tr style="border-bottom:2px solid #ccc;">
@@ -72,9 +70,7 @@
72
70
  <div style="text-align:left; padding-top:10px; font-size:12px;"><%=trla("No phrases found")%></div>
73
71
  <% end %>
74
72
 
75
- <% if @translation_keys.any? %>
76
- <%= render :partial => "/tr8n/common/paginator", :locals => {:objects => @translation_keys, :subject => 'phrase'} %>
77
- <% end %>
73
+ <%= tr8n_paginator_tag(@translation_keys, :subject => 'phrase') if @translation_keys.any? %>
78
74
  </div>
79
75
  <%= render :partial => "/tr8n/common/footer" %>
80
76
 
@@ -1,6 +1,4 @@
1
- <% if mode == :list and translations.any? %>
2
- <%= render :partial => "/tr8n/common/paginator", :locals => {:objects => translations, :subject => 'translation'} %>
3
- <% end %>
1
+ <%= tr8n_paginator_tag(translations, :subject => 'translation') if mode == :list and translations.any? %>
4
2
 
5
3
  <table style="width:100%;" cellpadding="5px" cellspacing="3px">
6
4
  <tr style="border-bottom:1px solid #ccc;">
@@ -25,9 +23,7 @@
25
23
  <div style="text-align:left; padding-top:10px; font-size:12px;"><%=trla("No translations found")%></div>
26
24
  <% end %>
27
25
 
28
- <% if mode == :list and translations.any? %>
29
- <%= render :partial => "/tr8n/common/paginator", :locals => {:objects => translations, :subject => 'translation'} %>
30
- <% end %>
26
+ <%= tr8n_paginator_tag(translations, :subject => 'translation') if mode == :list and translations.any? %>
31
27
 
32
28
  <% if [:edit, :view].include?(mode) %>
33
29
  <script>
@@ -23,7 +23,7 @@
23
23
 
24
24
  Tr8n::Engine.routes.draw do
25
25
  [:awards, :chart, :dashboard, :forum, :glossary, :help, :language_cases,
26
- :language, :phrases, :translations, :translator, :home, :login].each do |ctrl|
26
+ :language, :phrases, :translations, :translator].each do |ctrl|
27
27
  match "#{ctrl}(/:action)", :controller => "#{ctrl}"
28
28
  end
29
29
 
@@ -37,7 +37,7 @@ Tr8n::Engine.routes.draw do
37
37
  end
38
38
 
39
39
  namespace :tr8n do
40
- root :to => "home#index"
40
+ root :to => "dashboard#index"
41
41
  namespace :admin do
42
42
  root :to => "language#index"
43
43
  end
@@ -7,6 +7,12 @@
7
7
  # environment settings at the bottom of the file.
8
8
  #
9
9
  # Alternatively, you can overload any of the methods of Tr8n::Config
10
+ #
11
+ # If you would like to manage the configurations on the live site,
12
+ # try out the Registry gem, located here:
13
+ #
14
+ # http://www.github.com/berk/registry
15
+ #
10
16
  #############################################################################
11
17
 
12
18
  defaults: &defaults
@@ -63,11 +69,15 @@ defaults: &defaults
63
69
  #
64
70
  # For example:
65
71
  #
66
- # cache_adapter: ActiveSupport::Cache
67
- # cache_store: memory_store
68
- # cache_store: file_store
69
- # cache_store: drb_store
70
- # cache_store: [mem_cache_store, 'localhost:11211']
72
+ # adapter: ActiveSupport::Cache
73
+ # store: memory_store # only for dev or test - single instance
74
+ # store: file_store # only for dev or test - single instance
75
+ # store: drb_store
76
+ # store: [mem_cache_store, 'localhost:11211'] # recommended
77
+ #
78
+ # If you choose to use memcached, don't forget to add the gem to your Gemfile:
79
+ #
80
+ # gem 'memcache-client'
71
81
  #
72
82
  # You can also provide your own implementation of the adapter:
73
83
  #
@@ -76,7 +86,7 @@ defaults: &defaults
76
86
  #############################################################################
77
87
  caching:
78
88
  enabled: false
79
- adapter: "ActiveSupport::Cache"
89
+ adapter: ActiveSupport::Cache
80
90
  store: ['mem_cache_store', 'localhost:11211']
81
91
  version: 1 # you can change the version to invalidate the cache
82
92
 
@@ -96,13 +106,13 @@ defaults: &defaults
96
106
  title: "Tr8n" # site title - provide your site title here
97
107
  contact_email: "admin@tr8n.org" # contact email for questions about translations
98
108
  current_locale_method: "current_locale" # application controller method that sets and returns current locale
99
- default_url: "/tr8n/home" # default site url where to redirect the user if Tr8n is disabled
109
+ default_url: "/" # default site url where to redirect the user if Tr8n is disabled
100
110
  default_locale: "en-US" # locale of the site default language
101
111
  sitemap_path: "/config/tr8n/site/sitemap.json" # location of the sitemap definition file
102
112
  splash_screen: "/tr8n/common/splash_screen" # location of the Tr8n splash screen
103
- tr8n_layout: "tr8n" # layout for the tr8n pages
113
+ tr8n_layout: "tr8n" # layout for the tr8n pages - change it to your layout
104
114
  tr8n_helpers: [] # if you need to add extra helpers
105
- admin_layout: "tr8n_admin" # layout to be used for the admin user interface
115
+ admin_layout: "tr8n_admin" # layout to be used for the admin user interface - change it to your layout
106
116
  admin_helpers: [] # if you need to add extra helpers
107
117
  before_filters: [] # filters from application controller
108
118
  skip_before_filters: [] # filters from application controller
@@ -115,8 +125,8 @@ defaults: &defaults
115
125
  id: "id"
116
126
  name: "name"
117
127
  gender: "gender"
118
- admin: "admin?"
119
- guest: "guest?"
128
+ admin: "admin?"
129
+ guest: "guest?" # if current_user is nil, the user is automatically a guest
120
130
  mugshot: "mugshot"
121
131
  link: "link"
122
132
  locale: "locale"
@@ -198,8 +208,10 @@ defaults: &defaults
198
208
  regular: 0
199
209
  trusted: 50
200
210
  professional: 100
201
- manager: 1000 # reserved for translation tools
202
- admin: 10000 # reserved for admin tools
211
+ manager: 1000 # reserved for translation tools
212
+ admin: 10000 # reserved for admin tools
213
+ application: 100000 # reserved for applications
214
+ system: 1000000 # reserved for system
203
215
 
204
216
  default_translation_key_level: 0
205
217
  #############################################################################
@@ -222,6 +234,29 @@ defaults: &defaults
222
234
  monthname_abbr_year: '%b %d, %Y' # Jul 4, 2008
223
235
  date_time: '%m/%d/%Y at %H:%M' # 01/03/1010 at 5:30
224
236
 
237
+ #############################################################################
238
+ # You can synchronize your translation keys and translations with the
239
+ # tr8n.net service. This way you can get your site translated by
240
+ # millions of users from around the internet. Visit the following url and
241
+ # register as a developer, register your application and copy your app key
242
+ # and secret in the lines below:
243
+ #
244
+ # http://tr8n.net
245
+ #
246
+ # To sychronize your translations run the following command:
247
+ #
248
+ # rake tr8n:sync
249
+ #
250
+ # You can run this command as often as your account on tr8n.net permits you.
251
+ #############################################################################
252
+ synchronization:
253
+ server: "http://tr8n.net" # alternative, regional locations will be available in the future
254
+ key: "iKjOrZjor68a4UeCD3Cq2r9t9ibBC4HnYoMNMrN7" # replace this with your key
255
+ secret: "iKjOrZjor68a4UeCD3Cq2r9t9ibBC4HnYoMNMrN7" # replace this with your secret
256
+ batch_size: 50 # how many kesy to send to the server at a time
257
+ create_rules: true # force rules creation, or skip translations for rules that don't exist
258
+ all_languages: false # use only enabled languages, or all languages
259
+
225
260
  #############################################################################
226
261
  # Environment Settings
227
262
  # You can overload any feature defined in the defaults for any environment
@@ -0,0 +1,272 @@
1
+ #############################################################################
2
+ #
3
+ # Tr8n Default Language Cases
4
+ #
5
+ #############################################################################
6
+
7
+ en-US:
8
+ nom:
9
+ keyword: "nom"
10
+ latin_name: "Nominative"
11
+ native_name: "Nominative"
12
+ description: "Used for any noun or pronoun that is the subject of a verb"
13
+ application: "phrase"
14
+ obj:
15
+ keyword: "obj"
16
+ latin_name: "Objective"
17
+ native_name: "Objective"
18
+ description: "Used in the direct object, indirect object, object of preposition, object complement, and subject of an infinitive"
19
+ application: "phrase"
20
+ pos:
21
+ keyword: "pos"
22
+ latin_name: "Possessive"
23
+ native_name: "Possessive"
24
+ description: "Used to indicate possession (i.e., ownership). It is usually created by adding 's to the word"
25
+ application: "phrase"
26
+ rules:
27
+ 1:
28
+ multipart: false
29
+ gender: none
30
+ part1: ends_in
31
+ value1: "s"
32
+ operation: append
33
+ operation_value: "'"
34
+ 2:
35
+ multipart: false
36
+ gender: none
37
+ part1: does_not_end_in
38
+ value1: "s"
39
+ operation: append
40
+ operation_value: "'s"
41
+ ord:
42
+ keyword: "ord"
43
+ latin_name: "Ordinal"
44
+ native_name: "Ordinal"
45
+ description: "The adjective form of the cardinal numbers"
46
+ application: "phrase"
47
+ rules:
48
+ 1:
49
+ multipart: true
50
+ gender: none
51
+ part1: ends_in
52
+ value1: "1"
53
+ operator: and
54
+ part2: does_not_end_in
55
+ value2: "11"
56
+ operation: append
57
+ operation_value: "st"
58
+ 2:
59
+ multipart: true
60
+ gender: none
61
+ part1: ends_in
62
+ value1: "2"
63
+ operator: and
64
+ part2: does_not_end_in
65
+ value2: "12"
66
+ operation: append
67
+ operation_value: "nd"
68
+ 3:
69
+ multipart: true
70
+ gender: none
71
+ part1: ends_in
72
+ value1: "3"
73
+ operator: and
74
+ part2: does_not_end_in
75
+ value2: "13"
76
+ operation: append
77
+ operation_value: "rd"
78
+ 4:
79
+ multipart: false
80
+ gender: none
81
+ part1: ends_in
82
+ value1: "0,4,5,6,7,8,9,11,12,13"
83
+ operation: append
84
+ operation_value: "th"
85
+ times:
86
+ keyword: "times"
87
+ latin_name: "Iteration"
88
+ native_name: "Iteration"
89
+ description: "The iteration form of the cardinal numbers"
90
+ application: "phrase"
91
+ rules:
92
+ 1:
93
+ multipart: true
94
+ gender: none
95
+ part1: is
96
+ value1: "1"
97
+ operation: replace
98
+ operation_value: "once"
99
+ 2:
100
+ multipart: true
101
+ gender: none
102
+ part1: is
103
+ value1: "2"
104
+ operation: replace
105
+ operation_value: "twice"
106
+ 3:
107
+ multipart: true
108
+ gender: none
109
+ part1: is
110
+ value1: "3"
111
+ operation: replace
112
+ operation_value: "thrice"
113
+ 3:
114
+ multipart: false
115
+ gender: none
116
+ part1: is_not
117
+ value1: "1,2,3"
118
+ operation: append
119
+ operation_value: " times"
120
+ ordinal:
121
+ keyword: "ordinal"
122
+ latin_name: "Ordinal"
123
+ native_name: "Ordinal"
124
+ description: "The adjective form of the cardinal numbers"
125
+ application: "phrase"
126
+ rules:
127
+ 1:
128
+ multipart: true
129
+ gender: none
130
+ part1: is
131
+ value1: "1"
132
+ operation: replace
133
+ operation_value: "first"
134
+ 2:
135
+ multipart: true
136
+ gender: none
137
+ part1: is
138
+ value1: "2"
139
+ operation: replace
140
+ operation_value: "second"
141
+ 3:
142
+ multipart: true
143
+ gender: none
144
+ part1: is
145
+ value1: "3"
146
+ operation: replace
147
+ operation_value: "third"
148
+ 4:
149
+ multipart: true
150
+ gender: none
151
+ part1: ends_in
152
+ value1: "1"
153
+ operator: and
154
+ part2: does_not_end_in
155
+ value2: "11"
156
+ operation: append
157
+ operation_value: "st"
158
+ 5:
159
+ multipart: true
160
+ gender: none
161
+ part1: ends_in
162
+ value1: "2"
163
+ operator: and
164
+ part2: does_not_end_in
165
+ value2: "12"
166
+ operation: append
167
+ operation_value: "nd"
168
+ 6:
169
+ multipart: true
170
+ gender: none
171
+ part1: ends_in
172
+ value1: "3"
173
+ operator: and
174
+ part2: does_not_end_in
175
+ value2: "13"
176
+ operation: append
177
+ operation_value: "rd"
178
+ 7:
179
+ multipart: false
180
+ gender: none
181
+ part1: ends_in
182
+ value1: "0,4,5,6,7,8,9,11,12,13"
183
+ operation: append
184
+ operation_value: "th"
185
+
186
+ ru:
187
+ case1:
188
+ keyword: "nom"
189
+ latin_name: "Nominativus"
190
+ native_name: "Именительный падеж"
191
+ description: "Есть - Кто? Что?"
192
+ application: "words"
193
+ case2:
194
+ keyword: "gen"
195
+ latin_name: "Genitivus"
196
+ native_name: "Родительный падеж"
197
+ description: "Нет - Кого? Чего?"
198
+ application: "words"
199
+ rules:
200
+ 1:
201
+ multipart: false
202
+ gender: male
203
+ part1: ends_in
204
+ value1: "б, в, г, д, ж, з, к, л, м, н, п, р, с, т, ф, х, ц, ч, ш, щ"
205
+ operation: append
206
+ operation_value: "a"
207
+ 2:
208
+ multipart: false
209
+ gender: male
210
+ part1: ends_in
211
+ value1: "й"
212
+ operation: replace
213
+ operation_value: "я"
214
+ 3:
215
+ multipart: false
216
+ gender: female
217
+ part1: ends_in
218
+ value1: "а"
219
+ operation: replace
220
+ operation_value: "ы"
221
+ 4:
222
+ multipart: false
223
+ gender: female
224
+ part1: ends_in
225
+ value1: "я"
226
+ operation: replace
227
+ operation_value: "и"
228
+ case3:
229
+ keyword: "dat"
230
+ latin_name: "Dativus"
231
+ native_name: "Дательный падеж"
232
+ description: "Рад - Кому? Чему?"
233
+ application: "words"
234
+ case4:
235
+ keyword: "acc"
236
+ latin_name: "Accusativus"
237
+ native_name: "Винительный падеж"
238
+ description: "Вижу - Кого? Что?"
239
+ application: "words"
240
+ case5:
241
+ keyword: "ins"
242
+ latin_name: "Instrumentalis"
243
+ native_name: "Творительный падеж"
244
+ description: "Доволен - Кем? Чем?"
245
+ application: "words"
246
+ case6:
247
+ keyword: "pre"
248
+ latin_name: "Prepositivus"
249
+ native_name: "Предложный падеж"
250
+ description: "Думаю - О ком? О чём?"
251
+ application: "words"
252
+ case7:
253
+ keyword: "pos"
254
+ latin_name: "Possessive"
255
+ native_name: "Притяжательный падеж"
256
+ description: "Чей?"
257
+ application: "words"
258
+ rules:
259
+ 1:
260
+ multipart: false
261
+ gender: female
262
+ part1: ends_in
263
+ value1: "ва"
264
+ operation: replace
265
+ operation_value: "вой"
266
+ 2:
267
+ multipart: false
268
+ gender: male
269
+ part1: ends_in
270
+ value1: "б, в, г, д, ж, з, к, л, м, н, п, р, с, т, ф, х, ц, ч, ш, щ"
271
+ operation: append
272
+ operation_value: "a"