fix for chinese simplified and also new user added

This commit is contained in:
Harry Bomrah 2014-10-21 15:27:43 +08:00
parent 051b165298
commit 384cc4d6f4
3 changed files with 18 additions and 2 deletions

View File

@ -21,7 +21,7 @@ class Site
field :desktop_closed, :type => Boolean, :default => false
field :enable_language_detection, :type => Boolean, :default => false
field :enable_zh_cn, :type => Boolean, :default => true
field :default_locale, :default => "en"
field :default_locale, :default => "zh_tw"
field :mobile_on, :type => Boolean, :default => false
field :announcement_category, :type => Array, :default=>[]
field :mobile_bar_color, :type => Array, :default=>[]

View File

@ -106,7 +106,7 @@
</li>
<% end %>
<li>
<% if @site_in_use_locales.count > 1 %>
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
<span id="language"><%= t((locale==:zh_tw ? :zh_tw_ : locale.to_s)) %></span>
<ul>

View File

@ -246,4 +246,20 @@ if User.count==0
user.email = "orbit@rulingcom.com"
user.approved = true
user.save
profile = MemberProfile.new
profile.first_name_translations = {:en=>'Admin', :zh_tw=>'Admin'}
profile.last_name_translations = {:en=>'Admin', :zh_tw=>'Admin'}
profile.email = "service@rulingcom.com"
profile.save
user = User.new
user.workgroup = group
user.member_profile = profile
user.user_name = "admin"
user.password = "Ab-5508881"
user.email = "servicet@rulingcom.com"
user.approved = true
user.save
end