Browse Source

fix bugs

pull/4/head
欧醚 4 years ago
parent
commit
38632675b1
3 changed files with 5 additions and 5 deletions
  1. +3
    -4
      app/controllers/concerns/localized.rb
  2. +1
    -0
      app/javascript/styles/closed-social/timeline_comments.scss
  3. +1
    -1
      config/application.rb

+ 3
- 4
app/controllers/concerns/localized.rb View File

@ -8,10 +8,9 @@ module Localized
end
def set_locale
locale ='zh-CN'
#locale = current_user.locale if respond_to?(:user_signed_in?) && user_signed_in?
#locale ||= session[:locale] ||= default_locale
#locale = default_locale unless I18n.available_locales.include?(locale.to_sym)
locale = current_user.locale if respond_to?(:user_signed_in?) && user_signed_in?
locale ||= session[:locale] ||= default_locale
locale = default_locale unless I18n.available_locales.include?(locale.to_sym)
I18n.with_locale(locale) do
yield

+ 1
- 0
app/javascript/styles/closed-social/timeline_comments.scss View File

@ -1,6 +1,7 @@
.comments-timeline {
max-height: 160px;
min-width: 60%;
max-width: 100%;
overflow: hidden;
-webkit-mask-image: linear-gradient(#1a1a1a,transparent);
mask-image: linear-gradient(#1a1a1a,transparent);

+ 1
- 1
config/application.rb View File

@ -119,7 +119,7 @@ module Mastodon
config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym
unless config.i18n.available_locales.include?(config.i18n.default_locale)
config.i18n.default_locale = :en
config.i18n.default_locale = :'zh-CN'
end
# config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')

Loading…
Cancel
Save