i18n sis_batch
Change-Id: I3727005f7abd2e81f40a655514e3c3ef6be3b5ef Reviewed-on: https://gerrit.instructure.com/4309 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Brian Palmer <brianp@instructure.com>
This commit is contained in:
parent
fb80d293ed
commit
dd3d986ee2
|
@ -36,7 +36,7 @@ class SisBatch < ActiveRecord::Base
|
|||
def self.valid_import_types
|
||||
@valid_import_types ||= {
|
||||
"instructure_csv" => {
|
||||
:name => "Instructure formatted CSV or zipfile of CSVs",
|
||||
:name => lambda { t(:instructure_csv, "Instructure formatted CSV or zipfile of CSVs") },
|
||||
:callback => lambda {|batch| batch.process_instructure_csv_zip},
|
||||
:default => true
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class SisBatch < ActiveRecord::Base
|
|||
att = Attachment.new
|
||||
att.context = batch
|
||||
att.uploaded_data = attachment
|
||||
att.display_name = "sis_upload_#{batch.id}.zip"
|
||||
att.display_name = t :upload_filename, "sis_upload_%{id}.zip", :id => batch.id
|
||||
att.save
|
||||
Attachment.skip_scribd_submits(false)
|
||||
batch.attachment = att
|
||||
|
@ -81,7 +81,7 @@ class SisBatch < ActiveRecord::Base
|
|||
|
||||
import_scheme = SisBatch.valid_import_types[self.data[:import_type]]
|
||||
if import_scheme.nil?
|
||||
self.data[:error_message] = "Unrecognized import type"
|
||||
self.data[:error_message] = t 'errors.unrecorgnized_type', "Unrecognized import type"
|
||||
self.workflow_state = :failed
|
||||
self.save
|
||||
else
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<label for="import_type"><%= before_label(t(:import_type_label, "Import type")) %></label>
|
||||
<select id="import_type" name="import_type">
|
||||
<% SisBatch.valid_import_types.each do |type, data| %>
|
||||
<option value="<%= type %>"<% if data[:default] %> selected<% end %>><%= data[:name] %></option>
|
||||
<option value="<%= type %>"<% if data[:default] %> selected<% end %>><%= data[:name].respond_to?(:call) ? data[:name].call() : data[:name] %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue