Allow untranslated plugins to set modal body titles

This commit is contained in:
Robin Ward 2016-12-01 15:37:24 -05:00
parent 576a424130
commit 4f44713e8e
3 changed files with 4 additions and 2 deletions

View File

@ -135,7 +135,7 @@ export function buildResolver(baseName) {
},
findPluginTemplate(parsedName) {
var pluginParsedName = this.parseName(parsedName.fullName.replace("template:", "template:javascripts/"));
const pluginParsedName = this.parseName(parsedName.fullName.replace("template:", "template:javascripts/"));
return this.findTemplate(pluginParsedName);
},

View File

@ -28,7 +28,7 @@ export default Ember.Component.extend({
}
}
this.appEvents.trigger('modal:body-shown', this.getProperties('title'));
this.appEvents.trigger('modal:body-shown', this.getProperties('title', 'rawTitle'));
},
_flash(msg) {

View File

@ -19,6 +19,8 @@ export default Ember.Component.extend({
this.appEvents.on('modal:body-shown', data => {
if (data.title) {
this.set('title', I18n.t(data.title));
} else if (data.rawTitle) {
this.set('title', data.rawTitle);
}
});
},