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
Binary file
|
Binary file
|
@@ -1,86 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2010-2011 Michael Berkovich
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
-
# a copy of this software and associated documentation files (the
|
6
|
-
# "Software"), to deal in the Software without restriction, including
|
7
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
-
# the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be
|
13
|
-
# included in all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
-
#++
|
23
|
-
|
24
|
-
class Tr8n::LoginController < ApplicationController
|
25
|
-
|
26
|
-
layout Tr8n::Config.site_info[:tr8n_layout]
|
27
|
-
|
28
|
-
def index
|
29
|
-
if request.post?
|
30
|
-
translator = Tr8n::Translator.find_by_email_and_password(params[:email], params[:password])
|
31
|
-
|
32
|
-
if translator
|
33
|
-
login!(translator)
|
34
|
-
return redirect_to("/tr8n/dashboard")
|
35
|
-
end
|
36
|
-
|
37
|
-
trfe('Incorrect email or password')
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def register
|
42
|
-
if request.post?
|
43
|
-
unless validate_registration
|
44
|
-
translator = Tr8n::Translator.create(:user_id => 0, :email => params[:email],
|
45
|
-
:password => params[:password], :name => params[:name], :gender => params[:gender],
|
46
|
-
:mugshot => params[:mugshot], :link => params[:link])
|
47
|
-
login!(translator)
|
48
|
-
|
49
|
-
trfn('Thank you for registering.')
|
50
|
-
return redirect_to("/tr8n/dashboard")
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def out
|
56
|
-
logout!
|
57
|
-
redirect_to("/tr8n")
|
58
|
-
end
|
59
|
-
|
60
|
-
private
|
61
|
-
|
62
|
-
def validate_registration
|
63
|
-
params[:email].strip!
|
64
|
-
|
65
|
-
if params[:email].blank?
|
66
|
-
return trfe('Email is missing')
|
67
|
-
end
|
68
|
-
|
69
|
-
translator = Tr8n::Translator.find_by_email(params[:email])
|
70
|
-
if translator
|
71
|
-
return trfe('This email is already used by another user')
|
72
|
-
end
|
73
|
-
|
74
|
-
if params[:password].blank?
|
75
|
-
return trfe('Password is missing')
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def login!(translator)
|
80
|
-
session[:tr8n_translator_id] = translator.id
|
81
|
-
end
|
82
|
-
|
83
|
-
def logout!
|
84
|
-
session[:tr8n_translator_id] = nil
|
85
|
-
end
|
86
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<div class="page_ft module quiet">
|
2
|
-
<ul class="flt_r right_horiz_list">
|
3
|
-
<li><%=link_to(tr("Home"), "/tr8n/home", :class => "quiet")%></li>
|
4
|
-
<li><%=link_to(tr("Languages"), "/tr8n/language/table", :class => "quiet")%></li>
|
5
|
-
<li><%=link_to(tr("Translator Tools"), "/tr8n/dashboard", :class => "quiet")%></li>
|
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>
|
9
|
-
</ul>
|
10
|
-
© Copyright 2010 - 2011 Michael Berkovich
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div style="padding:15px;">
|
14
|
-
<%= tr8n_language_strip_tag %>
|
15
|
-
</div>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<div class="page_head">
|
2
|
-
<div class="page_fixed">
|
3
|
-
<div class="mrgn_h">
|
4
|
-
<%= tr8n_translator_login_tag(:class => "flt_r horiz_list top_nav") %>
|
5
|
-
<h1 class="logo"><%=link_to(tr("Tr8n Translation Engine", "Application title"), {:controller => "/tr8n/home"}, :style=>"text-decorations:none;")%></h1>
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="page_fixed">
|
11
|
-
<%= tr8n_flashes_tag %>
|
12
|
-
</div>
|
@@ -1,21 +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
|
-
<%=render :partial => "/layouts/html_head" %>
|
5
|
-
</head>
|
6
|
-
<body>
|
7
|
-
<div class="document">
|
8
|
-
<%=render :partial => "/layouts/header" %>
|
9
|
-
<div class="page_fixed">
|
10
|
-
<div class="page_body">
|
11
|
-
<div class="content_module">
|
12
|
-
<div class="content_inner">
|
13
|
-
<%= yield %>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
<%=render :partial =>"/layouts/footer" %>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</body>
|
21
|
-
</html>
|
@@ -1,33 +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
|
-
<%=render :partial => "/layouts/html_head" %>
|
5
|
-
<style>
|
6
|
-
.page_fixed {
|
7
|
-
width:1200px;
|
8
|
-
}
|
9
|
-
.page_body {
|
10
|
-
width:1200px;
|
11
|
-
}
|
12
|
-
|
13
|
-
.wf_form {
|
14
|
-
width: 99.8%;
|
15
|
-
}
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div class="document">
|
20
|
-
<%=render :partial => "/layouts/header" %>
|
21
|
-
<div class="page_fixed">
|
22
|
-
<div class="page_body">
|
23
|
-
<div class="content_module">
|
24
|
-
<div class="content_inner">
|
25
|
-
<%= yield %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
<%=render :partial =>"/layouts/footer" %>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
</body>
|
33
|
-
</html>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<%= tr8n_with_options_tag(:default_locale => 'en-US', :admin => true) do %>
|
2
|
-
<h2 class="underscore content_hd">
|
3
|
-
<%=tr('Login to Tr8n Translation Engine') %>
|
4
|
-
</h2>
|
5
|
-
<div class="content_bd">
|
6
|
-
|
7
|
-
<div class="page_form">
|
8
|
-
<%= form_tag(:controller=>:login, :action=>:index) do %>
|
9
|
-
<div class="field">
|
10
|
-
<div class="strong field_hd txt_r h4"><%=tr('Email:') %></div>
|
11
|
-
<div class="field_bd">
|
12
|
-
<%=text_field_tag :email, params[:email], :class => "xlong_input h4" %>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div class="field">
|
16
|
-
<div class="strong field_hd txt_r h4"><%=tr('Password:') %></div>
|
17
|
-
<div class="field_bd">
|
18
|
-
<%=password_field_tag :password, "", :class => "xlong_input h4" %>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<br>
|
22
|
-
<div class="field">
|
23
|
-
<div class="field_bd">
|
24
|
-
<button class="button super blue xlarge"><span><%=tr('Login') %></span></button>
|
25
|
-
<%= tr("or") %>
|
26
|
-
<%=link_to(tr("Register"), "/tr8n/login/register")%>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
<% end %>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
</div>
|
33
|
-
<% end %>
|
@@ -1,57 +0,0 @@
|
|
1
|
-
<%= tr8n_with_options_tag(:default_locale => 'en-US', :admin => true) do %>
|
2
|
-
<h2 class="underscore content_hd">
|
3
|
-
<%=tr('Register for Tr8n Translator Account') %>
|
4
|
-
</h2>
|
5
|
-
<div class="content_bd">
|
6
|
-
<div class="page_form">
|
7
|
-
<%= form_tag({}, :method => :post) do %>
|
8
|
-
<div class="field">
|
9
|
-
<div class="strong field_hd txt_r h4"><%=tr('Email:') %></div>
|
10
|
-
<div class="field_bd">
|
11
|
-
<%=text_field_tag :email, params[:email], :class => "xlong_input h4" %> *
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
<div class="field">
|
15
|
-
<div class="strong field_hd txt_r h4"><%=tr('Password:') %></div>
|
16
|
-
<div class="field_bd">
|
17
|
-
<%=password_field_tag :password, "", :class => "xlong_input h4"%> *
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
<div class="field">
|
21
|
-
<div class="strong field_hd txt_r h4"><%=tr('Name:') %></div>
|
22
|
-
<div class="field_bd">
|
23
|
-
<%=text_field_tag :name, params[:name], :class => "xlong_input h4" %>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
<div class="field">
|
27
|
-
<div class="strong field_hd txt_r h4"><%=tr('Gender:') %></div>
|
28
|
-
<div class="strong" style="padding-top:8px;">
|
29
|
-
<%=radio_button_tag(:gender, "male", params[:gender] == 'male')%> <%=tr('Male', 'Gender') %>
|
30
|
-
<%=radio_button_tag(:gender, "male", params[:gender] == 'female')%> <%=tr('Female', 'Gender') %>
|
31
|
-
<%=radio_button_tag(:gender, "unknown", params[:gender] == 'unknown')%> <%=tr('Unknown', 'Gender') %>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
<div class="field">
|
35
|
-
<div class="strong field_hd txt_r h4"><%=tr('Photo Url:') %></div>
|
36
|
-
<div class="field_bd">
|
37
|
-
<%=text_field_tag :mugshot, params[:mugshot], :class => "xlong_input h4" %>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
<div class="field">
|
41
|
-
<div class="strong field_hd txt_r h4"><%=tr('Link Url:') %></div>
|
42
|
-
<div class="field_bd">
|
43
|
-
<%=text_field_tag :link, params[:link], :class => "xlong_input h4" %>
|
44
|
-
</div>
|
45
|
-
</div>
|
46
|
-
<br>
|
47
|
-
<div class="field">
|
48
|
-
<div class="field_bd">
|
49
|
-
<button class="button super blue xlarge"><span><%= tr('Register') %></span></button>
|
50
|
-
<%= tr("or") %>
|
51
|
-
<%=link_to(tr("Login"), "/tr8n/login/index")%>
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
<% end %>
|
55
|
-
</div>
|
56
|
-
</div>
|
57
|
-
<% end %>
|
@@ -1,141 +0,0 @@
|
|
1
|
-
#############################################################################
|
2
|
-
#
|
3
|
-
# Tr8n Default Language Cases
|
4
|
-
#
|
5
|
-
#############################################################################
|
6
|
-
|
7
|
-
en-US:
|
8
|
-
case1:
|
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
|
-
case2:
|
14
|
-
keyword: "obj"
|
15
|
-
latin_name: "Objective"
|
16
|
-
native_name: "Objective"
|
17
|
-
description: "Used in the direct object, indirect object, object of preposition, object complement, and subject of an infinitive"
|
18
|
-
case3:
|
19
|
-
keyword: "pos"
|
20
|
-
latin_name: "Possessive"
|
21
|
-
native_name: "Possessive"
|
22
|
-
description: "Used to indicate possession (i.e., ownership). It is usually created by adding 's to the word"
|
23
|
-
rules:
|
24
|
-
rule1:
|
25
|
-
multipart: false
|
26
|
-
gender: none
|
27
|
-
part1: ends_in
|
28
|
-
value1: "s"
|
29
|
-
operation: append
|
30
|
-
value: "'"
|
31
|
-
rule2:
|
32
|
-
multipart: false
|
33
|
-
gender: none
|
34
|
-
part1: does_not_end_in
|
35
|
-
value1: "s"
|
36
|
-
operation: append
|
37
|
-
value: "'s"
|
38
|
-
case4:
|
39
|
-
keyword: "ord"
|
40
|
-
latin_name: "Ordinal"
|
41
|
-
native_name: "Ordinal"
|
42
|
-
description: "The adjective form of the cardinal numbers"
|
43
|
-
rules:
|
44
|
-
rule1:
|
45
|
-
multipart: true
|
46
|
-
gender: none
|
47
|
-
part1: ends_in
|
48
|
-
value1: "1"
|
49
|
-
operator: and
|
50
|
-
part2: does_not_end_in
|
51
|
-
value2: "11"
|
52
|
-
operation: append
|
53
|
-
value: "st"
|
54
|
-
rule2:
|
55
|
-
multipart: true
|
56
|
-
gender: none
|
57
|
-
part1: ends_in
|
58
|
-
value1: "2"
|
59
|
-
operator: and
|
60
|
-
part2: does_not_end_in
|
61
|
-
value2: "12"
|
62
|
-
operation: append
|
63
|
-
value: "nd"
|
64
|
-
rule3:
|
65
|
-
multipart: true
|
66
|
-
gender: none
|
67
|
-
part1: ends_in
|
68
|
-
value1: "3"
|
69
|
-
operator: and
|
70
|
-
part2: does_not_end_in
|
71
|
-
value2: "13"
|
72
|
-
operation: append
|
73
|
-
value: "rd"
|
74
|
-
rule4:
|
75
|
-
multipart: false
|
76
|
-
gender: none
|
77
|
-
part1: ends_in
|
78
|
-
value1: "0,4,5,6,7,8,9,11,12,13"
|
79
|
-
operation: append
|
80
|
-
value: "th"
|
81
|
-
|
82
|
-
ru:
|
83
|
-
case1:
|
84
|
-
keyword: "nom"
|
85
|
-
latin_name: "Nominativus"
|
86
|
-
native_name: "Именительный падеж"
|
87
|
-
description: "Есть - Кто? Что?"
|
88
|
-
case2:
|
89
|
-
keyword: "gen"
|
90
|
-
latin_name: "Genitivus"
|
91
|
-
native_name: "Родительный падеж"
|
92
|
-
description: "Нет - Кого? Чего?"
|
93
|
-
rules:
|
94
|
-
rule1:
|
95
|
-
multipart: false
|
96
|
-
gender: male
|
97
|
-
part1: ends_in
|
98
|
-
value1: "б, в, г, д, ж, з, к, л, м, н, п, р, с, т, ф, х, ц, ч, ш, щ"
|
99
|
-
operation: append
|
100
|
-
value: "a"
|
101
|
-
rule2:
|
102
|
-
multipart: false
|
103
|
-
gender: male
|
104
|
-
part1: ends_in
|
105
|
-
value1: "й"
|
106
|
-
operation: replace
|
107
|
-
value: "я"
|
108
|
-
rule3:
|
109
|
-
multipart: false
|
110
|
-
gender: female
|
111
|
-
part1: ends_in
|
112
|
-
value1: "а"
|
113
|
-
operation: replace
|
114
|
-
value: "ы"
|
115
|
-
rule3:
|
116
|
-
multipart: false
|
117
|
-
gender: female
|
118
|
-
part1: ends_in
|
119
|
-
value1: "я"
|
120
|
-
operation: replace
|
121
|
-
value: "и"
|
122
|
-
case3:
|
123
|
-
keyword: "dat"
|
124
|
-
latin_name: "Dativus"
|
125
|
-
native_name: "Дательный падеж"
|
126
|
-
description: "Рад - Кому? Чему?"
|
127
|
-
case4:
|
128
|
-
keyword: "acc"
|
129
|
-
latin_name: "Accusativus"
|
130
|
-
native_name: "Винительный падеж"
|
131
|
-
description: "Вижу - Кого? Что?"
|
132
|
-
case5:
|
133
|
-
keyword: "ins"
|
134
|
-
latin_name: "Instrumentalis"
|
135
|
-
native_name: "Творительный падеж"
|
136
|
-
description: "Доволен - Кем? Чем?"
|
137
|
-
case6:
|
138
|
-
keyword: "pre"
|
139
|
-
latin_name: "Prepositivus"
|
140
|
-
native_name: "Предложный падеж"
|
141
|
-
description: "Думаю - О ком? О чём?"
|
Binary file
|