[FIX] website_forum: description not translated
Make the field description on a forum translatable and add it in the forum view. opw 619786
This commit is contained in:
parent
8351c6c5ed
commit
fc9ce0bcff
|
@ -1272,6 +1272,9 @@ openerp.TranslationDataBase = openerp.Class.extend(/** @lends instance.Translati
|
||||||
add_module_translation: function(mod) {
|
add_module_translation: function(mod) {
|
||||||
var self = this;
|
var self = this;
|
||||||
_.each(mod.messages, function(message) {
|
_.each(mod.messages, function(message) {
|
||||||
|
if (message.id === 'Create a product') {
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
self.db[message.id] = message.string;
|
self.db[message.id] = message.string;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1285,6 +1288,9 @@ openerp.TranslationDataBase = openerp.Class.extend(/** @lends instance.Translati
|
||||||
return fcnt;
|
return fcnt;
|
||||||
},
|
},
|
||||||
get: function(key) {
|
get: function(key) {
|
||||||
|
if (key === 'Create a product') {
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
return this.db[key];
|
return this.db[key];
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Forum(osv.Model):
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Name', required=True, translate=True),
|
'name': fields.char('Name', required=True, translate=True),
|
||||||
'faq': fields.html('Guidelines'),
|
'faq': fields.html('Guidelines'),
|
||||||
'description': fields.html('Description'),
|
'description': fields.html('Description', translate=True),
|
||||||
# karma generation
|
# karma generation
|
||||||
'karma_gen_question_new': fields.integer('Asking a question'),
|
'karma_gen_question_new': fields.integer('Asking a question'),
|
||||||
'karma_gen_question_upvote': fields.integer('Question upvoted'),
|
'karma_gen_question_upvote': fields.integer('Question upvoted'),
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<sheet>
|
<sheet>
|
||||||
<group>
|
<group>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
<field name="description"/>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string='Karma Gains'>
|
<page string='Karma Gains'>
|
||||||
|
|
Loading…
Reference in New Issue