tr8n 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -3
- data/.rspec +2 -0
- data/Gemfile +3 -6
- data/Gemfile.lock +21 -6
- data/README.rdoc +61 -33
- data/Rakefile +1 -11
- data/app/assets/images/tr8n/photo_system.gif +0 -0
- data/app/assets/stylesheets/tr8n/application.css +42 -1
- data/{test/dummy/app/assets/stylesheets/components.css.scss → app/assets/stylesheets/tr8n/component.css.scss} +0 -0
- data/{test/dummy/app/assets/stylesheets → app/assets/stylesheets/tr8n}/layout.css.scss +0 -0
- data/app/assets/stylesheets/tr8n/tr8n.css.scss +16 -8
- data/app/controllers/tr8n/admin/base_controller.rb +1 -1
- data/app/controllers/tr8n/admin/clientsdk_controller.rb +1 -1
- data/app/controllers/tr8n/admin/domain_controller.rb +1 -1
- data/app/controllers/tr8n/admin/forum_controller.rb +1 -1
- data/app/controllers/tr8n/admin/glossary_controller.rb +1 -1
- data/app/controllers/tr8n/admin/language_controller.rb +1 -1
- data/app/controllers/tr8n/admin/translation_controller.rb +1 -1
- data/app/controllers/tr8n/admin/translation_key_controller.rb +5 -1
- data/app/controllers/tr8n/admin/translator_controller.rb +1 -1
- data/app/{helpers/tr8n/application_helper.rb → controllers/tr8n/api/v1/sync_controller.rb} +6 -3
- data/app/controllers/tr8n/awards_controller.rb +12 -12
- data/app/controllers/tr8n/base_controller.rb +140 -137
- data/app/controllers/tr8n/dashboard_controller.rb +2 -1
- data/app/controllers/tr8n/forum_controller.rb +1 -1
- data/app/controllers/tr8n/glossary_controller.rb +1 -1
- data/app/controllers/tr8n/help_controller.rb +1 -1
- data/app/controllers/tr8n/language_cases_controller.rb +43 -45
- data/app/controllers/tr8n/language_controller.rb +1 -1
- data/app/controllers/tr8n/phrases_controller.rb +1 -1
- data/app/controllers/tr8n/translations_controller.rb +1 -1
- data/app/controllers/tr8n/translator_controller.rb +1 -1
- data/app/helpers/tr8n/base_helper.rb +0 -4
- data/app/models/tr8n/base_filter.rb +1 -1
- data/app/models/tr8n/daily_language_metric.rb +1 -1
- data/app/models/tr8n/date_rule.rb +1 -1
- data/app/models/tr8n/gender_list_rule.rb +1 -1
- data/app/models/tr8n/gender_rule.rb +1 -1
- data/app/models/tr8n/glossary.rb +1 -1
- data/app/models/tr8n/glossary_filter.rb +1 -1
- data/app/models/tr8n/integration/ru/russian_gender_list_rule.rb +1 -1
- data/app/models/tr8n/integration/ru/russian_numeric_rule.rb +1 -1
- data/app/models/tr8n/ip_location.rb +1 -1
- data/app/models/tr8n/ip_location_filter.rb +1 -1
- data/app/models/tr8n/language.rb +17 -8
- data/app/models/tr8n/language_case.rb +1 -1
- data/app/models/tr8n/language_case_filter.rb +1 -1
- data/app/models/tr8n/language_case_rule.rb +1 -1
- data/app/models/tr8n/language_case_rule_filter.rb +1 -1
- data/app/models/tr8n/language_case_value_map.rb +1 -1
- data/app/models/tr8n/language_case_value_map_filter.rb +1 -1
- data/app/models/tr8n/language_filter.rb +1 -1
- data/app/models/tr8n/language_forum_abuse_report.rb +1 -1
- data/app/models/tr8n/language_forum_abuse_report_filter.rb +1 -1
- data/app/models/tr8n/language_forum_message.rb +2 -2
- data/app/models/tr8n/language_forum_message_filter.rb +1 -1
- data/app/models/tr8n/language_forum_topic.rb +3 -3
- data/app/models/tr8n/language_forum_topic_filter.rb +1 -1
- data/app/models/tr8n/language_metric.rb +2 -2
- data/app/models/tr8n/language_metric_filter.rb +1 -1
- data/app/models/tr8n/language_rule.rb +37 -2
- data/app/models/tr8n/language_rule_filter.rb +1 -1
- data/app/models/tr8n/language_user.rb +3 -3
- data/app/models/tr8n/language_user_filter.rb +1 -1
- data/app/models/tr8n/list_rule.rb +1 -1
- data/app/models/tr8n/monthly_language_metric.rb +2 -2
- data/app/models/tr8n/numeric_rule.rb +1 -1
- data/app/models/tr8n/sync_log.rb +76 -0
- data/app/{controllers/tr8n/application_controller.rb → models/tr8n/sync_log_filter.rb} +4 -3
- data/app/models/tr8n/total_language_metric.rb +5 -4
- data/app/models/tr8n/translation.rb +61 -13
- data/app/models/tr8n/translation_domain.rb +1 -1
- data/app/models/tr8n/translation_domain_filter.rb +1 -1
- data/app/models/tr8n/translation_filter.rb +1 -1
- data/app/models/tr8n/translation_key.rb +33 -5
- data/app/models/tr8n/translation_key_comment.rb +1 -1
- data/app/models/tr8n/translation_key_comment_filter.rb +1 -1
- data/app/models/tr8n/translation_key_filter.rb +1 -1
- data/app/models/tr8n/translation_key_lock.rb +2 -2
- data/app/models/tr8n/translation_key_lock_filter.rb +1 -1
- data/app/models/tr8n/translation_key_source.rb +2 -2
- data/app/models/tr8n/translation_key_source_filter.rb +1 -1
- data/app/models/tr8n/translation_source.rb +2 -2
- data/app/models/tr8n/translation_source_filter.rb +1 -1
- data/app/models/tr8n/translation_vote.rb +3 -4
- data/app/models/tr8n/translation_vote_filter.rb +1 -1
- data/app/models/tr8n/translator.rb +19 -5
- data/app/models/tr8n/translator_filter.rb +1 -1
- data/app/models/tr8n/translator_following.rb +2 -2
- data/app/models/tr8n/translator_following_filter.rb +1 -1
- data/app/models/tr8n/translator_log.rb +1 -1
- data/app/models/tr8n/translator_log_filter.rb +1 -1
- data/app/models/tr8n/translator_metric.rb +15 -21
- data/app/models/tr8n/translator_metric_filter.rb +1 -1
- data/app/models/tr8n/translator_report.rb +2 -2
- data/app/models/tr8n/translator_report_filter.rb +1 -1
- data/app/models/tr8n/value_rule.rb +1 -1
- data/app/views/tr8n/admin/common/_paginator.html.erb +29 -17
- data/app/views/tr8n/admin/translation_key/_tabs.html.erb +3 -1
- data/app/views/tr8n/admin/translation_key/sync_logs.html.erb +5 -0
- data/app/views/tr8n/awards/index.html.erb +0 -2
- data/app/views/tr8n/common/_paginator.html.erb +24 -6
- data/app/views/tr8n/common/_tabs.html.erb +9 -5
- data/app/views/tr8n/forum/_messages.html.erb +1 -1
- data/app/views/tr8n/forum/index.html.erb +1 -1
- data/app/views/tr8n/glossary/index.html.erb +2 -2
- data/app/views/tr8n/{home → help}/credits.html.erb +0 -0
- data/app/views/tr8n/{home → help}/license.html.erb +0 -0
- data/app/views/tr8n/language_cases/index.html.erb +2 -2
- data/app/views/tr8n/phrases/_comments_module.html.erb +1 -1
- data/app/views/tr8n/phrases/index.html.erb +2 -6
- data/app/views/tr8n/translations/_list.html.erb +2 -6
- data/config/routes.rb +2 -2
- data/config/tr8n/config.yml +48 -13
- data/config/tr8n/rules/default_language_cases.yml +272 -0
- data/config/tr8n/tokens/data.yml +3 -1
- data/db/migrate/20111003194443_create_tr8n_sync_tables.rb +22 -0
- data/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +5 -0
- data/doc/classes.graffle +7049 -5152
- data/doc/classes.pdf +0 -0
- data/lib/generators/tr8n/templates/{create_tr8n_tables.rb → db/create_tr8n_tables.rb} +0 -0
- data/lib/generators/tr8n/templates/layouts/tr8n.html.erb +49 -0
- data/lib/generators/tr8n/templates/layouts/tr8n_admin.html.erb +61 -0
- data/lib/generators/tr8n/tr8n_generator.rb +11 -4
- data/lib/tasks/{tr8n_tasks.rake → tr8n.rake} +4 -0
- data/{app/controllers/tr8n/home_controller.rb → lib/tr8n/cache_adapters/memcached.rb} +12 -15
- data/lib/tr8n/config.rb +96 -53
- data/lib/tr8n/extensions/action_controller_extension.rb +1 -1
- data/lib/tr8n/extensions/action_view_extension.rb +4 -28
- data/lib/tr8n/tokens/data_token.rb +1 -1
- data/lib/tr8n/tokens/method_token.rb +1 -1
- data/lib/tr8n/tokens/transform_token.rb +1 -1
- data/lib/tr8n/version.rb +1 -1
- data/{test/dummy → local/tr8n_server}/Rakefile +1 -1
- data/{test/dummy → local/tr8n_server}/app/assets/javascripts/application.js +0 -0
- data/{test/dummy → local/tr8n_server}/app/assets/stylesheets/admin.css +0 -0
- data/{test/dummy → local/tr8n_server}/app/assets/stylesheets/application.css +0 -0
- data/local/tr8n_server/app/assets/stylesheets/components.css.scss +211 -0
- data/local/tr8n_server/app/assets/stylesheets/layout.css.scss +143 -0
- data/{test/dummy → local/tr8n_server}/app/controllers/admin/admins_controller.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/controllers/admin/base_controller.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/controllers/admin/users_controller.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/controllers/application_controller.rb +5 -0
- data/{test/dummy → local/tr8n_server}/app/controllers/demo_controller.rb +0 -0
- data/local/tr8n_server/app/controllers/home_controller.rb +4 -0
- data/{test/dummy → local/tr8n_server}/app/controllers/login_controller.rb +1 -1
- data/{test/dummy → local/tr8n_server}/app/helpers/application_helper.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/helpers/home_helper.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/mailers/.gitkeep +0 -0
- data/{test/dummy → local/tr8n_server}/app/models/.gitkeep +0 -0
- data/{test/dummy → local/tr8n_server}/app/models/admin.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/models/admin_filter.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/models/user.rb +0 -0
- data/{test/dummy → local/tr8n_server}/app/views/admin/admins/index.html.erb +0 -0
- data/{test/dummy → local/tr8n_server}/app/views/admin/users/index.html.erb +0 -0
- data/{test/dummy → local/tr8n_server}/app/views/demo/index.rhtml +0 -0
- data/{test/dummy → local/tr8n_server}/app/views/demo/tokens.rhtml +0 -0
- data/{app/views/tr8n → local/tr8n_server/app/views}/home/index.html.erb +1 -2
- data/local/tr8n_server/app/views/kaminari/_first_page.html.erb +11 -0
- data/local/tr8n_server/app/views/kaminari/_gap.html.erb +8 -0
- data/local/tr8n_server/app/views/kaminari/_last_page.html.erb +11 -0
- data/local/tr8n_server/app/views/kaminari/_next_page.html.erb +11 -0
- data/local/tr8n_server/app/views/kaminari/_page.html.erb +12 -0
- data/local/tr8n_server/app/views/kaminari/_paginator.html.erb +23 -0
- data/local/tr8n_server/app/views/kaminari/_prev_page.html.erb +11 -0
- data/{test/dummy → local/tr8n_server}/app/views/layouts/_flashes.html.erb +0 -0
- data/{test/dummy → local/tr8n_server}/app/views/layouts/_footer.html.erb +3 -3
- data/{test/dummy → local/tr8n_server}/app/views/layouts/_header.html.erb +1 -1
- data/{test/dummy → local/tr8n_server}/app/views/layouts/admin.html.erb +0 -0
- data/{test/dummy → local/tr8n_server}/app/views/layouts/application.html.erb +0 -0
- data/local/tr8n_server/app/views/layouts/tr8n.html.erb +51 -0
- data/local/tr8n_server/app/views/layouts/tr8n_admin.html.erb +61 -0
- data/{test/dummy → local/tr8n_server}/app/views/login/index.html.erb +0 -0
- data/{test/dummy → local/tr8n_server}/app/views/login/register.html.erb +8 -13
- data/{test/dummy → local/tr8n_server}/config.ru +1 -1
- data/{test/dummy → local/tr8n_server}/config/application.rb +2 -1
- data/{test/dummy → local/tr8n_server}/config/boot.rb +0 -0
- data/{test/dummy → local/tr8n_server}/config/database.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/environment.rb +1 -1
- data/{test/dummy → local/tr8n_server}/config/environments/development.rb +3 -1
- data/{test/dummy → local/tr8n_server}/config/environments/production.rb +1 -1
- data/{test/dummy → local/tr8n_server}/config/environments/test.rb +1 -1
- data/{test/dummy → local/tr8n_server}/config/initializers/backtrace_silencers.rb +0 -0
- data/{test/dummy → local/tr8n_server}/config/initializers/inflections.rb +0 -0
- data/{test/dummy → local/tr8n_server}/config/initializers/mime_types.rb +0 -0
- data/{test/dummy → local/tr8n_server}/config/initializers/secret_token.rb +1 -1
- data/{test/dummy → local/tr8n_server}/config/initializers/session_store.rb +2 -2
- data/{test/dummy → local/tr8n_server}/config/initializers/wrap_parameters.rb +0 -0
- data/{test/dummy → local/tr8n_server}/config/locales/en.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/routes.rb +2 -2
- data/{test/dummy → local/tr8n_server}/config/tr8n/config.yml +40 -11
- data/{test/dummy → local/tr8n_server}/config/tr8n/data/ip_locations.csv +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_date_rules.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_gender_list_rules.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_gender_rules.yml +0 -0
- data/local/tr8n_server/config/tr8n/rules/default_language_cases.yml +272 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_list_rules.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_numeric_rules.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/rules/default_value_rules.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/site/default_glossary.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/site/default_languages.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/site/features.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/site/shortcuts.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/site/sitemap.json +0 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/tokens/data.yml +2 -0
- data/{test/dummy → local/tr8n_server}/config/tr8n/tokens/decorations.yml +0 -0
- data/{test/dummy → local/tr8n_server}/config/will_filter/config.yml +0 -0
- data/{test/dummy → local/tr8n_server}/db/migrate/20101207014543_create_users.rb +0 -0
- data/{test/dummy → local/tr8n_server}/db/migrate/20110113223509_create_admins.rb +0 -0
- data/{test/dummy → local/tr8n_server}/db/migrate/20110930041143_create_will_filter_filters.rb +0 -0
- data/{test/dummy → local/tr8n_server}/db/migrate/20110930041150_create_tr8n_tables.rb +0 -0
- data/local/tr8n_server/db/migrate/20111003194443_create_tr8n_sync_tables.rb +22 -0
- data/local/tr8n_server/db/migrate/20111011013640_add_remote_id_to_tr8n_translators.rb +5 -0
- data/{test/dummy → local/tr8n_server}/db/schema.rb +15 -1
- data/{test/dummy → local/tr8n_server}/lib/assets/.gitkeep +0 -0
- data/{test/dummy → local/tr8n_server}/public/404.html +0 -0
- data/{test/dummy → local/tr8n_server}/public/422.html +0 -0
- data/{test/dummy → local/tr8n_server}/public/500.html +0 -0
- data/{test/dummy → local/tr8n_server}/public/favicon.ico +0 -0
- data/{test/dummy → local/tr8n_server}/script/rails +0 -0
- data/script/rails +1 -1
- data/spec/config/config_spec.rb +10 -0
- data/spec/fake_app.rb +50 -0
- data/spec/lib/data_token_spec.rb +26 -0
- data/spec/lib/transform_token_spec.rb +22 -0
- data/spec/models/translation_key_spec.rb +63 -0
- data/spec/spec_helper.rb +29 -0
- data/tr8n.gemspec +3 -1
- metadata +264 -245
- data/app/assets/images/tr8n/tr8n_logo.png +0 -0
- data/app/assets/images/tr8n/tr8n_logo2.gif +0 -0
- data/app/controllers/tr8n/login_controller.rb +0 -86
- data/app/views/layouts/_footer.html.erb +0 -15
- data/app/views/layouts/_header.html.erb +0 -12
- data/app/views/layouts/_html_head.html.erb +0 -5
- data/app/views/layouts/tr8n.html.erb +0 -21
- data/app/views/layouts/tr8n/application.html.erb +0 -14
- data/app/views/layouts/tr8n_admin.html.erb +0 -33
- data/app/views/tr8n/home/languages.html.erb +0 -7
- data/app/views/tr8n/login/index.html.erb +0 -33
- data/app/views/tr8n/login/register.html.erb +0 -57
- data/config/tr8n/rules/default_cases.yml +0 -141
- data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/actions.css.scssc +0 -0
- data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/buttons.css.scssc +0 -0
- data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/calendar.css.scssc +0 -0
- data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/exporter.css.scssc +0 -0
- data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/filter.css.scssc +0 -0
- data/test/dummy/.sass-cache/32be4db30d38349a3a6e662df9bb5599dc8033b9/results.css.scssc +0 -0
- data/test/dummy/.sass-cache/3d45bab40fcae805deb2750a9342f5b355a9f2bf/components.css.scssc +0 -0
- data/test/dummy/.sass-cache/3d45bab40fcae805deb2750a9342f5b355a9f2bf/layout.css.scssc +0 -0
- data/test/dummy/.sass-cache/50f723c1dd802042d0091035528d53e6d5bc5b50/tr8n.css.scssc +0 -0
- data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/actions.css.scssc +0 -0
- data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/buttons.css.scssc +0 -0
- data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/calendar.css.scssc +0 -0
- data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/exporter.css.scssc +0 -0
- data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/filter.css.scssc +0 -0
- data/test/dummy/.sass-cache/bce64928c8e2edcba72a647a44f05af1ff119c5d/results.css.scssc +0 -0
- data/test/dummy/app/assets/stylesheets/keyboard.css +0 -147
- data/test/dummy/config/tr8n/rules/default_cases.yml +0 -141
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/test/functional/home_controller_test.rb +0 -9
- data/test/dummy/test/unit/helpers/home_helper_test.rb +0 -4
- data/test/integration/navigation_test.rb +0 -10
- data/test/test_helper.rb +0 -10
- data/test/tr8n_test.rb +0 -7
data/.gitignore
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
.bundle/
|
2
|
-
log/*.log
|
3
2
|
pkg/
|
4
|
-
|
5
|
-
|
3
|
+
*.sqlite3
|
4
|
+
*.log
|
6
5
|
test/dummy/tmp/
|
7
6
|
db/schema.rb*
|
8
7
|
tmp/*
|
@@ -15,3 +14,7 @@ log/*
|
|
15
14
|
.dotest*
|
16
15
|
Thumbs.db
|
17
16
|
.tmp*
|
17
|
+
local/tr8n_server/tmp/*
|
18
|
+
local/tr8n_server/.sass-cache/*
|
19
|
+
local/tr8n_server/db/*.sqlite3
|
20
|
+
local/tr8n_server/log/*
|
data/.rspec
ADDED
data/Gemfile
CHANGED
@@ -5,10 +5,7 @@ source "http://rubygems.org"
|
|
5
5
|
# development dependencies will be added by default to the :development group.
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
# Declare any dependencies that are still in development here instead of in
|
9
|
-
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
-
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
-
# your gem to rubygems.org.
|
12
|
-
|
13
8
|
# To use debugger
|
14
|
-
# gem 'ruby-debug19', :require => 'ruby-debug'
|
9
|
+
# gem 'ruby-debug19', :require => 'ruby-debug'
|
10
|
+
|
11
|
+
# Gems for a standalone instance only
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tr8n (3.1.
|
4
|
+
tr8n (3.1.2)
|
5
5
|
coffee-script
|
6
6
|
kaminari
|
7
7
|
rails (>= 3.1.0)
|
@@ -52,6 +52,7 @@ GEM
|
|
52
52
|
xpath (~> 0.1.4)
|
53
53
|
childprocess (0.2.2)
|
54
54
|
ffi (~> 1.0.6)
|
55
|
+
coderay (0.9.8)
|
55
56
|
coffee-script (2.2.0)
|
56
57
|
coffee-script-source
|
57
58
|
execjs
|
@@ -73,11 +74,19 @@ GEM
|
|
73
74
|
i18n (>= 0.4.0)
|
74
75
|
mime-types (~> 1.16)
|
75
76
|
treetop (~> 1.4.8)
|
77
|
+
memcache-client (1.8.5)
|
78
|
+
method_source (0.6.6)
|
79
|
+
ruby_parser (~> 2.0.5)
|
76
80
|
mime-types (1.16)
|
77
81
|
multi_json (1.0.3)
|
78
82
|
nokogiri (1.5.0)
|
79
83
|
polyglot (0.3.2)
|
80
|
-
|
84
|
+
pry (0.9.6.2)
|
85
|
+
coderay (~> 0.9.8)
|
86
|
+
method_source (~> 0.6.5)
|
87
|
+
ruby_parser (~> 2.0.5)
|
88
|
+
slop (~> 2.1.0)
|
89
|
+
rack (1.3.4)
|
81
90
|
rack-cache (1.0.3)
|
82
91
|
rack (>= 0.4)
|
83
92
|
rack-mount (0.8.3)
|
@@ -117,17 +126,21 @@ GEM
|
|
117
126
|
activesupport (~> 3.0)
|
118
127
|
railties (~> 3.0)
|
119
128
|
rspec (~> 2.6.0)
|
129
|
+
ruby_parser (2.0.6)
|
130
|
+
sexp_processor (~> 3.0)
|
120
131
|
rubyzip (0.9.4)
|
121
|
-
sass (3.1.
|
132
|
+
sass (3.1.8)
|
122
133
|
selenium-webdriver (2.7.0)
|
123
134
|
childprocess (>= 0.2.1)
|
124
135
|
ffi (>= 1.0.7)
|
125
136
|
json_pure
|
126
137
|
rubyzip
|
127
|
-
|
138
|
+
sexp_processor (3.0.7)
|
139
|
+
slop (2.1.0)
|
140
|
+
sprockets (2.0.1)
|
128
141
|
hike (~> 1.2)
|
129
142
|
rack (~> 1.0)
|
130
|
-
tilt (
|
143
|
+
tilt (~> 1.1, != 1.3.0)
|
131
144
|
sqlite3 (1.3.4)
|
132
145
|
steak (2.0.0)
|
133
146
|
capybara (>= 1.0.0)
|
@@ -138,7 +151,7 @@ GEM
|
|
138
151
|
polyglot
|
139
152
|
polyglot (>= 0.3.1)
|
140
153
|
tzinfo (0.3.30)
|
141
|
-
will_filter (3.1.
|
154
|
+
will_filter (3.1.3)
|
142
155
|
coffee-script
|
143
156
|
kaminari
|
144
157
|
rails (>= 3.1.0)
|
@@ -154,6 +167,8 @@ DEPENDENCIES
|
|
154
167
|
capybara
|
155
168
|
database_cleaner
|
156
169
|
factory_girl
|
170
|
+
memcache-client (>= 1.8.5)
|
171
|
+
pry
|
157
172
|
rr
|
158
173
|
rspec
|
159
174
|
rspec-rails
|
data/README.rdoc
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
= Welcome to Tr8n Translation Engine
|
2
2
|
|
3
|
-
Tr8n Translation Engine is a Rails Engine Gem that provides a framework for crowd-sourced translation
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
Tr8n Translation Engine is a Rails Engine Plugin/Gem that provides a framework for crowd-sourced translation of any Rails based application.
|
4
|
+
The power of the engine comes from its simple and friendly user interface that allows site users as well as professional translators to rapidly
|
5
|
+
translate the site into hundreds of languages. The flexible and robust rules engine that powers Tr8n allows for any combination of language
|
6
|
+
specific rules in any translatable sentence. Users can provide information on what sentences depend on gender rules, number rules or other rules configured for each language.
|
7
|
+
The language specific context and case rules can be registered and managed for any language in the advanced user interface. The engine
|
8
|
+
provides a set of powerful administration tools that allow admins to manage any aspect of the engine; enabling and disabling its features
|
9
|
+
and monitoring translation progress.
|
10
10
|
|
11
11
|
The Tr8n engine itself is based on a very robust and flexible pluggable architecture where rule types and the syntax of the "tr" tokens
|
12
12
|
can be configured or extended for any application deployment.
|
@@ -41,59 +41,87 @@ http://wiki.tr8n.org/index.php?title=Tr8n_Languages
|
|
41
41
|
|
42
42
|
Add the following gems to your Gemfile:
|
43
43
|
|
44
|
-
gem
|
45
|
-
gem 'will_filter', "~> 3.
|
46
|
-
gem 'tr8n', "~> 3.
|
44
|
+
gem 'kaminari'
|
45
|
+
gem 'will_filter', "~> 3.1.2"
|
46
|
+
gem 'tr8n', "~> 3.1.1"
|
47
|
+
gem 'sass'
|
48
|
+
gem 'coffee-script'
|
47
49
|
|
50
|
+
|
48
51
|
And run:
|
49
52
|
|
50
|
-
$ bundle
|
53
|
+
$ bundle
|
51
54
|
|
52
|
-
|
55
|
+
At the top of your routes.rb file, add the following lines:
|
56
|
+
|
57
|
+
mount WillFilter::Engine => "/will_filter"
|
58
|
+
mount Tr8n::Engine => "/tr8n"
|
59
|
+
|
60
|
+
To configure and initialize Tr8n engine, run the following commands:
|
61
|
+
|
62
|
+
$ rails generate will_filter
|
63
|
+
$ rails generate tr8n
|
64
|
+
$ rake db:migrate
|
65
|
+
$ rake tr8n:init
|
66
|
+
$ rails s
|
53
67
|
|
54
|
-
$ rails generate will_filter
|
55
|
-
$ rails generate tr8n
|
56
|
-
$ rake db:migrate
|
57
|
-
$ rake tr8n:init
|
58
|
-
$ rails server
|
59
68
|
|
60
69
|
Open your browser and point to:
|
61
70
|
|
62
|
-
http://localhost:3000/tr8n
|
71
|
+
http://localhost:3000/tr8n
|
72
|
+
|
63
73
|
|
64
74
|
= Integration Instructions
|
65
75
|
|
66
|
-
The best way to get going with Tr8n is to run the
|
76
|
+
The best way to get going with Tr8n is to run the gem as a stand-alone application and follow the instructions and documentation in the app:
|
67
77
|
|
68
|
-
$ git clone
|
69
|
-
$ cd
|
78
|
+
$ git clone git://github.com/berk/tr8n.git
|
79
|
+
$ cd tr8n/local/tr8n_server
|
70
80
|
$ rake db:migrate
|
71
81
|
$ rake tr8n:init
|
72
|
-
$ rails
|
82
|
+
$ rails s
|
73
83
|
|
74
84
|
Open your browser and point to:
|
75
85
|
|
76
|
-
http://localhost:3000
|
77
|
-
|
78
|
-
Live Tr8n sample application is running here:
|
86
|
+
http://localhost:3000
|
79
87
|
|
80
|
-
http://bit.ly/e9QhFY
|
81
88
|
|
82
89
|
= Tr8n Screenshots
|
83
90
|
|
84
|
-
Below are a few screenshots of what
|
91
|
+
Below are a few screenshots of what Tr8n looks like:
|
92
|
+
|
93
|
+
== Tr8n Language Selector (in a lightbox)
|
94
|
+
|
95
|
+
http://wiki.tr8n.org/images/e/e8/Tr8n1.png
|
96
|
+
|
97
|
+
== Tr8n Translation Interface
|
98
|
+
|
99
|
+
http://wiki.tr8n.org/images/4/4d/Tr8n2.png
|
100
|
+
|
101
|
+
== Tr8n Translation Votes Interface
|
102
|
+
|
103
|
+
http://wiki.tr8n.org/images/c/ce/Tr8n3.png
|
104
|
+
|
105
|
+
== Tr8n Language Selector (as a dropdown)
|
106
|
+
|
107
|
+
http://wiki.tr8n.org/images/6/64/Tr8n4.png
|
108
|
+
|
109
|
+
== Tr8n Translation Interface (with a keyboard)
|
110
|
+
|
111
|
+
http://wiki.tr8n.org/images/4/47/Tr8n6.png
|
112
|
+
|
113
|
+
== Tr8n Translation Tools
|
85
114
|
|
86
|
-
http://wiki.tr8n.org/images/
|
115
|
+
http://wiki.tr8n.org/images/0/02/Tr8n8.png
|
87
116
|
|
88
|
-
|
117
|
+
== Tr8n Translator Dashboard
|
89
118
|
|
90
|
-
http://wiki.tr8n.org/images/
|
119
|
+
http://wiki.tr8n.org/images/7/7c/Tr8n5.png
|
91
120
|
|
92
|
-
|
121
|
+
== Tr8n Translation Admin Tools
|
93
122
|
|
94
|
-
http://wiki.tr8n.org/images/
|
123
|
+
http://wiki.tr8n.org/images/4/44/Tr8n7.png
|
95
124
|
|
96
|
-
http://wiki.tr8n.org/images/8/8b/Tr8n_screenshot_6.png
|
97
125
|
|
98
126
|
= External Links
|
99
127
|
|
data/Rakefile
CHANGED
@@ -22,21 +22,11 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
22
22
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
23
23
|
end
|
24
24
|
|
25
|
-
APP_RAKEFILE = File.expand_path("../
|
25
|
+
APP_RAKEFILE = File.expand_path("../local/tr8n_server/Rakefile", __FILE__)
|
26
26
|
load 'rails/tasks/engine.rake'
|
27
27
|
|
28
|
-
|
29
28
|
Bundler::GemHelper.install_tasks
|
30
29
|
|
31
|
-
require 'rake/testtask'
|
32
|
-
|
33
|
-
Rake::TestTask.new(:test) do |t|
|
34
|
-
t.libs << 'lib'
|
35
|
-
t.libs << 'test'
|
36
|
-
t.pattern = 'test/**/*_test.rb'
|
37
|
-
t.verbose = false
|
38
|
-
end
|
39
|
-
|
40
30
|
require 'rspec/core'
|
41
31
|
require 'rspec/core/rake_task'
|
42
32
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
Binary file
|
@@ -3,4 +3,45 @@
|
|
3
3
|
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
4
|
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
5
|
*= require_self
|
6
|
-
*/
|
6
|
+
*/
|
7
|
+
|
8
|
+
@mixin rounded-corners($radius) {
|
9
|
+
border-radius: $radius;
|
10
|
+
-moz-border-radius: $radius;
|
11
|
+
-webkit-border-radius: $radius;
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin shadow($info) {
|
15
|
+
box-shadow:$info;
|
16
|
+
-moz-box-shadow:$info;
|
17
|
+
-webkit-box-shadow:$info;
|
18
|
+
}
|
19
|
+
|
20
|
+
@import "layout.css.scss";
|
21
|
+
@import "components.css.scss";
|
22
|
+
|
23
|
+
img {vertical-align:text-middle !important;}
|
24
|
+
a {text-decoration:none; color:#16b; outline:none; border:0px;}
|
25
|
+
a:hover {text-decoration:underline}
|
26
|
+
a img {border:0px}
|
27
|
+
|
28
|
+
td {
|
29
|
+
font-size: 11px;
|
30
|
+
font-family: verdana;
|
31
|
+
}
|
32
|
+
h1 {
|
33
|
+
font-size:32px;
|
34
|
+
font-family:arial;
|
35
|
+
font-weight: bold;
|
36
|
+
padding: 0px;
|
37
|
+
padding-bottom: 15px;
|
38
|
+
margin: 0px;
|
39
|
+
}
|
40
|
+
h2 {
|
41
|
+
font-size:20px;
|
42
|
+
font-family:arial;
|
43
|
+
padding: 0px;
|
44
|
+
padding-bottom: 15px;
|
45
|
+
margin: 0px;
|
46
|
+
}
|
47
|
+
|
File without changes
|
File without changes
|
@@ -414,14 +414,22 @@ button::-moz-focus-inner {border:none;}
|
|
414
414
|
/*** Licensed under GPL and MIT.
|
415
415
|
/****************************************/
|
416
416
|
|
417
|
-
.tr8n_pcb
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
417
|
+
.tr8n_pcb {
|
418
|
+
background: url('/assets/tr8n/buttons.png') no-repeat;
|
419
|
+
height: 23px;
|
420
|
+
line-height: 23px;
|
421
|
+
padding: 3px 0 7px 0;
|
422
|
+
|
423
|
+
span {
|
424
|
+
background: url('/assets/tr8n/buttons.png') no-repeat;
|
425
|
+
height: 23px;
|
426
|
+
line-height: 23px;
|
427
|
+
padding: 3px 0 7px 0;
|
428
|
+
}
|
429
|
+
}
|
430
|
+
.tr8n_pcb {color: #333; font-size: 12px; font-style:bold; font-family:arial; padding-left: 14px; text-decoration: none !important; }
|
431
|
+
a.tr8n_pcb:link {color: #333; font-size: 12px; font-style:bold; font-family:arial; padding-left: 14px; text-decoration: none !important; }
|
432
|
+
a.tr8n_pcb:visited {color: #333; font-size: 12px; font-style:bold; font-family:arial; padding-left: 14px; text-decoration: none !important; }
|
425
433
|
|
426
434
|
.tr8n_pcb span {background-position: right -326px; padding-right: 14px; }
|
427
435
|
a.tr8n_grey_button {background-position: left -219px; padding-top: 3px; }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2010-2011 Michael Berkovich
|
2
|
+
# Copyright (c) 2010-2011 Michael Berkovich, tr8n.net
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining
|
5
5
|
# a copy of this software and associated documentation files (the
|
@@ -110,6 +110,10 @@ class Tr8n::Admin::TranslationKeyController < Tr8n::Admin::BaseController
|
|
110
110
|
@comments = Tr8n::TranslationKeyComment.filter(:params => params, :filter => Tr8n::TranslationKeyCommentFilter)
|
111
111
|
end
|
112
112
|
|
113
|
+
def sync_logs
|
114
|
+
@logs = Tr8n::SyncLog.filter(:params => params, :filter => Tr8n::SyncLogFilter)
|
115
|
+
end
|
116
|
+
|
113
117
|
def delete_comment
|
114
118
|
params[:comments] = [params[:comment_id]] if params[:comment_id]
|
115
119
|
if params[:comments]
|