[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:
Martin Trigaux 2015-01-15 15:37:16 +01:00
parent 8351c6c5ed
commit fc9ce0bcff
3 changed files with 8 additions and 1 deletions

View File

@ -1272,6 +1272,9 @@ openerp.TranslationDataBase = openerp.Class.extend(/** @lends instance.Translati
add_module_translation: function(mod) {
var self = this;
_.each(mod.messages, function(message) {
if (message.id === 'Create a product') {
debugger;
}
self.db[message.id] = message.string;
});
},
@ -1285,6 +1288,9 @@ openerp.TranslationDataBase = openerp.Class.extend(/** @lends instance.Translati
return fcnt;
},
get: function(key) {
if (key === 'Create a product') {
debugger;
}
return this.db[key];
},
/**

View File

@ -37,7 +37,7 @@ class Forum(osv.Model):
_columns = {
'name': fields.char('Name', required=True, translate=True),
'faq': fields.html('Guidelines'),
'description': fields.html('Description'),
'description': fields.html('Description', translate=True),
# karma generation
'karma_gen_question_new': fields.integer('Asking a question'),
'karma_gen_question_upvote': fields.integer('Question upvoted'),

View File

@ -24,6 +24,7 @@
<sheet>
<group>
<field name="name"/>
<field name="description"/>
</group>
<notebook>
<page string='Karma Gains'>