fix translations in before_labels
test plan: * the "Approved Integrations" header on the user profile edit page should be translated correctly (among others) closes #CNVS-22567 Change-Id: Ib40b8e16f7506a85a808077a49fc7e1b3dd1a6da Reviewed-on: https://gerrit.instructure.com/61652 Tested-by: Jenkins Reviewed-by: Jon Willesen <jonw@instructure.com> QA-Review: Charles Kimball <ckimball@instructure.com> Product-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
bb9e9027a3
commit
24aa5cacff
|
@ -40,7 +40,7 @@ module I18nUtilities
|
|||
def before_label(text_or_key, default_value = nil, *args)
|
||||
if default_value
|
||||
text_or_key = "labels.#{text_or_key}" unless text_or_key.to_s =~ /\A#/
|
||||
text_or_key = I18n.t(text_or_key, default_value, *args)
|
||||
text_or_key = respond_to?(:t) ? t(text_or_key, default_value, *args) : I18n.t(text_or_key, default_value, *args)
|
||||
end
|
||||
I18n.t("#before_label_wrapper", "%{text}:", :text => text_or_key)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue