Bug with 'sr-Yu.json not found' #1037

This commit is contained in:
Karel Pičman 2019-09-16 13:54:32 +02:00
parent 46ffb9a76b
commit 580dc88c84

View File

@ -80,16 +80,22 @@ module DmsfHelper
locale = I18n.locale || 'en'
ret = File.join('jquery.dataTables', 'locales', "#{locale}.json")
path = File.join('public', plugin_asset_path(:redmine_dmsf, 'javascripts', ret))
return ret if File.exist?(path)
Rails.logger.warn "#{path} not found"
unless File.exist?(path)
Rails.logger.warn "#{path} not found"
ret = File.join('jquery.dataTables', 'locales', 'en.json')
end
ret
end
def js_url
locale = I18n.locale || 'en'
ret = File.join('plupload', 'js', 'i18n', "#{locale}.js")
path = File.join('public', plugin_asset_path(:redmine_dmsf, 'javascripts', ret))
return ret if File.exist?(path)
Rails.logger.warn "#{path} not found"
unless File.exist?(path)
Rails.logger.warn "#{path} not found"
ret = File.join('plupload', 'js', 'i18n', 'en.js')
end
ret
end
def self.visible_folders(folders, project)