logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 778b37790b425debd16b73c21f0805ff2e9a4ce8
parent: b66ec3bf95fdb0c38d8472a4bd643ed81bc46100
Author: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Date:   Sun,  4 Mar 2018 18:00:46 +0900

Do not fetch environment variables to determine default locale (#6618)

The default locale is now set by config.

Diffstat:

Mapp/serializers/rest/instance_serializer.rb2+-
Mlib/tasks/assets.rake6++----
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb @@ -48,7 +48,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer end def languages - [ENV.fetch('DEFAULT_LOCALE', I18n.default_locale)] + [I18n.default_locale] end private diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake @@ -1,10 +1,8 @@ # frozen_string_literal: true def render_static_page(action, dest:, **opts) - I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do - html = ApplicationController.render(action, opts) - File.write(dest, html) - end + html = ApplicationController.render(action, opts) + File.write(dest, html) end namespace :assets do