Reduce locales for test env.

This commit is contained in:
Martin Edenhofer 2015-08-15 09:48:08 +02:00
parent 84502312e4
commit 9e38203af1

View file

@ -15,7 +15,11 @@ load translations from online
=end =end
def self.load 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}" url = "https://i18n.zammad.com/api/v1/translations/#{locale.locale}"
if !UserInfo.current_user_id if !UserInfo.current_user_id
UserInfo.current_user_id = 1 UserInfo.current_user_id = 1