tr8n 3.1.5 → 3.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/.gitignore +5 -1
  2. data/.rvmrc +1 -1
  3. data/Gemfile.lock +5 -5
  4. data/README.rdoc +36 -17
  5. data/app/assets/javascripts/tr8n/tr8n.js +31 -19
  6. data/app/controllers/tr8n/help_controller.rb +12 -2
  7. data/app/models/tr8n/language.rb +7 -3
  8. data/app/models/tr8n/translation.rb +11 -8
  9. data/app/models/tr8n/translation_domain.rb +1 -1
  10. data/app/models/tr8n/translation_key.rb +29 -13
  11. data/app/models/tr8n/translation_key_source.rb +0 -1
  12. data/app/models/tr8n/translation_source.rb +5 -5
  13. data/app/models/tr8n/translation_source_language.rb +39 -0
  14. data/app/models/tr8n/translator.rb +2 -11
  15. data/app/views/tr8n/common/_language_strip.html.erb +1 -1
  16. data/app/views/tr8n/common/_scripts.html.erb +3 -4
  17. data/app/views/tr8n/help/lb_shortcuts.html.erb +23 -22
  18. data/app/views/tr8n/help/lb_stats.html.erb +63 -0
  19. data/bin/tr8n.rb +24 -0
  20. data/db/migrate/20100405201417_create_tr8n_tables.rb +1 -1
  21. data/db/migrate/20111003194443_create_tr8n_sync_tables.rb +23 -0
  22. data/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +23 -0
  23. data/db/migrate/20111026230545_create_tr8n_translation_source_languages.rb +34 -0
  24. data/{config → lib/generators/tr8n/templates/config}/tr8n/config.yml +18 -14
  25. data/{config → lib/generators/tr8n/templates/config}/tr8n/data/ip_locations.csv +0 -0
  26. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_date_rules.yml +0 -0
  27. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_gender_list_rules.yml +0 -0
  28. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_gender_rules.yml +0 -0
  29. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_language_cases.yml +0 -0
  30. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_list_rules.yml +0 -0
  31. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_numeric_rules.yml +0 -0
  32. data/{config → lib/generators/tr8n/templates/config}/tr8n/rules/default_value_rules.yml +0 -0
  33. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/default_glossary.yml +0 -0
  34. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/default_languages.yml +0 -0
  35. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/features.yml +1 -6
  36. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/shortcuts.yml +4 -0
  37. data/{config → lib/generators/tr8n/templates/config}/tr8n/site/sitemap.json +0 -0
  38. data/{config → lib/generators/tr8n/templates/config}/tr8n/tokens/data.yml +0 -0
  39. data/{config → lib/generators/tr8n/templates/config}/tr8n/tokens/decorations.yml +0 -0
  40. data/lib/generators/tr8n/templates/db/create_tr8n_tables.rb +77 -55
  41. data/lib/generators/tr8n/tr8n_generator.rb +1 -1
  42. data/lib/tr8n/cache.rb +109 -8
  43. data/lib/tr8n/config.rb +14 -4
  44. data/lib/tr8n/extensions/action_controller_extension.rb +36 -38
  45. data/lib/tr8n/extensions/action_view_extension.rb +3 -17
  46. data/lib/tr8n/extensions/date_extension.rb +0 -1
  47. data/lib/tr8n/extensions/hash_extension.rb +66 -0
  48. data/lib/tr8n/extensions/string_extension.rb +1 -1
  49. data/lib/tr8n/extensions/time_extension.rb +0 -1
  50. data/lib/tr8n/version.rb +1 -1
  51. data/local/tr8n_server/app/views/layouts/_footer.html.erb +1 -1
  52. data/local/tr8n_server/config/tr8n/config.yml +18 -14
  53. data/local/tr8n_server/config/tr8n/site/features.yml +1 -6
  54. data/local/tr8n_server/config/tr8n/site/shortcuts.yml +4 -0
  55. data/local/tr8n_server/db/migrate/20110930041150_create_tr8n_tables.rb +78 -56
  56. data/local/tr8n_server/db/schema.rb +10 -1
  57. metadata +56 -61
  58. data/app/views/tr8n/help/lb_credits.html.erb +0 -9
  59. data/local/tr8n_server/app/views/layouts/tr8n.html.erb +0 -51
  60. data/local/tr8n_server/app/views/layouts/tr8n_admin.html.erb +0 -61
  61. data/local/tr8n_server/db/migrate/20111003194443_create_tr8n_sync_tables.rb +0 -22
  62. data/local/tr8n_server/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +0 -5
@@ -1,9 +0,0 @@
1
- <div style="margin-bottom:25px;">
2
- <%=image_tag("/tr8n/images/tr8n_logo2.gif")%>
3
- </div>
4
-
5
- <div class="buttons_container" style="text-align:center;">
6
- <button type="submit" class="translator_btn translator_submit_btn" onClick="tr8nLightbox.hide(); return false;">
7
- <span><%=trl("Close", "Lightbox close button")%></span>
8
- </button>
9
- </div>
@@ -1,51 +0,0 @@
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>
@@ -1,61 +0,0 @@
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>
@@ -1,22 +0,0 @@
1
- class CreateTr8nSyncTables < ActiveRecord::Migration
2
- def up
3
- create_table :tr8n_sync_logs do |t|
4
- t.timestamp :started_at
5
- t.timestamp :finished_at
6
- t.integer :keys_sent
7
- t.integer :translations_sent
8
- t.integer :keys_received
9
- t.integer :translations_received
10
- t.timestamps
11
- end
12
-
13
- add_column :tr8n_translation_keys, :synced_at, :timestamp
14
- add_column :tr8n_translations, :synced_at, :timestamp
15
- end
16
-
17
- def down
18
- drop_table :tr8n_sync_logs
19
- remove_column :tr8n_translation_keys, :synced_at
20
- remove_column :tr8n_translations, :synced_at
21
- end
22
- end
@@ -1,5 +0,0 @@
1
- class AddRemoteIdToTr8nTranslators < ActiveRecord::Migration
2
- def change
3
- add_column :tr8n_translators, :remote_id, :integer
4
- end
5
- end