infractores 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.env.sample +8 -0
  3. data/.gitignore +22 -0
  4. data/.travis.yml +14 -0
  5. data/CODE_OF_CONDUCT.md +49 -0
  6. data/Gemfile +67 -0
  7. data/Gemfile.lock +417 -0
  8. data/Guardfile +8 -0
  9. data/LICENSE +21 -0
  10. data/Procfile +2 -0
  11. data/README.md +48 -0
  12. data/Rakefile +6 -0
  13. data/app/assets/images/.keep +0 -0
  14. data/app/assets/images/gallery-buttons.png +0 -0
  15. data/app/assets/images/logo-infractores.svg +10 -0
  16. data/app/assets/javascripts/application.js +18 -0
  17. data/app/assets/javascripts/bootstrap.js +4 -0
  18. data/app/assets/javascripts/index.js +82 -0
  19. data/app/assets/javascripts/twitter.js +18 -0
  20. data/app/assets/stylesheets/1-utilities/_variables.scss +12 -0
  21. data/app/assets/stylesheets/2-quarks/_typography.scss +32 -0
  22. data/app/assets/stylesheets/3-atoms/_buttons.scss +3 -0
  23. data/app/assets/stylesheets/4-molecules/_footer.scss +32 -0
  24. data/app/assets/stylesheets/4-molecules/_infraction-gallery.scss +101 -0
  25. data/app/assets/stylesheets/4-molecules/_navbar.scss +71 -0
  26. data/app/assets/stylesheets/5-pages/index.scss +165 -0
  27. data/app/assets/stylesheets/5-pages/show.scss +29 -0
  28. data/app/assets/stylesheets/application.css +18 -0
  29. data/app/assets/stylesheets/bootstrap_and_overrides.css +7 -0
  30. data/app/controllers/application_controller.rb +5 -0
  31. data/app/controllers/concerns/.keep +0 -0
  32. data/app/controllers/infractions_controller.rb +23 -0
  33. data/app/controllers/users_controller.rb +7 -0
  34. data/app/helpers/application_helper.rb +19 -0
  35. data/app/helpers/infractions_helper.rb +6 -0
  36. data/app/mailers/.keep +0 -0
  37. data/app/models/.keep +0 -0
  38. data/app/models/concerns/.keep +0 -0
  39. data/app/models/evidence.rb +23 -0
  40. data/app/models/infraction.rb +43 -0
  41. data/app/models/tweet.rb +54 -0
  42. data/app/models/user.rb +34 -0
  43. data/app/services/twitter_service.rb +51 -0
  44. data/app/uploaders/evidence_uploader.rb +62 -0
  45. data/app/views/infractions/_map.html.erb +17 -0
  46. data/app/views/infractions/_reported_by.html.erb +4 -0
  47. data/app/views/infractions/_summary.html.erb +23 -0
  48. data/app/views/infractions/index.html.erb +18 -0
  49. data/app/views/infractions/show.html.erb +24 -0
  50. data/app/views/layouts/application.html.erb +90 -0
  51. data/app/views/shared/_google_analytics.html.erb +12 -0
  52. data/app/views/users/index.html.erb +21 -0
  53. data/app/workers/tweet_inspector.rb +18 -0
  54. data/bin/bundle +3 -0
  55. data/bin/rails +8 -0
  56. data/bin/rake +8 -0
  57. data/bin/setup +29 -0
  58. data/bin/spring +15 -0
  59. data/config.ru +4 -0
  60. data/config/application.rb +27 -0
  61. data/config/boot.rb +3 -0
  62. data/config/database.yml.sample +85 -0
  63. data/config/environment.rb +5 -0
  64. data/config/environments/development.rb +50 -0
  65. data/config/environments/production.rb +79 -0
  66. data/config/environments/test.rb +42 -0
  67. data/config/initializers/assets.rb +15 -0
  68. data/config/initializers/backtrace_silencers.rb +7 -0
  69. data/config/initializers/carrierwave.rb +17 -0
  70. data/config/initializers/cookies_serializer.rb +3 -0
  71. data/config/initializers/filter_parameter_logging.rb +4 -0
  72. data/config/initializers/inflections.rb +16 -0
  73. data/config/initializers/mime_types.rb +4 -0
  74. data/config/initializers/session_store.rb +3 -0
  75. data/config/initializers/twitter.rb +1 -0
  76. data/config/initializers/wrap_parameters.rb +14 -0
  77. data/config/locales/en.bootstrap.yml +23 -0
  78. data/config/locales/en.yml +23 -0
  79. data/config/locales/es.yml +263 -0
  80. data/config/routes.rb +6 -0
  81. data/config/secrets.yml +22 -0
  82. data/db/migrate/20150824210535_add_tweets_table.rb +8 -0
  83. data/db/migrate/20150829133406_create_infractions.rb +11 -0
  84. data/db/migrate/20150829134520_create_users.rb +12 -0
  85. data/db/migrate/20150829141909_add_user_id_to_tweets.rb +5 -0
  86. data/db/migrate/20150829154430_create_locations.rb +10 -0
  87. data/db/migrate/20150830224603_create_evidences_table.rb +8 -0
  88. data/db/migrate/20150911020838_add_valid_column_to_infractions.rb +6 -0
  89. data/db/migrate/20150911025204_add_index_to_users_username.rb +5 -0
  90. data/db/migrate/20151102220702_add_lat_lon_to_infractions.rb +6 -0
  91. data/db/migrate/20151102221811_remove_locations.rb +5 -0
  92. data/db/migrate/20151117194703_add_reported_at_to_infractions.rb +5 -0
  93. data/db/migrate/20160229023500_change_lat_lon_precision.rb +6 -0
  94. data/db/seeds.rb +7 -0
  95. data/infractores.gemspec +25 -0
  96. data/lib/assets/.keep +0 -0
  97. data/lib/infractores.rb +1 -0
  98. data/lib/infractores/version.rb +3 -0
  99. data/lib/tasks/.keep +0 -0
  100. data/lib/tasks/twitter.rake +16 -0
  101. data/lib/tasks/users.rake +9 -0
  102. data/log/.keep +0 -0
  103. data/public/404.html +67 -0
  104. data/public/422.html +67 -0
  105. data/public/500.html +66 -0
  106. data/public/favicon.ico +0 -0
  107. data/public/robots.txt +5 -0
  108. data/vendor/assets/images/blank.gif +0 -0
  109. data/vendor/assets/images/fancybox_loading.gif +0 -0
  110. data/vendor/assets/images/fancybox_loading@2x.gif +0 -0
  111. data/vendor/assets/images/fancybox_overlay.png +0 -0
  112. data/vendor/assets/images/fancybox_sprite.png +0 -0
  113. data/vendor/assets/images/fancybox_sprite@2x.png +0 -0
  114. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  115. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  116. data/vendor/assets/javascripts/.keep +0 -0
  117. data/vendor/assets/javascripts/jquery.fancybox-buttons.js +122 -0
  118. data/vendor/assets/javascripts/jquery.fancybox.pack.js +46 -0
  119. data/vendor/assets/javascripts/livereload.js +1183 -0
  120. data/vendor/assets/stylesheets/.keep +0 -0
  121. data/vendor/assets/stylesheets/jquery.fancybox-buttons.css +97 -0
  122. data/vendor/assets/stylesheets/jquery.fancybox.css +274 -0
  123. metadata +215 -0
@@ -0,0 +1,3 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,85 @@
1
+ # PostgreSQL. Versions 8.2 and up are supported.
2
+ #
3
+ # Install the pg driver:
4
+ # gem install pg
5
+ # On OS X with Homebrew:
6
+ # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7
+ # On OS X with MacPorts:
8
+ # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9
+ # On Windows:
10
+ # gem install pg
11
+ # Choose the win32 build.
12
+ # Install PostgreSQL and put its /bin directory on your path.
13
+ #
14
+ # Configure Using Gemfile
15
+ # gem 'pg'
16
+ #
17
+ default: &default
18
+ adapter: postgresql
19
+ encoding: unicode
20
+ # For details on connection pooling, see rails configuration guide
21
+ # http://guides.rubyonrails.org/configuring.html#database-pooling
22
+ pool: 5
23
+
24
+ development:
25
+ <<: *default
26
+ database: infractores_development
27
+
28
+ # The specified database role being used to connect to postgres.
29
+ # To create additional roles in postgres see `$ createuser --help`.
30
+ # When left blank, postgres will use the default role. This is
31
+ # the same name as the operating system user that initialized the database.
32
+ #username: infractores
33
+
34
+ # The password associated with the postgres role (username).
35
+ #password:
36
+
37
+ # Connect on a TCP socket. Omitted by default since the client uses a
38
+ # domain socket that doesn't need configuration. Windows does not have
39
+ # domain sockets, so uncomment these lines.
40
+ #host: localhost
41
+
42
+ # The TCP port the server listens on. Defaults to 5432.
43
+ # If your server runs on a different port number, change accordingly.
44
+ #port: 5432
45
+
46
+ # Schema search path. The server defaults to $user,public
47
+ #schema_search_path: myapp,sharedapp,public
48
+
49
+ # Minimum log levels, in increasing order:
50
+ # debug5, debug4, debug3, debug2, debug1,
51
+ # log, notice, warning, error, fatal, and panic
52
+ # Defaults to warning.
53
+ #min_messages: notice
54
+
55
+ # Warning: The database defined as "test" will be erased and
56
+ # re-generated from your development database when you run "rake".
57
+ # Do not set this db to the same as development or production.
58
+ test:
59
+ <<: *default
60
+ database: infractores_test
61
+
62
+ # As with config/secrets.yml, you never want to store sensitive information,
63
+ # like your database password, in your source code. If your source code is
64
+ # ever seen by anyone, they now have access to your database.
65
+ #
66
+ # Instead, provide the password as a unix environment variable when you boot
67
+ # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
68
+ # for a full rundown on how to provide these environment variables in a
69
+ # production deployment.
70
+ #
71
+ # On Heroku and other platform providers, you may have a full connection URL
72
+ # available as an environment variable. For example:
73
+ #
74
+ # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
75
+ #
76
+ # You can use this database configuration with:
77
+ #
78
+ # production:
79
+ # url: <%= ENV['DATABASE_URL'] %>
80
+ #
81
+ production:
82
+ <<: *default
83
+ database: infractores_production
84
+ username: infractores
85
+ password: <%= ENV['INFRACTORES_DATABASE_PASSWORD'] %>
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,50 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
33
+
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
38
+
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
41
+ config.after_initialize do
42
+ Bullet.enable = true
43
+ Bullet.alert = true
44
+ Bullet.bullet_logger = true
45
+ Bullet.console = true
46
+ Bullet.rails_logger = true
47
+ Bullet.add_footer = true
48
+ end
49
+
50
+ end
@@ -0,0 +1,79 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
+
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
30
+
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ config.assets.compile = false
33
+
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
36
+ config.assets.digest = true
37
+
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
+
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
+
44
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
+ # config.force_ssl = true
46
+
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
50
+
51
+ # Prepend all log lines with the following tags.
52
+ # config.log_tags = [ :subdomain, :uuid ]
53
+
54
+ # Use a different logger for distributed setups.
55
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
+
57
+ # Use a different cache store in production.
58
+ # config.cache_store = :mem_cache_store
59
+
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
62
+
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
+ # config.action_mailer.raise_delivery_errors = false
66
+
67
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
+ # the I18n.default_locale when a translation cannot be found).
69
+ config.i18n.fallbacks = true
70
+
71
+ # Send deprecation notices to registered listeners.
72
+ config.active_support.deprecation = :notify
73
+
74
+ # Use default logging formatter so that PID and timestamp are not suppressed.
75
+ config.log_formatter = ::Logger::Formatter.new
76
+
77
+ # Do not dump schema after migrations.
78
+ config.active_record.dump_schema_after_migration = false
79
+ end
@@ -0,0 +1,42 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
36
+
37
+ # Print deprecation notices to the stderr.
38
+ config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
42
+ end
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
12
+
13
+ if Rails.env.development?
14
+ Rails.application.config.assets.precompile += %w( livereload.js )
15
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,17 @@
1
+ if Rails.env.test?
2
+ CarrierWave.configure do |config|
3
+ config.storage = :file
4
+ config.enable_processing = false
5
+ end
6
+ else
7
+ CarrierWave.configure do |config|
8
+ config.fog_credentials = {
9
+ provider: 'AWS', # required
10
+ aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'], # required
11
+ aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
12
+ region: ENV['AWS_REGION']
13
+ }
14
+ config.fog_directory = "infractores-ba-#{Rails.env}"
15
+ config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
16
+ end
17
+ end
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_infractores_session'
@@ -0,0 +1 @@
1
+ TWTTR = TwitterService.instance
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ breadcrumbs:
6
+ application:
7
+ root: "Index"
8
+ pages:
9
+ pages: "Pages"
10
+ helpers:
11
+ actions: "Actions"
12
+ links:
13
+ back: "Back"
14
+ cancel: "Cancel"
15
+ confirm: "Are you sure?"
16
+ destroy: "Delete"
17
+ new: "New"
18
+ edit: "Edit"
19
+ titles:
20
+ edit: "Edit %{model}"
21
+ save: "Save %{model}"
22
+ new: "New %{model}"
23
+ delete: "Delete %{model}"
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,263 @@
1
+ # Spanish translations for Rails
2
+ # by Francisco Fernando García Nieto (ffgarcianieto@gmail.com)
3
+
4
+ es:
5
+ number:
6
+ # Used in number_with_delimiter()
7
+ # These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
8
+ format:
9
+ # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
10
+ separator: ","
11
+ # Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
12
+ delimiter: "."
13
+ # Number of decimals, behind the separator (1 with a precision of 2 gives: 1.00)
14
+ precision: 3
15
+ # If set to true, precision will mean the number of significant digits instead
16
+ # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2)
17
+ significant: false
18
+ # If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2)
19
+ strip_insignificant_zeros: false
20
+
21
+ # Used in number_to_currency()
22
+ currency:
23
+ format:
24
+ # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
25
+ format: "%n"
26
+ unit: "€"
27
+ # These three are to override number.format and are optional
28
+ separator: ","
29
+ delimiter: "."
30
+ precision: 2
31
+ significant: false
32
+ strip_insignificant_zeros: false
33
+
34
+ # Used in number_to_percentage()
35
+ percentage:
36
+ format:
37
+ # These three are to override number.format and are optional
38
+ # separator:
39
+ delimiter: ""
40
+ # precision:
41
+
42
+ # Used in number_to_precision()
43
+ precision:
44
+ format:
45
+ # These three are to override number.format and are optional
46
+ # separator:
47
+ delimiter: ""
48
+ # precision:
49
+ # significant: false
50
+ # strip_insignificant_zeros: false
51
+
52
+ # Used in number_to_human_size()
53
+ human:
54
+ format:
55
+ # These three are to override number.format and are optional
56
+ # separator:
57
+ delimiter: ""
58
+ precision: 1
59
+ significant: true
60
+ strip_insignificant_zeros: true
61
+ # Used in number_to_human_size()
62
+ storage_units:
63
+ format: "%n %u"
64
+ units:
65
+ byte:
66
+ one: "Byte"
67
+ other: "Bytes"
68
+ kb: "KB"
69
+ mb: "MB"
70
+ gb: "GB"
71
+ tb: "TB"
72
+ # Used in number_to_human()
73
+ decimal_units:
74
+ format: "%n %u"
75
+ # Decimal units output formatting
76
+ # By default we will only quantify some of the exponents
77
+ # but the commented ones might be defined or overridden
78
+ # by the user.
79
+ units:
80
+ # femto: Quadrillionth
81
+ # pico: Trillionth
82
+ # nano: Billionth
83
+ # micro: Millionth
84
+ # mili: Thousandth
85
+ # centi: Hundredth
86
+ # deci: Tenth
87
+ unit: ""
88
+ # ten:
89
+ # one: Ten
90
+ # other: Tens
91
+ # hundred: Hundred
92
+ thousand: "Mil"
93
+ million: "Millón"
94
+ billion: "Mil millones"
95
+ trillion: "Trillón"
96
+ quadrillion: "Cuatrillón"
97
+
98
+ # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
99
+ datetime:
100
+ distance_in_words:
101
+ half_a_minute: "medio minuto"
102
+ less_than_x_seconds:
103
+ one: "menos de 1 segundo"
104
+ other: "menos de %{count} segundos"
105
+ x_seconds:
106
+ one: "1 segundo"
107
+ other: "%{count} segundos"
108
+ less_than_x_minutes:
109
+ one: "menos de 1 minuto"
110
+ other: "menos de %{count} minutos"
111
+ x_minutes:
112
+ one: "1 minuto"
113
+ other: "%{count} minutos"
114
+ about_x_hours:
115
+ one: "alrededor de 1 hora"
116
+ other: "alrededor de %{count} horas"
117
+ x_days:
118
+ one: "1 día"
119
+ other: "%{count} días"
120
+ about_x_months:
121
+ one: "alrededor de 1 mes"
122
+ other: "alrededor de %{count} meses"
123
+ x_months:
124
+ one: "1 mes"
125
+ other: "%{count} meses"
126
+ about_x_years:
127
+ one: "alrededor de 1 año"
128
+ other: "alrededor de %{count} años"
129
+ over_x_years:
130
+ one: "más de 1 año"
131
+ other: "más de %{count} años"
132
+ almost_x_years:
133
+ one: "casi 1 año"
134
+ other: "casi %{count} años"
135
+ prompts:
136
+ year: "Año"
137
+ month: "Mes"
138
+ day: "Día"
139
+ hour: "Hora"
140
+ minute: "Minutos"
141
+ second: "Segundos"
142
+
143
+ helpers:
144
+ select:
145
+ # Default value for :prompt => true in FormOptionsHelper
146
+ prompt: "Por favor seleccione"
147
+
148
+ # Default translation keys for submit FormHelper
149
+ submit:
150
+ create: 'Guardar %{model}'
151
+ update: 'Actualizar %{model}'
152
+ submit: 'Guardar %{model}'
153
+
154
+ # Active Record models configuration
155
+ activerecord:
156
+ errors:
157
+ messages:
158
+ taken: "ya está en uso"
159
+ record_invalid: "La validación falló: %{errors}"
160
+ # Append your own errors here or at the model/attributes scope.
161
+ # You can define own errors for models or model attributes.
162
+ # The values :model, :attribute and :value are always available for interpolation.
163
+ #
164
+ # For example,
165
+ # models:
166
+ # user:
167
+ # blank: "This is a custom blank message for %{model}: %{attribute}"
168
+ # attributes:
169
+ # login:
170
+ # blank: "This is a custom blank message for User login"
171
+ # Will define custom blank validation message for User model and
172
+ # custom blank validation message for login attribute of User model.
173
+ models:
174
+ product:
175
+ attributes:
176
+ price:
177
+ blank: "no puede estar en blanco"
178
+ seller:
179
+ attributes:
180
+ name:
181
+ taken: "Ya existe un shop con ese nombre. Por favor elija otro nombre."
182
+ user:
183
+ attributes:
184
+ email:
185
+ invalid: "no es válida"
186
+
187
+ # Active Model
188
+ errors:
189
+ # The default format to use in full error messages.
190
+ format: "%{attribute} %{message}"
191
+
192
+ template:
193
+ header:
194
+ one: "No se pudo guardar este/a %{model} porque se encontró 1 error"
195
+ other: "No se pudo guardar este/a %{model} porque se encontraron %{count} errores"
196
+ # The variable :count is also available
197
+ body: "Se encontraron problemas con los siguientes campos:"
198
+
199
+ # The values :model, :attribute and :value are always available for interpolation
200
+ # The value :count is available when applicable. Can be used for pluralization.
201
+ messages:
202
+ inclusion: "no está incluido en la lista"
203
+ exclusion: "está reservado"
204
+ invalid: "no es válido"
205
+ confirmation: "no coincide con la confirmación"
206
+ accepted: "debe ser aceptado"
207
+ empty: "no puede estar vacío"
208
+ blank: "no puede estar en blanco"
209
+ too_long: "es demasiado largo (%{count} caracteres máximo)"
210
+ too_short: "es demasiado corta (%{count} caracteres mínimo)"
211
+ wrong_length: "no tiene la longitud correcta (%{count} caracteres exactos)"
212
+ not_a_number: "no es un número"
213
+ greater_than: "debe ser mayor que %{count}"
214
+ greater_than_or_equal_to: "debe ser mayor que o igual a %{count}"
215
+ equal_to: "debe ser igual a %{count}"
216
+ less_than: "debe ser menor que %{count}"
217
+ less_than_or_equal_to: "debe ser menor que o igual a %{count}"
218
+ odd: "debe ser impar"
219
+ even: "debe ser par"
220
+
221
+ # Active Support
222
+ date:
223
+ formats:
224
+ # Use the strftime parameters for formats.
225
+ # When no format has been given, it uses default.
226
+ # You can provide other formats here if you like!
227
+ default: "%e/%m/%Y"
228
+ short: "%e de %b"
229
+ long: "%e de %B de %Y"
230
+ date_time24: "%d/%m/%Y"
231
+
232
+ day_names: [Domingo, Lunes, Martes, Miércoles, Jueves, Viernes, Sábado]
233
+ abbr_day_names: [Dom, Lun, Mar, Mie, Jue, Vie, Sab]
234
+
235
+ # Don't forget the nil at the beginning; there's no such thing as a 0th month
236
+ month_names: [~, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre]
237
+ abbr_month_names: [~, Ene, Feb, Mar, Abr, May, Jun, Jul, Ago, Sep, Oct, Nov, Dic]
238
+ # Used in date_select and datime_select.
239
+ order:
240
+ - :day
241
+ - :month
242
+ - :year
243
+ resource:
244
+ member_object_not_found: "No se encontró el registro."
245
+ successfully_created: "Creado!"
246
+ successfully_removed: "Eliminado!"
247
+ successfully_updated: "Actualizado!"
248
+ time:
249
+ formats:
250
+ default: "%A, %e de %B de %Y %H:%M:%S %z"
251
+ short: "%e/%m/%Y %H:%M"
252
+ long: "%e de %B de %Y a las %H:%M"
253
+ date_time24: "%e de %B a las %H:%Mhs"
254
+
255
+ am: "am"
256
+ pm: "pm"
257
+
258
+ # Used in array.to_sentence.
259
+ support:
260
+ array:
261
+ words_connector: ", "
262
+ two_words_connector: " y "
263
+ last_word_connector: ", y "