Added some localization
This commit is contained in:
@@ -16,6 +16,6 @@ class User < ActiveRecord::Base
|
|||||||
has_many :posts, :dependent => :destroy
|
has_many :posts, :dependent => :destroy
|
||||||
|
|
||||||
def admin?
|
def admin?
|
||||||
true if self.username == 'admin'
|
self.is_admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<div class="module" style="padding:15px 25px 0px 25px;">
|
<div class="module" style="padding:15px 25px 0px 25px;">
|
||||||
<div style="float:left; width:50%; height:330px; padding-right:10px;">
|
<div style="float:left; width:50%; height:330px; padding-right:10px;">
|
||||||
<h1>Welcome to Horses</h1>
|
<h1><%= t :welcome_header%></h1>
|
||||||
|
<p><%= t :welcome_msg %></p>
|
||||||
<%= devise_error_messages! %>
|
<%= devise_error_messages! %>
|
||||||
</div>
|
</div>
|
||||||
<div style="float:right; width:45%; padding-left:30px; border-left:1px solid #e2e2e2;">
|
<div style="float:right; width:45%; padding-left:30px; border-left:1px solid #e2e2e2;">
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
|
|
||||||
<div class="module" style="padding:15px 25px 0px 25px;">
|
<div class="module" style="padding:15px 25px 0px 25px;">
|
||||||
<div style="float:left; width:50%; height:210px; padding-right:10px;">
|
<div style="float:left; width:50%; height:210px; padding-right:10px;">
|
||||||
<h1>Welcome to Horses</h1>
|
<h1><%= t :welcome_header %></h1>
|
||||||
|
<p><%= t :welcome_msg %></p>
|
||||||
</div>
|
</div>
|
||||||
<div style="float:right; width:45%; height:195px; padding-left:30px; border-left:1px solid #e2e2e2;">
|
<div style="float:right; width:45%; height:195px; padding-left:30px; border-left:1px solid #e2e2e2;">
|
||||||
<%= form_for("user", :url => user_session_path) do |f| %>
|
<%= form_for("user", :url => user_session_path) do |f| %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><%= content_for?(:title) ? yield(:title) : "Horses" %></title>
|
<title><%= content_for?(:title) ? yield(:title) : (t :name) %></title>
|
||||||
<%= stylesheet_link_tag "application", "forum-monster" %>
|
<%= stylesheet_link_tag "application", "forum-monster" %>
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
<%= yield(:head) %>
|
<%= yield(:head) %>
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<%= image_tag "rails.png" %>
|
<%= image_tag "rails.png" %>
|
||||||
<h1>Horses</h1>
|
<h1><%= t :name %></h1>
|
||||||
A forum about Horses
|
<%= t :description %>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="menu_wrapper">
|
<div id="menu_wrapper">
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ module Community
|
|||||||
# Enable the asset pipeline
|
# Enable the asset pipeline
|
||||||
config.assets.enabled = true
|
config.assets.enabled = true
|
||||||
|
|
||||||
config.assets.prefix = "/horses/assets"
|
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
config.assets.version = '1.0'
|
config.assets.version = '1.0'
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Devise.setup do |config|
|
|||||||
# session. If you need permissions, you should implement that in a before filter.
|
# session. If you need permissions, you should implement that in a before filter.
|
||||||
# You can also supply a hash where the value is a boolean determining whether
|
# You can also supply a hash where the value is a boolean determining whether
|
||||||
# or not authentication should be aborted when the value is not present.
|
# or not authentication should be aborted when the value is not present.
|
||||||
# config.authentication_keys = [ :email ]
|
config.authentication_keys = [ :username ]
|
||||||
|
|
||||||
# Configure parameters from the request object used for authentication. Each entry
|
# Configure parameters from the request object used for authentication. Each entry
|
||||||
# given should be a request method and it will automatically be passed to the
|
# given should be a request method and it will automatically be passed to the
|
||||||
|
|||||||
@@ -1,5 +1,210 @@
|
|||||||
# Sample localization file for English. Add more files in this directory for other locales.
|
|
||||||
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
|
||||||
|
|
||||||
en:
|
en:
|
||||||
hello: "Hello world"
|
date:
|
||||||
|
abbr_day_names:
|
||||||
|
- Sun
|
||||||
|
- Mon
|
||||||
|
- Tue
|
||||||
|
- Wed
|
||||||
|
- Thu
|
||||||
|
- Fri
|
||||||
|
- Sat
|
||||||
|
abbr_month_names:
|
||||||
|
-
|
||||||
|
- Jan
|
||||||
|
- Feb
|
||||||
|
- Mar
|
||||||
|
- Apr
|
||||||
|
- May
|
||||||
|
- Jun
|
||||||
|
- Jul
|
||||||
|
- Aug
|
||||||
|
- Sep
|
||||||
|
- Oct
|
||||||
|
- Nov
|
||||||
|
- Dec
|
||||||
|
day_names:
|
||||||
|
- Sunday
|
||||||
|
- Monday
|
||||||
|
- Tuesday
|
||||||
|
- Wednesday
|
||||||
|
- Thursday
|
||||||
|
- Friday
|
||||||
|
- Saturday
|
||||||
|
formats:
|
||||||
|
default: ! '%Y-%m-%d'
|
||||||
|
long: ! '%B %d, %Y'
|
||||||
|
short: ! '%b %d'
|
||||||
|
month_names:
|
||||||
|
-
|
||||||
|
- January
|
||||||
|
- February
|
||||||
|
- March
|
||||||
|
- April
|
||||||
|
- May
|
||||||
|
- June
|
||||||
|
- July
|
||||||
|
- August
|
||||||
|
- September
|
||||||
|
- October
|
||||||
|
- November
|
||||||
|
- December
|
||||||
|
order:
|
||||||
|
- :year
|
||||||
|
- :month
|
||||||
|
- :day
|
||||||
|
datetime:
|
||||||
|
distance_in_words:
|
||||||
|
about_x_hours:
|
||||||
|
one: about 1 hour
|
||||||
|
other: about %{count} hours
|
||||||
|
about_x_months:
|
||||||
|
one: about 1 month
|
||||||
|
other: about %{count} months
|
||||||
|
about_x_years:
|
||||||
|
one: about 1 year
|
||||||
|
other: about %{count} years
|
||||||
|
almost_x_years:
|
||||||
|
one: almost 1 year
|
||||||
|
other: almost %{count} years
|
||||||
|
half_a_minute: half a minute
|
||||||
|
less_than_x_minutes:
|
||||||
|
one: less than a minute
|
||||||
|
other: less than %{count} minutes
|
||||||
|
less_than_x_seconds:
|
||||||
|
one: less than 1 second
|
||||||
|
other: less than %{count} seconds
|
||||||
|
over_x_years:
|
||||||
|
one: over 1 year
|
||||||
|
other: over %{count} years
|
||||||
|
x_days:
|
||||||
|
one: 1 day
|
||||||
|
other: ! '%{count} days'
|
||||||
|
x_minutes:
|
||||||
|
one: 1 minute
|
||||||
|
other: ! '%{count} minutes'
|
||||||
|
x_months:
|
||||||
|
one: 1 month
|
||||||
|
other: ! '%{count} months'
|
||||||
|
x_seconds:
|
||||||
|
one: 1 second
|
||||||
|
other: ! '%{count} seconds'
|
||||||
|
prompts:
|
||||||
|
day: Day
|
||||||
|
hour: Hour
|
||||||
|
minute: Minute
|
||||||
|
month: Month
|
||||||
|
second: Seconds
|
||||||
|
year: Year
|
||||||
|
errors: &errors
|
||||||
|
format: ! '%{attribute} %{message}'
|
||||||
|
messages:
|
||||||
|
accepted: must be accepted
|
||||||
|
blank: can't be blank
|
||||||
|
confirmation: doesn't match confirmation
|
||||||
|
empty: can't be empty
|
||||||
|
equal_to: must be equal to %{count}
|
||||||
|
even: must be even
|
||||||
|
exclusion: is reserved
|
||||||
|
greater_than: must be greater than %{count}
|
||||||
|
greater_than_or_equal_to: must be greater than or equal to %{count}
|
||||||
|
inclusion: is not included in the list
|
||||||
|
invalid: is invalid
|
||||||
|
less_than: must be less than %{count}
|
||||||
|
less_than_or_equal_to: must be less than or equal to %{count}
|
||||||
|
not_a_number: is not a number
|
||||||
|
not_an_integer: must be an integer
|
||||||
|
odd: must be odd
|
||||||
|
record_invalid: ! 'Validation failed: %{errors}'
|
||||||
|
taken: has already been taken
|
||||||
|
too_long:
|
||||||
|
one: is too long (maximum is 1 character)
|
||||||
|
other: is too long (maximum is %{count} characters)
|
||||||
|
too_short:
|
||||||
|
one: is too short (minimum is 1 character)
|
||||||
|
other: is too short (minimum is %{count} characters)
|
||||||
|
wrong_length:
|
||||||
|
one: is the wrong length (should be 1 character)
|
||||||
|
other: is the wrong length (should be %{count} characters)
|
||||||
|
template:
|
||||||
|
body: ! 'There were problems with the following fields:'
|
||||||
|
header:
|
||||||
|
one: 1 error prohibited this %{model} from being saved
|
||||||
|
other: ! '%{count} errors prohibited this %{model} from being saved'
|
||||||
|
helpers:
|
||||||
|
select:
|
||||||
|
prompt: Please select
|
||||||
|
submit:
|
||||||
|
create: Create %{model}
|
||||||
|
submit: Save %{model}
|
||||||
|
update: Update %{model}
|
||||||
|
number:
|
||||||
|
currency:
|
||||||
|
format:
|
||||||
|
delimiter: ! ','
|
||||||
|
format: ! '%u%n'
|
||||||
|
precision: 2
|
||||||
|
separator: .
|
||||||
|
significant: false
|
||||||
|
strip_insignificant_zeros: false
|
||||||
|
unit: $
|
||||||
|
format:
|
||||||
|
delimiter: ! ','
|
||||||
|
precision: 3
|
||||||
|
separator: .
|
||||||
|
significant: false
|
||||||
|
strip_insignificant_zeros: false
|
||||||
|
human:
|
||||||
|
decimal_units:
|
||||||
|
format: ! '%n %u'
|
||||||
|
units:
|
||||||
|
billion: Billion
|
||||||
|
million: Million
|
||||||
|
quadrillion: Quadrillion
|
||||||
|
thousand: Thousand
|
||||||
|
trillion: Trillion
|
||||||
|
unit: ''
|
||||||
|
format:
|
||||||
|
delimiter: ''
|
||||||
|
precision: 3
|
||||||
|
significant: true
|
||||||
|
strip_insignificant_zeros: true
|
||||||
|
storage_units:
|
||||||
|
format: ! '%n %u'
|
||||||
|
units:
|
||||||
|
byte:
|
||||||
|
one: Byte
|
||||||
|
other: Bytes
|
||||||
|
gb: GB
|
||||||
|
kb: KB
|
||||||
|
mb: MB
|
||||||
|
tb: TB
|
||||||
|
percentage:
|
||||||
|
format:
|
||||||
|
delimiter: ''
|
||||||
|
precision:
|
||||||
|
format:
|
||||||
|
delimiter: ''
|
||||||
|
support:
|
||||||
|
array:
|
||||||
|
last_word_connector: ! ', and '
|
||||||
|
two_words_connector: ! ' and '
|
||||||
|
words_connector: ! ', '
|
||||||
|
time:
|
||||||
|
am: am
|
||||||
|
formats:
|
||||||
|
default: ! '%a, %d %b %Y %H:%M:%S %z'
|
||||||
|
long: ! '%B %d, %Y %H:%M'
|
||||||
|
short: ! '%d %b %H:%M'
|
||||||
|
pm: pm
|
||||||
|
# remove these aliases after 'activemodel' and 'activerecord' namespaces are removed from Rails repository
|
||||||
|
# activemodel:
|
||||||
|
# errors:
|
||||||
|
# <<: *errors
|
||||||
|
# activerecord:
|
||||||
|
# errors:
|
||||||
|
# <<: *errors
|
||||||
|
|
||||||
|
name: "Forum"
|
||||||
|
description: "A place to discuss things"
|
||||||
|
welcome_header: "Welcome to Forum"
|
||||||
|
welcome_msg: "A place to discuss things"
|
||||||
|
|||||||
Reference in New Issue
Block a user