Reduce locales for test env.
This commit is contained in:
parent
84502312e4
commit
9e38203af1
1 changed files with 5 additions and 1 deletions
|
@ -15,7 +15,11 @@ load translations from online
|
|||
=end
|
||||
|
||||
def self.load
|
||||
Locale.where(active: true).each {|locale|
|
||||
locales = Locale.where(active: true)
|
||||
if Rails.env.test?
|
||||
locales = Locale.where(active: true, name: ['en-us', 'de-de'])
|
||||
end
|
||||
locales.each {|locale|
|
||||
url = "https://i18n.zammad.com/api/v1/translations/#{locale.locale}"
|
||||
if !UserInfo.current_user_id
|
||||
UserInfo.current_user_id = 1
|
||||
|
|
Loading…
Reference in a new issue