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
@@ -40,9 +40,8 @@
40
40
  <li><%=tr("Follow us on Twitter:")%> <%= link_to("@tr8nrails", "http://twitter.com/tr8nrails") %></li>
41
41
  <li><%=tr("Visit our page on Facebook:")%> <%= link_to("Tr8n Translation Engine Page", "http://www.facebook.com/pages/Tr8n-Translation-Engine/138407706218622")%></li>
42
42
  </ul>
43
-
44
- </div>
45
43
 
44
+ </div>
46
45
 
47
46
 
48
47
 
@@ -0,0 +1,11 @@
1
+ <%# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="first">
10
+ <%= link_to_unless current_page.first?, raw(tr('{laquo} First', 'Link to the first page')), url, :remote => remote %>
11
+ </span>
@@ -0,0 +1,8 @@
1
+ <%# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -%>
8
+ <span class="page gap"><%= raw(t 'views.pagination.truncate') %></span>
@@ -0,0 +1,11 @@
1
+ <%# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="last">
10
+ <%= link_to_unless current_page.last?, raw(tr('Last {raquo}', 'Link to the last page')), url, {:remote => remote} %>
11
+ </span>
@@ -0,0 +1,11 @@
1
+ <%# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="next">
10
+ <%= link_to_unless current_page.last?, raw(tr('Next {rsaquo}', 'Link to the next page')), url, :rel => 'next', :remote => remote %>
11
+ </span>
@@ -0,0 +1,12 @@
1
+ <%# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -%>
10
+ <span class="page<%= ' current' if page.current? %>">
11
+ <%= link_to_unless page.current?, page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
+ </span>
@@ -0,0 +1,23 @@
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -%>
9
+ <%= paginator.render do -%>
10
+ <nav class="pagination">
11
+ <%= first_page_tag unless current_page.first? %>
12
+ <%= prev_page_tag unless current_page.first? %>
13
+ <% each_page do |page| -%>
14
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
15
+ <%= page_tag page %>
16
+ <% elsif !page.was_truncated? -%>
17
+ <%= gap_tag %>
18
+ <% end -%>
19
+ <% end -%>
20
+ <%= next_page_tag unless current_page.last? %>
21
+ <%= last_page_tag unless current_page.last? %>
22
+ </nav>
23
+ <% end -%>
@@ -0,0 +1,11 @@
1
+ <%# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="prev">
10
+ <%= link_to_unless current_page.first?, raw(tr('{lsaquo} Prev', 'Link to the previous page')), url, :rel => 'prev', :remote => remote %>
11
+ </span>
@@ -4,10 +4,10 @@
4
4
  <li><%=link_to(tr("Languages"), "/tr8n/language/table", :class => "quiet")%></li>
5
5
  <li><%=link_to(tr("Translator Tools"), "/tr8n/dashboard", :class => "quiet")%></li>
6
6
  <li><%=link_to(tr("Administration Tools"), "/tr8n/admin/language", :class => "quiet")%></li>
7
- <li><%=link_to(tr("Credits"), "/tr8n/home/credits", :class => "quiet")%></li>
8
- <li><%=link_to(tr("License"), "/tr8n/home/license", :class => "quiet")%></li>
7
+ <li><%=link_to(tr("Credits"), "/tr8n/help/credits", :class => "quiet")%></li>
8
+ <li><%=link_to(tr("License"), "/tr8n/help/license", :class => "quiet")%></li>
9
9
  </ul>
10
- &copy; Copyright 2010-2011 Tr8n.net
10
+ &copy; Copyright 2010-2011 tr8n.net
11
11
  </div>
12
12
 
13
13
  </div>
@@ -12,7 +12,7 @@
12
12
  </ul>
13
13
  <h1 class="logo">
14
14
  <%=image_tag("tr8n/tr8n_logo2.png", :style => "width:60px")%>
15
- <%=link_to("Tr8n Translation Memory Server", "/tr8n/home", :style=>"text-decorations:none;")%>
15
+ <%=link_to("Tr8n Translation Memory Server", "/home", :style=>"text-decorations:none;")%>
16
16
  </h1>
17
17
  </div>
18
18
  </div>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <title><%=trl("Tr8n Engine Plugin", "Application title")%></title>
5
+ <%= stylesheet_link_tag("tr8n/layout") %>
6
+ <%= stylesheet_link_tag("tr8n/components") %>
7
+
8
+ <%= tr8n_scripts_tag %>
9
+ </head>
10
+ <body>
11
+ <div class="document">
12
+ <div class="page_head">
13
+ <div class="page_fixed">
14
+ <div class="mrgn_h">
15
+ <%= tr8n_translator_login_tag(:class => "flt_r horiz_list top_nav") %>
16
+ <h1 class="logo"><%=link_to(tr("Tr8n Translation Engine", "Application title"), {:controller => "/tr8n/home"}, :style=>"text-decorations:none;")%></h1>
17
+ </div>
18
+ </div>
19
+ </div>
20
+
21
+ <div class="page_fixed">
22
+ <%= tr8n_flashes_tag %>
23
+ </div>
24
+
25
+ <div class="page_fixed">
26
+ <div class="page_body">
27
+ <div class="content_module">
28
+ <div class="content_inner">
29
+ <%= yield %>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ <div class="page_ft module quiet">
34
+ <ul class="flt_r right_horiz_list">
35
+ <li><%=link_to(tr("Home"), "/tr8n/home", :class => "quiet")%></li>
36
+ <li><%=link_to(tr("Languages"), "/tr8n/language/table", :class => "quiet")%></li>
37
+ <li><%=link_to(tr("Translator Tools"), "/tr8n/dashboard", :class => "quiet")%></li>
38
+ <li><%=link_to(tr("Administration Tools"), "/tr8n/admin/language", :class => "quiet")%></li>
39
+ <li><%=link_to(tr("Credits"), "/tr8n/home/credits", :class => "quiet")%></li>
40
+ <li><%=link_to(tr("License"), "/tr8n/home/license", :class => "quiet")%></li>
41
+ </ul>
42
+ &copy; Copyright 2010 - 2011 tr8n.net
43
+ </div>
44
+
45
+ <div style="padding:15px;">
46
+ <%= tr8n_language_strip_tag %>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </body>
51
+ </html>
@@ -0,0 +1,61 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <title><%=trl("Tr8n Engine Admin Tools", "Application title")%></title>
5
+ <%= stylesheet_link_tag("tr8n/layout") %>
6
+ <%= stylesheet_link_tag("tr8n/components") %>
7
+ <%= tr8n_scripts_tag %>
8
+ <style>
9
+ .page_fixed {
10
+ width:1200px;
11
+ }
12
+ .page_body {
13
+ width:1200px;
14
+ }
15
+
16
+ .wf_form {
17
+ width: 99.8%;
18
+ }
19
+ </style>
20
+ </head>
21
+ <body>
22
+ <div class="document">
23
+ <div class="page_head">
24
+ <div class="page_fixed">
25
+ <div class="mrgn_h">
26
+ <%= tr8n_translator_login_tag(:class => "flt_r horiz_list top_nav") %>
27
+ <h1 class="logo"><%=link_to(tr("Tr8n Translation Engine", "Application title"), {:controller => "/tr8n/home"}, :style=>"text-decorations:none;")%></h1>
28
+ </div>
29
+ </div>
30
+ </div>
31
+
32
+ <div class="page_fixed">
33
+ <%= tr8n_flashes_tag %>
34
+ </div>
35
+ <div class="page_fixed">
36
+ <div class="page_body">
37
+ <div class="content_module">
38
+ <div class="content_inner">
39
+ <%= yield %>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <div class="page_ft module quiet">
44
+ <ul class="flt_r right_horiz_list">
45
+ <li><%=link_to(tr("Home"), "/tr8n/home", :class => "quiet")%></li>
46
+ <li><%=link_to(tr("Languages"), "/tr8n/language/table", :class => "quiet")%></li>
47
+ <li><%=link_to(tr("Translator Tools"), "/tr8n/dashboard", :class => "quiet")%></li>
48
+ <li><%=link_to(tr("Administration Tools"), "/tr8n/admin/language", :class => "quiet")%></li>
49
+ <li><%=link_to(tr("Credits"), "/tr8n/home/credits", :class => "quiet")%></li>
50
+ <li><%=link_to(tr("License"), "/tr8n/home/license", :class => "quiet")%></li>
51
+ </ul>
52
+ &copy; Copyright 2010 - 2011 tr8n.net
53
+ </div>
54
+
55
+ <div style="padding:15px;">
56
+ <%= tr8n_language_strip_tag %>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </body>
61
+ </html>
@@ -16,6 +16,12 @@
16
16
  <%=password_field_tag :password, "", :class => "xlong_input h4"%> &nbsp; *
17
17
  </div>
18
18
  </div>
19
+ <div class="field">
20
+ <div class="strong field_hd txt_r h4"><%=tr('Confirm Password:') %></div>
21
+ <div class="field_bd">
22
+ <%=password_field_tag :password_confirm, "", :class => "xlong_input h4"%> &nbsp; *
23
+ </div>
24
+ </div>
19
25
  <div class="field">
20
26
  <div class="strong field_hd txt_r h4"><%=tr('First Name:') %></div>
21
27
  <div class="field_bd">
@@ -33,19 +39,8 @@
33
39
  <div class="strong" style="padding-top:8px;">
34
40
  &nbsp; <%=radio_button_tag(:gender, "male", params[:gender] == 'male')%> <%=tr('Male', 'Gender') %>
35
41
  &nbsp; <%=radio_button_tag(:gender, "male", params[:gender] == 'female')%> <%=tr('Female', 'Gender') %>
36
- &nbsp; <%=radio_button_tag(:gender, "unknown", params[:gender] == 'unknown')%> <%=tr('Unknown', 'Gender') %>
37
- </div>
38
- </div>
39
- <div class="field">
40
- <div class="strong field_hd txt_r h4"><%=tr('Photo Url:') %></div>
41
- <div class="field_bd">
42
- <%=text_field_tag :mugshot, params[:mugshot], :class => "xlong_input h4" %>
43
- </div>
44
- </div>
45
- <div class="field">
46
- <div class="strong field_hd txt_r h4"><%=tr('Link Url:') %></div>
47
- <div class="field_bd">
48
- <%=text_field_tag :link, params[:link], :class => "xlong_input h4" %>
42
+
43
+ <span style="color:#888; padding-left:10px; font-size:10px;"><%=tr("Used for gender based translations") %></span>
49
44
  </div>
50
45
  </div>
51
46
  <br>
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
4
+ run Tr8nServer::Application
@@ -3,11 +3,12 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require
6
+
6
7
  require "tr8n"
7
8
  require "will_filter"
8
9
  require "kaminari"
9
10
 
10
- module Dummy
11
+ module Tr8nServer
11
12
  class Application < Rails::Application
12
13
  # Settings in config/environments/* take precedence over those specified here.
13
14
  # Application configuration should go into files in config/initializers
@@ -2,4 +2,4 @@
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
4
  # Initialize the rails application
5
- Dummy::Application.initialize!
5
+ Tr8nServer::Application.initialize!
@@ -1,4 +1,6 @@
1
- Dummy::Application.configure do
1
+ require "pry"
2
+
3
+ Tr8nServer::Application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb
3
5
 
4
6
  # In the development environment your application's code is reloaded on
@@ -1,4 +1,4 @@
1
- Dummy::Application.configure do
1
+ Tr8nServer::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
4
  # Code is not reloaded between requests
@@ -1,4 +1,4 @@
1
- Dummy::Application.configure do
1
+ Tr8nServer::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
4
  # The test environment is used exclusively to run your application's
@@ -4,4 +4,4 @@
4
4
  # If you change this key, all old signed cookies will become invalid!
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = 'a5a170604e8179c5b3806c6dd87ee004b8c3f55d25ecc0d267b1434959feefc075e38af811e4e467cf9715a8b66b3cb16bbbeb6dc985981658cfac5fafebda81'
7
+ Tr8nServer::Application.config.secret_token = 'a5a170604e8179c5b3806c6dd87ee004b8c3f55d25ecc0d267b1434959feefc075e38af811e4e467cf9715a8b66b3cb16bbbeb6dc985981658cfac5fafebda81'
@@ -1,8 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
3
+ Tr8nServer::Application.config.session_store :cookie_store, key: '_tr8n_server_session'
4
4
 
5
5
  # Use the database for sessions instead of the cookie-based default,
6
6
  # which shouldn't be used to store highly confidential information
7
7
  # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
8
+ # Tr8nServer::Application.config.session_store :active_record_store
@@ -1,8 +1,8 @@
1
- Dummy::Application.routes.draw do
1
+ Tr8nServer::Application.routes.draw do
2
2
  mount Tr8n::Engine => "/tr8n"
3
3
  mount WillFilter::Engine => "/will_filter"
4
4
 
5
- root :to => "tr8n/home#index"
5
+ root :to => "home#index"
6
6
 
7
7
  [:admins, :users].each do |ctrl|
8
8
  match "/admin/#{ctrl}(/:action)", :controller => "admin/#{ctrl}"
@@ -63,11 +63,15 @@ defaults: &defaults
63
63
  #
64
64
  # For example:
65
65
  #
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']
66
+ # adapter: ActiveSupport::Cache
67
+ # store: memory_store # only for dev or test - single instance
68
+ # store: file_store # only for dev or test - single instance
69
+ # store: drb_store
70
+ # store: [mem_cache_store, 'localhost:11211'] # recommended
71
+ #
72
+ # If you choose to use memcached, don't forget to add the gem to your Gemfile:
73
+ #
74
+ # gem 'memcache-client'
71
75
  #
72
76
  # You can also provide your own implementation of the adapter:
73
77
  #
@@ -77,7 +81,7 @@ defaults: &defaults
77
81
  caching:
78
82
  enabled: false
79
83
  adapter: ActiveSupport::Cache
80
- store: [mem_cache_store, 'localhost:11211']
84
+ store: ['mem_cache_store', 'localhost:11211']
81
85
  version: 1 # you can change the version to invalidate the cache
82
86
 
83
87
  #############################################################################
@@ -94,9 +98,9 @@ defaults: &defaults
94
98
  #############################################################################
95
99
  site_info:
96
100
  title: "Tr8n" # site title - provide your site title here
97
- contact_email: "michael@tr8n.net" # contact email for questions about translations
101
+ contact_email: "support@tr8n.net" # contact email for questions about translations
98
102
  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
103
+ default_url: "/home" # default site url where to redirect the user if Tr8n is disabled
100
104
  default_locale: "en-US" # locale of the site default language
101
105
  sitemap_path: "/config/tr8n/site/sitemap.json" # location of the sitemap definition file
102
106
  splash_screen: "/tr8n/common/splash_screen" # location of the Tr8n splash screen
@@ -133,7 +137,7 @@ defaults: &defaults
133
137
  token_suffixes: [count, num, age, hours, minutes, years, seconds]
134
138
  object_method: to_i
135
139
  gender_rule:
136
- token_suffixes: [user, profile, actor, target, partner, parent, child, sibling, manager]
140
+ token_suffixes: [user, profile, actor, target]
137
141
  object_method: gender
138
142
  method_values:
139
143
  female: female
@@ -198,8 +202,10 @@ defaults: &defaults
198
202
  regular: 0
199
203
  trusted: 50
200
204
  professional: 100
201
- manager: 1000 # reserved for translation tools
202
- admin: 10000 # reserved for admin tools
205
+ manager: 1000 # reserved for translation tools
206
+ admin: 10000 # reserved for admin tools
207
+ application: 100000 # reserved for applications
208
+ system: 1000000 # reserved for system
203
209
 
204
210
  default_translation_key_level: 0
205
211
  #############################################################################
@@ -222,6 +228,29 @@ defaults: &defaults
222
228
  monthname_abbr_year: '%b %d, %Y' # Jul 4, 2008
223
229
  date_time: '%m/%d/%Y at %H:%M' # 01/03/1010 at 5:30
224
230
 
231
+ #############################################################################
232
+ # You can synchronize your translation keys and translations with other
233
+ # sites that use Tr8n. This way you can get your site translated by
234
+ # millions of users from around the internet. Visit the following url and
235
+ # register as a developer, register your application and copy your app key
236
+ # in the line below:
237
+ #
238
+ # http://tr8n.net
239
+ #
240
+ # To sychronize your translations run the following command:
241
+ #
242
+ # rake tr8n:sync
243
+ #
244
+ # You can run this command as often as your account on tr8n.net permits you.
245
+ #############################################################################
246
+ synchronization:
247
+ server: "http://tr8n.net" # alternative, regional locations will be available in the future
248
+ key: "iKjOrZjor68a4UeCD3Cq2r9t9ibBC4HnYoMNMrN7" # replace this with your key
249
+ secret: "iKjOrZjor68a4UeCD3Cq2r9t9ibBC4HnYoMNMrN7" # replace this with your secret
250
+ batch_size: 50 # how many kesy to send to the server at a time
251
+ create_rules: true # force rules creation, or skip translations for rules that don't exist
252
+ all_languages: false # use only enabled languages, or all languages
253
+
225
254
  #############################################################################
226
255
  # Environment Settings
227
256
  # You can overload any feature defined in the defaults for any environment