mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
Allow untranslated plugins to set modal body titles
This commit is contained in:
parent
576a424130
commit
4f44713e8e
@ -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);
|
||||
},
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user