Commit eab3a90f authored by 神楽坂玲奈's avatar 神楽坂玲奈

i18n 初步

parent 7a046f11
...@@ -5,6 +5,7 @@ gem "activerecord-import", ">= 0.2.0" ...@@ -5,6 +5,7 @@ gem "activerecord-import", ">= 0.2.0"
gem 'will_paginate' gem 'will_paginate'
gem 'will-paginate-i18n' gem 'will-paginate-i18n'
gem "paperclip", "~> 3.0" gem "paperclip", "~> 3.0"
gem 'http_accept_language'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
......
...@@ -45,6 +45,7 @@ GEM ...@@ -45,6 +45,7 @@ GEM
execjs (1.3.0) execjs (1.3.0)
multi_json (~> 1.0) multi_json (~> 1.0)
hike (1.2.1) hike (1.2.1)
http_accept_language (1.0.2)
i18n (0.6.0) i18n (0.6.0)
journey (1.0.3) journey (1.0.3)
jquery-rails (2.0.1) jquery-rails (2.0.1)
...@@ -119,6 +120,7 @@ PLATFORMS ...@@ -119,6 +120,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
activerecord-import (>= 0.2.0) activerecord-import (>= 0.2.0)
coffee-rails (~> 3.2.1) coffee-rails (~> 3.2.1)
http_accept_language
jquery-rails jquery-rails
mysql2 mysql2
paperclip (~> 3.0) paperclip (~> 3.0)
......
This diff is collapsed.
...@@ -19,12 +19,14 @@ class ApplicationController < ActionController::Base ...@@ -19,12 +19,14 @@ class ApplicationController < ActionController::Base
end end
end end
def load_locale def load_locale
#locale = @current_user.locale || ( if @current_user.locale
# request_language = I18n.locale = @current_user.locale
# request_language && request_language['HTTP_ACCEPT_LANGUAGE'][/[^,;]+/] else
#) request.user_preferred_languages.each do |request_language|
I18n.locale = 'zh-CN'#locale if File.exist?("#{::Rails.root}/config/locales/#{request_language}.yml") break I18n.locale = request_language if File.exist?("#{::Rails.root}/config/locales/#{request_language}.yml")
User::Guest.name = t 'user.guest' end
end
User::Guest.name = User.human_attribute_name :guest
#IE && FF are not support #IE && FF are not support
end end
def load_theme def load_theme
...@@ -61,19 +63,4 @@ class ApplicationController < ActionController::Base ...@@ -61,19 +63,4 @@ class ApplicationController < ActionController::Base
@navigations = Navigation.find_all_by_super_id 0 @navigations = Navigation.find_all_by_super_id 0
end end
#def redirect_to_thc
#p 'WARNING: '+params[:anything]+"?"+env['QUERY_STRING']
#redirect_to("http://www.touhou.cc/bbs/"+params[:anything]+"?"+env['QUERY_STRING'])
#respond_to do |format|
#format.html { render :error => "404" }
#end
#end
alias old_redirect_to redirect_to
def redirect_to(*args)
if args.first == :back and env['HTTP_REFERER'].blank?
old_redirect_to(:root)
else
old_redirect_to *args
end
end
end end
\ No newline at end of file
...@@ -7,7 +7,7 @@ class BoardsController < ApplicationController ...@@ -7,7 +7,7 @@ class BoardsController < ApplicationController
def index def index
@boards = Board.where(:superboard_id => 0) @boards = Board.where(:superboard_id => 0)
@links = Link.all @links = Link.all
@actions = [{'论坛'=>:boards}] @actions = [Board.human_attribute_name(:index)]
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.xml { render :xml => @boards } format.xml { render :xml => @boards }
...@@ -19,7 +19,7 @@ class BoardsController < ApplicationController ...@@ -19,7 +19,7 @@ class BoardsController < ApplicationController
def show def show
@board = Board.find(params[:id]) @board = Board.find(params[:id])
@actions = [{'论坛'=>:boards}, @board] @actions = [{Board.human_attribute_name(:index) => boards_path}, @board]
@actions = [@board] @actions = [@board]
order = params[:order].blank? ? 'displayorder DESC, updated_at DESC' : params[:order] order = params[:order].blank? ? 'displayorder DESC, updated_at DESC' : params[:order]
@topics = @board.topics.page(params[:page]).order(order) @topics = @board.topics.page(params[:page]).order(order)
......
...@@ -7,10 +7,10 @@ class DuelsController < ApplicationController ...@@ -7,10 +7,10 @@ class DuelsController < ApplicationController
if params[:user_id] if params[:user_id]
@user = User.find params[:user_id] @user = User.find params[:user_id]
@duels = @user.duels @duels = @user.duels
@actions = [{"YGO战网" => users_path}, @user, '对战列表'] @actions = [{t('mycard.battlenet') => users_path}, @user, Duel.human_attribute_name(:index)]
else else
@duels = Duel.where(true) @duels = Duel.where(true)
@actions = [{"YGO战网" => users_path}, '对战列表'] @actions = [{t('mycard.battlenet') => users_path}, Duel.human_attribute_name(:index)]
end end
@duels = @duels.reverse_order.page(params[:page]) @duels = @duels.reverse_order.page(params[:page])
respond_to do |format| respond_to do |format|
...@@ -23,7 +23,7 @@ class DuelsController < ApplicationController ...@@ -23,7 +23,7 @@ class DuelsController < ApplicationController
# GET /duels/1.json # GET /duels/1.json
def show def show
@duel = Duel.find(params[:id]) @duel = Duel.find(params[:id])
@actions = [{"YGO战网" => users_path}, {'对战列表' => duels_path}, @duel] @actions = [{t('mycard.battlenet') => users_path}, {Duel.human_attribute_name(:index) => duels_path}, @duel]
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.json { render json: @duel } format.json { render json: @duel }
...@@ -53,8 +53,8 @@ class DuelsController < ApplicationController ...@@ -53,8 +53,8 @@ class DuelsController < ApplicationController
@duel.winreason = params[:duel][:winreason] @duel.winreason = params[:duel][:winreason]
@duel.replay = params[:duel][:replay] @duel.replay = params[:duel][:replay]
@duel.version = params[:duel][:version] @duel.version = params[:duel][:version]
@duel.user1 = User.find_or_create_by_name params[:duel][:user1_name] if params[:duel][:user1_name] @duel.user1 = User.find_by_name params[:duel][:user1_name] if params[:duel][:user1_name]
@duel.user2 = User.find_or_create_by_name params[:duel][:user2_name] if params[:duel][:user2_name] @duel.user2 = User.find_by_name params[:duel][:user2_name] if params[:duel][:user2_name]
return if @duel.user1 == @duel.user2 return if @duel.user1 == @duel.user2
[params[:duel][:user1_main], params[:duel][:user1_extra], params[:duel][:user2_main], params[:duel][:user2_extra]].each_with_index do |cards, index| [params[:duel][:user1_main], params[:duel][:user1_extra], params[:duel][:user2_main], params[:duel][:user2_extra]].each_with_index do |cards, index|
user = index / 2 == 0 ? @duel.user1 : @duel.user2 user = index / 2 == 0 ? @duel.user1 : @duel.user2
......
class MycardController < ApplicationController class MycardController < ApplicationController
layout false
def index
end
def update def update
result = [] result = []
version = params[:version] version = params[:version]
......
...@@ -8,22 +8,14 @@ class RoomsController < ApplicationController ...@@ -8,22 +8,14 @@ class RoomsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.json do format.json do
open('http://140.113.242.66:7922/?operation=getroomjson') do |file| open('http://140.113.242.66:7922/?operation=getroomjson', 'r:GBK') do |file|
file.set_encoding("GBK") JSON.parse(file.read.encode("UTF-8"))["rooms"].each do |r|
file.read.encode("UTF-8").scan(Room_Filter) do |id, name, status, users| room = {id: r["roomid"].to_i, name: r["roomname"], status: r["istart"].to_sym, users: []}
room = {id: id.to_i, name: name, status: status} r["users"].each do |u|
room[:users] = [] if u["id"] == "0"
users.scan(User_Filter) do |player, name, certified| user = {player: u["pos"].to_i%2+1, id: 0, name: u["name"], certified: false}
certified = if certified.nil?
name[-5,5] != "(未认证)"
else else
certified == "-1" user = {player: u["pos"].to_i%2+1, id: User.find_by_name(u["name"]).id, name: u["name"], certified: true}
end
if certified
user = User.find_by_name(name)
user = {player: player.to_i, id: user ? user.id : 0, name: name, certified: true}
else
user = {player: player.to_i, id: 0, name: name, certified: false}
end end
room[:users] << user room[:users] << user
end end
......
...@@ -2,14 +2,12 @@ ...@@ -2,14 +2,12 @@
class UsersController < ApplicationController class UsersController < ApplicationController
require 'open-uri' require 'open-uri'
layout 'ygo' layout 'ygo'
#ApplicationHelper::addon_header.push "zh_header"
#ApplicationHelper::addon_top.push "zh_top"
#ApplicationHelper::addon_footer.push "zh_footer"
# GET /users # GET /users
# GET /users.xml # GET /users.xml
def index def index
@users = User.all @users = User.all
@actions = [{"YGO战网" => users_path}, "用户排行"] @actions = [{t('mycard.battlenet') => users_path}, User.human_attribute_name(:index)]
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
#format.xml { render :xml => @users } #format.xml { render :xml => @users }
...@@ -20,7 +18,7 @@ class UsersController < ApplicationController ...@@ -20,7 +18,7 @@ class UsersController < ApplicationController
# GET /users/1.xml # GET /users/1.xml
def show def show
@user = User.find_by_id(params[:id]) || User.find_by_name(params[:id]) @user = User.find_by_id(params[:id]) || User.find_by_name(params[:id])
@actions = [{"YGO战网" => users_path}, @user] @actions = [{t('mycard.battlenet') => users_path}, @user]
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
#format.xml { render :xml => @user } #format.xml { render :xml => @user }
...@@ -31,7 +29,7 @@ class UsersController < ApplicationController ...@@ -31,7 +29,7 @@ class UsersController < ApplicationController
# GET /users/new # GET /users/new
# GET /users/new.xml # GET /users/new.xml
def new def new
@actions = ["注册"] @actions = [User.human_attribute_name(:register)]
@user = User.new @user = User.new
respond_to do |format| respond_to do |format|
...@@ -62,7 +60,7 @@ class UsersController < ApplicationController ...@@ -62,7 +60,7 @@ class UsersController < ApplicationController
# POST /users.xml # POST /users.xml
def create def create
@user = User.new(params[:user]) @user = User.new(params[:user])
@actions = ["注册"] @actions = [User.human_attribute_name(:register)]
respond_to do |format| respond_to do |format|
if @user.save if @user.save
reply = begin reply = begin
...@@ -129,11 +127,11 @@ class UsersController < ApplicationController ...@@ -129,11 +127,11 @@ class UsersController < ApplicationController
end end
end end
def login def login
@actions = ["登陆"] @actions = [User.human_attribute_name(:login)]
@user = User.new @user = User.new
end end
def login_do def login_do
@actions = ["登陆"] @actions = [User.human_attribute_name(:login)]
user = User.find_by_name(params[:user][:name]) user = User.find_by_name(params[:user][:name])
if user and params[:user][:password] == user.password if user and params[:user][:password] == user.password
@user = user @user = user
......
...@@ -37,6 +37,6 @@ class Duel < ActiveRecord::Base ...@@ -37,6 +37,6 @@ class Duel < ActiveRecord::Base
user_cards(user2, false) user_cards(user2, false)
end end
def to_s def to_s
"决斗详情" Duel.human_attribute_name(:detail)
end end
end end
...@@ -2,19 +2,18 @@ ...@@ -2,19 +2,18 @@
class User < ActiveRecord::Base class User < ActiveRecord::Base
has_attached_file :avatar, :styles => { :middle => ["120x120#", :png], :small => ["48x48#", :png] }, :default_url => lambda { |avatar| "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(avatar.instance.email.strip.downcase)}?size=#{120}" } has_attached_file :avatar, :styles => { :middle => ["120x120#", :png], :small => ["48x48#", :png] }, :default_url => lambda { |avatar| "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(avatar.instance.email.strip.downcase)}?size=#{120}" }
#has_and_belongs_to_many :cards, :table_name => :duels_users_cards
has_many :duel_user_cards has_many :duel_user_cards
has_many :cards, :through => :duel_user_cards has_many :cards, :through => :duel_user_cards
has_many :wins, :class_name => "Duel", :foreign_key => :winner_id has_many :wins, :class_name => "Duel", :foreign_key => :winner_id
belongs_to :role belongs_to :role
validates :name, :presence => true, validates :name, :presence => true,
:length => {:minimum => 1, :maximum => 254} :length => {:minimum => 1, :maximum => 254},
# validates :email, :presence => true, :uniqueness => true
# :length => {:minimum => 3, :maximum => 254}, validates :email, :presence => true,
# :uniqueness => true, :length => {:minimum => 3, :maximum => 254},
# :format => {:with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i} :uniqueness => true,
:format => {:with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i}
has_many :topics has_many :topics
has_many :posts, :through => :topics has_many :posts, :through => :topics
...@@ -31,17 +30,17 @@ class User < ActiveRecord::Base ...@@ -31,17 +30,17 @@ class User < ActiveRecord::Base
def to_s def to_s
"<a href=\"/users/#{id}\">#{name}</a>".html_safe "<a href=\"/users/#{id}\">#{name}</a>".html_safe
end end
# def avatar(size=nil) # def avatar(size=nil)
# size = case size # size = case size
# when :small # when :small
# 48 # 48
# when Integer # when Integer
# size # size
# else # else
# 120 # 120
# end # end
# "<a href=\"/users/#{id}\"><img src=\"http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(email.strip.downcase)}?size=#{size}\" /></a>".html_safe # "<a href=\"/users/#{id}\"><img src=\"http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(email.strip.downcase)}?size=#{size}\" /></a>".html_safe
# end # end
class <<self #TODO class <<self #TODO
......
...@@ -22,16 +22,18 @@ ...@@ -22,16 +22,18 @@
<thead> <thead>
<tr> <tr>
<% if @user %> <% if @user %>
<th>场次</th> <th><%= Duel.human_attribute_name :id %></th>
<th>对手</th> <th><%= Duel.human_attribute_name :opponent %></th>
<th>胜负</th> <th><%= Duel.human_attribute_name :result %></th>
<th>得分</th> <th><%= Duel.human_attribute_name :points %></th>
<th><%= Duel.human_attribute_name :detail %></th>
<% else %> <% else %>
<th>场次</th> <th><%= Duel.human_attribute_name :id %></th>
<th>玩家1</th> <th><%= Duel.human_attribute_name :winner %></th>
<th>玩家2</th> <th><%= Duel.human_attribute_name :points %></th>
<th>玩家1得分</th> <th><%= Duel.human_attribute_name :loser %></th>
<th>玩家2得分</th> <th><%= Duel.human_attribute_name :points %></th>
<th><%= Duel.human_attribute_name :detail %></th>
<% end %> <% end %>
</tr> </tr>
</thead> </thead>
...@@ -47,12 +49,25 @@ ...@@ -47,12 +49,25 @@
<td class="user opponent"><% opponent = duel.user1 == @user ? duel.user2 : duel.user1 %><%= link_to opponent.name, opponent %></td> <td class="user opponent"><% opponent = duel.user1 == @user ? duel.user2 : duel.user1 %><%= link_to opponent.name, opponent %></td>
<td class="result <%= duel.winner == @user ? "win" : "lose" %>"><%= duel.winner == @user ? "WIN" : "LOSE" %></td> <td class="result <%= duel.winner == @user ? "win" : "lose" %>"><%= duel.winner == @user ? "WIN" : "LOSE" %></td>
<td class="credits <%= duel.winner == @user ? "win" : "lose" %>"><%= duel.user1 == @user ? duel.user1_credits : duel.user2_credits %></td> <td class="credits <%= duel.winner == @user ? "win" : "lose" %>"><%= duel.user1 == @user ? duel.user1_credits : duel.user2_credits %></td>
<td class="show"><%= link_to Duel.human_attribute_name(:show), duel %></td>
<% else %> <% else %>
<% if duel.winner == duel.user1
winner = duel.user1
loser = duel.user2
winner_points = duel.user1_credits
loser_points = duel.user2_credits
else
winner = duel.user2
loser = duel.user1
winner_points = duel.user2_credits
loser_points = duel.user1_credits
end %>
<td class="index"><%= link_to duel.id, duel %></td> <td class="index"><%= link_to duel.id, duel %></td>
<td class="user user1"><%= link_to duel.user1.name, duel.user1 %></td> <td class="user win"><%= link_to winner.name, winner %></td>
<td class="user user2"><%= link_to duel.user2.name, duel.user2 %></td> <td class="credits win"><%= winner_points %></td>
<td class="credits user1 <%= duel.winner == duel.user1 ? "win" : "lose" %>"><%= duel.user1_credits %></td> <td class="user lose"><%= link_to loser.name, loser %></td>
<td class="credits user2 <%= duel.winner == duel.user2 ? "win" : "lose" %>"><%= duel.user2_credits %></td> <td class="credits lose"><%= loser_points %></td>
<td class="show"><%= link_to Duel.human_attribute_name(:show), duel %></td>
<% end %> <% end %>
</tr> </tr>
<% end %> <% end %>
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
</div> </div>
</div> </div>
<footer id="footer"> <footer id="footer">
YGO DULE BATTLENET yuyuhaso & Mycard Team <p>YGO DUEL BATTLENET yuyuhaso & Mycard Team</p>
友情技术支持:<a href="http://fh-sky.5d6d.com/">凤凰(FH)战队</a> <p>友情技术支持:<a href="http://fh-sky.5d6d.com/">凤凰(FH)战队</a></p>
</footer> </footer>
</body> </body>
</html> </html>
\ No newline at end of file
<meta charset="UTF-8" />
<%= @site.name %> <br />
<br />
<%= link_to User.human_attribute_name(:register), register_path %><br />
<br />
<%= link_to User.human_attribute_name(:login), login_path %><br />
<%= link_to t('mycard.download'), mycard_download_path %><br />
<br />
<%= link_to User.human_attribute_name(:index), users_path %><br />
<%= link_to User.human_attribute_name(:show), logged? ? @current_user : User.first %><br />
<%= link_to Card.human_attribute_name(:index), cards_path %><br />
<%= link_to Card.human_attribute_name(:show), Card.first %><br />
<%= link_to Duel.human_attribute_name(:index), duels_path %><br />
<%= link_to Duel.human_attribute_name(:show), Duel.last %><br />
<%= link_to Board.human_attribute_name(:index), boards_path %><br />
<%= link_to 'API', '/api' %><br />
\ No newline at end of file
<h1>Mycard#update</h1>
<p>Find me in app/views/mycard/update.html.erb</p>
...@@ -6,22 +6,22 @@ ...@@ -6,22 +6,22 @@
#users .me {color:deepskyblue} #users .me {color:deepskyblue}
#users .name a {color:#FFE793} #users .name a {color:#FFE793}
#users .credits {color:#FF6468} #users .credits {color:#FF6468}
#users .ratio {color:#58DB3E; text-align:right} #users .ratio {color:#58DB3E;}
#users .win {color:red; text-align:right} #users .win {color:red;}
#users .lost {color:blue; text-align:right} #users .lost {color:blue;}
#users .show a {color:#DFC84B} #users .show a {color:#DFC84B}
</style> </style>
<table id="users"> <table id="users">
<thead> <thead>
<tr> <tr>
<th>名次</th> <th><%= User.human_attribute_name :ranking %> </th>
<th>决斗者</th> <th><%= User.human_attribute_name :name %></th>
<th>积分</th> <th><%= Duel.human_attribute_name :points %></th>
<th>胜率</th> <th><%= Duel.human_attribute_name :wins %></th>
<th></th> <th><%= Duel.human_attribute_name :losses %></th>
<th></th> <th><%= User.human_attribute_name :ratio %></th>
<th>得分纪录</th> <th><%= User.human_attribute_name :detail %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
<td class="credits"><%= user.credits %></td> <td class="credits"><%= user.credits %></td>
<% win = user.wins.count %> <% win = user.wins.count %>
<% all = user.duels.count %> <% all = user.duels.count %>
<td class="ratio"><%= all.zero? ? 0 : 100 * win / all %>%</td>
<td class="win"><%= win %></td> <td class="win"><%= win %></td>
<td class="lost"><%= all - win %></td> <td class="lost"><%= all - win %></td>
<td class="show"><%= link_to '详情', user %></td> <td class="ratio"><%= all.zero? ? 0 : 100 * win / all %>%</td>
<td class="show"><%= link_to User.human_attribute_name(:show), user %></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
......
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
<% end %> <% end %>
<div class="field"> <div class="field">
<%= f.label t('user.name') %><br /> <%= f.label :name %><br />
<%= f.text_field :name %> <%= f.text_field :name %>
</div> </div>
<div class="field"> <div class="field">
<%= f.label t('user.password') %><br /> <%= f.label :password %><br />
<%= f.password_field :password %> <%= f.password_field :password %>
</div> </div>
<div class="actions"> <div class="actions">
<%= f.submit t('user.login') %> <%= f.submit %>
</div> </div>
<% end %> <% end %>
...@@ -19,11 +19,15 @@ ...@@ -19,11 +19,15 @@
background: -moz-linear-gradient(#58A2DA, #147EBD);background: -ms-linear-gradient(#58A2DA, #147EBD); background: -moz-linear-gradient(#58A2DA, #147EBD);background: -ms-linear-gradient(#58A2DA, #147EBD);
background: -o-linear-gradient(#58A2DA, #147EBD);background: linear-gradient(#58A2DA, #147EBD);} background: -o-linear-gradient(#58A2DA, #147EBD);background: linear-gradient(#58A2DA, #147EBD);}
.film_bit_download:active{margin:1px 0 0 75px;-moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none;} .film_bit_download:active{margin:1px 0 0 75px;-moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none;}
#title{display:none} #title{display:none}
#actions{display:none} #actions{display:none}
#footer{display:none} #footer{display:none}
#main{display:block} #main{display:block}
#error_explanation{position:fixed;right:10px;top:50%;margin:-176px 0 0 0;z-index:10;color:#000000;border:3px solid #FF0066;border-radius:5px;background:#ffffff;width:310px;box-shadow:0px 2px 5px #999999;}
#error_explanation h2{background:#FF0066;margin:0;padding:4px 4px 4px 8px;font-size:14px;color:#ffffff;text-align:left; letter-spacing:0px}
#error_explanation h4{margin:4px 0 0 4px;padding:4px;text-align:left; font-weight:normal;font-size:12px;}
#error_explanation ul{padding:0 0 0 40px; text-align:left;font-size:12px;}
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
...@@ -56,9 +60,9 @@ ...@@ -56,9 +60,9 @@
<%= form_for(@user, :html => {:onsubmit => "return postOrder();"}) do |f| %> <%= form_for(@user, :html => {:onsubmit => "return postOrder();"}) do |f| %>
<% if @user.errors.any? %> <% if @user.errors.any? %>
<div id="error_explanation" style="color:black"> <div id="error_explanation">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> <h2><%=t 'activerecord.errors.template.header', :count => @user.errors.size, :model => @user.class.model_name.human %></h2>
<h4><%=t 'activerecord.errors.template.body', :count => @user.errors.size %></h4>
<ul> <ul>
<% @user.errors.full_messages.each do |msg| %> <% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li> <li><%= msg %></li>
...@@ -70,33 +74,33 @@ ...@@ -70,33 +74,33 @@
<!--<p>用户注册说明:用户名和密码长度总和不得超过18个字符 ,用户名不得包含“$”以及“=” 号,否则无法登陆,其他无限制</p>--> <!--<p>用户注册说明:用户名和密码长度总和不得超过18个字符 ,用户名不得包含“$”以及“=” 号,否则无法登陆,其他无限制</p>-->
<div class="main_div"> <div class="main_div">
<div style="font-size:18px;margin:20px 0 10px 25px;padding:0 0 10px 0;border-bottom:1px solid #eeeeee;width:450px;">用户注册</div> <div style="font-size:18px;margin:20px 0 10px 25px;padding:0 0 10px 0;border-bottom:1px solid #eeeeee;width:450px;"><%=t User.human_attribute_name :register %> </div>
<div class="inner_div"> <div class="inner_div">
<div class="floatleft form_label"><%= f.label t('user.name') %></div> <div class="floatleft form_label"><%= f.label :name %></div>
<div class="floatleft"> <div class="floatleft">
<%= f.text_field :name, :id => :username, :class => :from_input %> <%= f.text_field :name, :id => :username, :class => :from_input %>
</div> </div>
</div> </div>
<div class="inner_div"> <div class="inner_div">
<div class="floatleft form_label"><%= f.label t('user.password') %></div> <div class="floatleft form_label"><%= f.label :password %></div>
<div class="floatleft"> <div class="floatleft">
<%= f.text_field :password, :id => :password, :class => :from_input %> <%= f.text_field :password, :id => :password, :class => :from_input %>
</div> </div>
</div> </div>
<div class="inner_div"> <div class="inner_div">
<div class="floatleft form_label"><%= f.label t('user.password_repeat') %></div> <div class="floatleft form_label"><%= f.label :password_repeat %></div>
<div class="floatleft"> <div class="floatleft">
<%= f.text_field :password, :id => :rePassword, :class => :from_input %> <%= f.text_field :password, :id => :rePassword, :class => :from_input %>
</div> </div>
</div> </div>
<div class="inner_div"> <div class="inner_div">
<div class="floatleft form_label"><%= f.label t('user.email') %></div> <div class="floatleft form_label"><%= f.label :email %></div>
<div class="floatleft"> <div class="floatleft">
<%= f.text_field :email, :id => :email, :class => :from_input %> <%= f.text_field :email, :id => :email, :class => :from_input %>
</div> </div>
</div> </div>
<div class="inner_div"> <div class="inner_div">
<%= f.submit t('user.register'), :class=>"film_bit_download", :style=>"width:54px;height:25px;padding:4px 14px;border:1px solid #eeeeee;border-radius:5px;color:#ffffff;" %> <%= f.submit :class=>"film_bit_download", :style=>"width:54px;height:25px;padding:4px 14px;border:1px solid #eeeeee;border-radius:5px;color:#ffffff;" %>
</div> </div>
</div> </div>
<% end %> <% end %>
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
<p><%= User.human_attribute_name :id %>: <%= @user.id %></p> <p><%= User.human_attribute_name :id %>: <%= @user.id %></p>
<p><%= User.human_attribute_name :email %>: <%= @user.email %></p> <p><%= User.human_attribute_name :email %>: <%= @user.email %></p>
<p><%= User.human_attribute_name :created_at %>: <%=l @user.created_at, :format => :long %></p> <p><%= User.human_attribute_name :created_at %>: <%=l @user.created_at, :format => :long %></p>
<p>决斗统计:胜<%= @user.wins.count %>:负<%= @user.losts.count %> 总场次:<%= @user.duels.count %></p> <p><%= Duel.human_attribute_name :record %><%= @user.wins.count %> <%= Duel.human_attribute_name :wins %>, <%= @user.losts.count %> <%= Duel.human_attribute_name :losses %>, <%= Duel.human_attribute_name :total %>: <%= @user.duels.count %></p>
<% end %> <% end %>
</div> </div>
<div style="clear:both"></div> <div style="clear:both"></div>
<div id="cards"> <div id="cards">
<p><b>常用怪兽:</b> </p> <p><b><%= User.human_attribute_name :top_monsters %>:</b> </p>
<% @user.cards.main_monsters.top(10).each do |card| %> <% @user.cards.main_monsters.top(10).each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %> <%= link_to image_tag(card.image, :title => card.name), card %>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<% end %> <% end %>
<div style="clear:both"></div> <div style="clear:both"></div>
<p><b>常用额外:</b> </p> <p><b><%= User.human_attribute_name :top_extras %>:</b> </p>
<% @user.cards.extra.top(5).each do |card| %> <% @user.cards.extra.top(5).each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %> <%= link_to image_tag(card.image, :title => card.name), card %>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<% end %> <% end %>
<div style="clear:both"></div> <div style="clear:both"></div>
<p><b>常用魔法:</b> </p> <p><b><%= User.human_attribute_name :top_spells %>:</b> </p>
<% @user.cards.magics.top(5).each do |card| %> <% @user.cards.magics.top(5).each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %> <%= link_to image_tag(card.image, :title => card.name), card %>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<% end %> <% end %>
<div style="clear:both"></div> <div style="clear:both"></div>
<p><b>常用陷阱:</b> </p> <p><b><%= User.human_attribute_name :top_traps %>:</b> </p>
<% @user.cards.traps.top(5).each do |card| %> <% @user.cards.traps.top(5).each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %> <%= link_to image_tag(card.image, :title => card.name), card %>
...@@ -72,16 +72,16 @@ ...@@ -72,16 +72,16 @@
<table id="duels"> <table id="duels">
<thead> <thead>
<tr> <tr>
<th>场次</th> <th><%= Duel.human_attribute_name :id %></th>
<th>对手</th> <th><%= Duel.human_attribute_name :opponent %></th>
<th>胜负</th> <th><%= Duel.human_attribute_name :result %></th>
<th>得分</th> <th><%= Duel.human_attribute_name :points %></th>
<th>战斗终分</th> <th><%= Duel.human_attribute_name :total_points %></th>
</tr> </tr>
</thead> </thead>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="5"><%= link_to "更多...", {:controller => :duels, :action => :index, :user_id => @user.id} %></td> <td colspan="5"><%= link_to t('more'), {:controller => :duels, :action => :index, :user_id => @user.id} %></td>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
......
10
dir
91
http://glupx.googlecode.com/svn/trunk/Reliz/config/locales
http://glupx.googlecode.com/svn
2011-05-16T13:23:40.474092Z
86
zh99998
svn:special svn:externals svn:needs-lock
189f022a-1064-8ae2-3e6f-c4a67275c50b
en.yml
file
2012-03-13T01:07:05.927000Z
16efc327461a7bdac033b4897171b5c6
2011-03-25T13:37:23.315011Z
35
zh99998
212
zh-CN.yml
file
2012-03-13T01:07:05.922000Z
8fdbc480232321a4330f300eaa9325da
2011-05-16T13:23:40.474092Z
86
zh99998
8050
# Sample localization file for English. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hello world"
\ No newline at end of file
# Chinese (China) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
zh-CN:
user:
login: "登陆"
register: "注册"
logout: "退出"
my: "我的中心"
space: "空间"
notice: "提醒"
pm: "短消息"
name: "用户名"
password: "密码"
password_repeat: "重复密码"
email: "邮箱"
credit: "积分"
id: "ID"
post: "帖子"
topic: "主题"
digest: "精华"
guest: "游客"
avatar: "头像"
nickname: "昵称"
signature: "个人签名"
forum:
next: "下一页"
prev: "上一页"
link: "友情链接"
board:
control: "管理面板"
name: "版块名称"
introduction: "版块简介"
notice: "版块公告"
logo: "板块图标"
banner: "板块顶图"
readperm: "阅读权限"
topicperm: "主题权限"
postperm: "回帖权限"
submit: "提交"
topic: "主题"
post: "帖子"
none: "从未"
subboard: "子版快"
search:
search: "搜索"
advanced: "高级搜索"
stat:
onlineuser: "在线人数"
total: "总计"
max: "最高"
at: "于"
topic:
new: "发帖"
reply: "回复"
quote: "引用"
title: "标题"
submit: "提交"
order: "排序"
displayorder: "置顶"
digest: "精华"
user_name: "作者"
view_num: "查看"
reply_num: "回复"
post_last: "最后回复"
created_at: "发表时间"
updated_at: "回复时间"
control:
delete: "删除"
displayorder: "置顶"
digest: "精华"
lock: "锁定"
highlight: "高亮"
post:
edit: "编辑"
content: "正文"
submit: "提交"
private: "仅楼主可见"
anonymous: "匿名发帖"
date:
formats:
default: "%Y-%m-%d"
short: "%b%d日"
long: "%Y年%b%d日"
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
order:
- :year
- :month
- :day
time:
formats:
default: "%Y年%b%d日 %A %H:%M:%S %Z"
short: "%b%d日 %H:%M"
long: "%Y年%b%d日 %H:%M"
am: "上午"
pm: "下午"
datetime:
today: "今日"
yesterday: "昨日"
distance_in_words:
half_a_minute: "半分钟"
less_than_x_seconds:
one: "不到一秒"
other: "不到 %{count} 秒"
x_seconds:
one: "一秒"
other: "%{count} 秒"
less_than_x_minutes:
one: "不到一分钟"
other: "不到 %{count} 分钟"
x_minutes:
one: "一分钟"
other: "%{count} 分钟"
about_x_hours:
one: "大约一小时"
other: "大约 %{count} 小时"
x_days:
one: "一天"
other: "%{count} 天"
about_x_months:
one: "大约一个月"
other: "大约 %{count} 个月"
x_months:
one: "一个月"
other: "%{count} 个月"
about_x_years:
one: "大约一年"
other: "大约 %{count} 年"
over_x_years:
one: "一年多"
other: "%{count} 年多"
almost_x_years:
one: "接近一年"
other: "接近 %{count} 年"
prompts:
year: "年"
month: "月"
day: "日"
hour: "时"
minute: "分"
second: "秒"
number:
format:
separator: "."
delimiter: ","
precision: 3
significant: false
strip_insignificant_zeros: false
currency:
format:
format: "%u %n"
unit: "CN¥"
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
percentage:
format:
delimiter: ""
precision:
format:
delimiter: ""
human:
format:
delimiter: ""
precision: 1
significant: false
strip_insignificant_zeros: false
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
decimal_units:
format: "%n %u"
units:
# 10^-21 zepto, 10^-24 yocto
atto: "渺" # 10^-18
femto: "飞" # 10^-15 毫微微
pico: "漠" # 10^-12 微微
nano: "奈" # 10^-9 毫微
micro: "微" # 10^-6
mili: "毫" # 10^-3 milli
centi: "厘" # 10^-2
deci: "分" # 10^-1
unit: ""
ten:
one: "十"
other: "十" # 10^1
hundred: "百" # 10^2
thousand: "千" # 10^3 kilo
million: "百万" # 10^6 mega
billion: "十亿" # 10^9 giga
trillion: "兆" # 10^12 tera
quadrillion: "千兆" # 10^15 peta
# 10^18 exa, 10^21 zetta, 10^24 yotta
support:
array:
words_connector: ", "
two_words_connector: " 和 "
last_word_connector: ", 和 "
select:
prompt: "请选择"
activerecord:
models:
user: 用户
attributes:
pm:
to_user: "收件人"
content: "正文"
errors:
template: # ~ 2.3.5 backward compatible
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
full_messages:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
taken: "已经被使用"
record_invalid: "校验失败: %{errors}"
activemodel:
errors:
template:
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
errors:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
helpers:
select:
prompt: "请选择"
submit:
create: "新增"
update: "修改"
submit: "储存"
\ No newline at end of file
# Chinese (China) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
zh-CN:
user:
login: "登陆"
register: "注册"
logout: "退出"
my: "我的中心"
space: "空间"
notice: "提醒"
pm: "短消息"
name: "用户名"
password: "密码"
password_repeat: "重复密码"
email: "邮箱"
credit: "积分"
id: "ID"
post: "帖子"
topic: "主题"
digest: "精华"
guest: "游客"
avatar: "头像"
nickname: "昵称"
signature: "个人签名"
forum:
next: "下一页"
prev: "上一页"
link: "友情链接"
board:
control: "管理面板"
name: "版块名称"
introduction: "版块简介"
notice: "版块公告"
logo: "板块图标"
banner: "板块顶图"
readperm: "阅读权限"
topicperm: "主题权限"
postperm: "回帖权限"
submit: "提交"
topic: "主题"
post: "帖子"
none: "从未"
subboard: "子版快"
search:
search: "搜索"
advanced: "高级搜索"
stat:
onlineuser: "在线人数"
total: "总计"
max: "最高"
at: "于"
topic:
new: "发帖"
reply: "回复"
quote: "引用"
title: "标题"
submit: "提交"
order: "排序"
displayorder: "置顶"
digest: "精华"
user_name: "作者"
view_num: "查看"
reply_num: "回复"
post_last: "最后回复"
created_at: "发表时间"
updated_at: "回复时间"
control:
delete: "删除"
displayorder: "置顶"
digest: "精华"
lock: "锁定"
highlight: "高亮"
post:
edit: "编辑"
content: "正文"
submit: "提交"
private: "仅楼主可见"
anonymous: "匿名发帖"
date:
formats:
default: "%Y-%m-%d"
short: "%b%d日"
long: "%Y年%b%d日"
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
order:
- :year
- :month
- :day
time:
formats:
default: "%Y年%b%d日 %A %H:%M:%S %Z"
short: "%b%d日 %H:%M"
long: "%Y年%b%d日 %H:%M"
am: "上午"
pm: "下午"
datetime:
today: "今日"
yesterday: "昨日"
distance_in_words:
half_a_minute: "半分钟"
less_than_x_seconds:
one: "不到一秒"
other: "不到 %{count} 秒"
x_seconds:
one: "一秒"
other: "%{count} 秒"
less_than_x_minutes:
one: "不到一分钟"
other: "不到 %{count} 分钟"
x_minutes:
one: "一分钟"
other: "%{count} 分钟"
about_x_hours:
one: "大约一小时"
other: "大约 %{count} 小时"
x_days:
one: "一天"
other: "%{count} 天"
about_x_months:
one: "大约一个月"
other: "大约 %{count} 个月"
x_months:
one: "一个月"
other: "%{count} 个月"
about_x_years:
one: "大约一年"
other: "大约 %{count} 年"
over_x_years:
one: "一年多"
other: "%{count} 年多"
almost_x_years:
one: "接近一年"
other: "接近 %{count} 年"
prompts:
year: "年"
month: "月"
day: "日"
hour: "时"
minute: "分"
second: "秒"
number:
format:
separator: "."
delimiter: ","
precision: 3
significant: false
strip_insignificant_zeros: false
currency:
format:
format: "%u %n"
unit: "CN¥"
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
percentage:
format:
delimiter: ""
precision:
format:
delimiter: ""
human:
format:
delimiter: ""
precision: 1
significant: false
strip_insignificant_zeros: false
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
decimal_units:
format: "%n %u"
units:
# 10^-21 zepto, 10^-24 yocto
atto: "渺" # 10^-18
femto: "飞" # 10^-15 毫微微
pico: "漠" # 10^-12 微微
nano: "奈" # 10^-9 毫微
micro: "微" # 10^-6
mili: "毫" # 10^-3 milli
centi: "厘" # 10^-2
deci: "分" # 10^-1
unit: ""
ten:
one: "十"
other: "十" # 10^1
hundred: "百" # 10^2
thousand: "千" # 10^3 kilo
million: "百万" # 10^6 mega
billion: "十亿" # 10^9 giga
trillion: "兆" # 10^12 tera
quadrillion: "千兆" # 10^15 peta
# 10^18 exa, 10^21 zetta, 10^24 yotta
support:
array:
words_connector: ", "
two_words_connector: " 和 "
last_word_connector: ", 和 "
select:
prompt: "请选择"
activerecord:
models:
user: 用户
attributes:
pm:
to_user: "收件人"
content: "正文"
errors:
template: # ~ 2.3.5 backward compatible
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
full_messages:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
taken: "已经被使用"
record_invalid: "校验失败: %{errors}"
activemodel:
errors:
template:
header:
one: "有 1 个错误发生导致「%{model}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{model}」无法被保存。"
body: "如下字段出现错误:"
errors:
format: "%{attribute} %{message}"
messages:
inclusion: "不包含于列表中"
exclusion: "是保留关键字"
invalid: "是无效的"
confirmation: "与确认值不匹配"
accepted: "必须是可被接受的"
empty: "不能留空"
blank: "不能为空字符"
too_long: "过长(最长为 %{count} 个字符)"
too_short: "过短(最短为 %{count} 个字符)"
wrong_length: "长度非法(必须为 %{count} 个字符)"
not_a_number: "不是数字"
not_an_integer: "必须是整数"
greater_than: "必须大于 %{count}"
greater_than_or_equal_to: "必须大于或等于 %{count}"
equal_to: "必须等于 %{count}"
less_than: "必须小于 %{count}"
less_than_or_equal_to: "必须小于或等于 %{count}"
odd: "必须为单数"
even: "必须为双数"
helpers:
select:
prompt: "请选择"
submit:
create: "新增"
update: "修改"
submit: "储存"
\ No newline at end of file
# Sample localization file for English. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en: en:
hello: "Hello world" date:
\ No newline at end of file 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: Submit
submit: Submit
update: Submit
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
attributes:
duel:
id: ""
points: "DP"
total_points: "Total DP"
wins: Win
losses: Lose
index: Duel List
detail: "Detail"
show: "Show"
total: "Total"
record: "Record"
opponent: "Opponent"
result: "Result"
winner: "Winner"
loser: "Loser"
card:
index: "Top Cards"
show: "Show"
detail: "Detail"
top_monsters: "Top monsters"
top_extras: "Top extras"
top_spells: "Top spells"
top_traps: "Top traps"
user:
id: "ID"
name: "Duelist"
email: "E-mail"
created_at: "Registerd at"
top_monsters: "Ace monsters"
top_extras: "Ace extras"
top_spells: "Ace spells"
top_traps: "Ace traps"
index: "TOP10"
login: "Login"
register: "Register"
logout: "Logout"
password: "Password"
password_repeat: "Password Comfirm"
credits: "points"
nickname: "nickname"
show: "Show"
ranking: "Ranking"
detail: "Detail"
ratio: "Ratio"
mycard:
battlenet: "YGO Battle Net"
more:
"More..."
\ No newline at end of file
This diff is collapsed.
...@@ -4,7 +4,7 @@ MycardServerHttp::Application.routes.draw do ...@@ -4,7 +4,7 @@ MycardServerHttp::Application.routes.draw do
get "mycard/update" get "mycard/update"
get "mycard/download" get "mycard/download"
root :to => "boards#index" root :to => "mycard#index"
resources :duels do resources :duels do
get 'user1_deck.:format' => "duels#user1_deck" get 'user1_deck.:format' => "duels#user1_deck"
......
<meta charset="utf-8" />
mycard ygocore 服务器测试主页 <br />
<br />
<a href="register">用户注册</a> <br /><br />
<a href="login">用户登陆</a> <br />
<a href="rooms">在线大厅</a> <br />
<a href="mycard/download">mycard下载</a>
<br /><br /><br />
以功能开发中,可能会出现程序出错、界面乱糟糟等情况 请自备氪金狗眼<br />
<a href="users">用户排行</a> <br />
<a href="users/94">用户个人信息统计</a> <br />
<a href="cards">卡片排行</a> <br />
<a href="cards/2067">卡片信息</a> <br />
<a href="duels/1922">决斗详情</a> <br />
<a href="boards">论坛</a> <br />
<a href="api">API</a> <br />
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment