[IMP] minor changes
bzr revid: pga@tinyerp.com-20140320120758-ojgqpqb8sakdhkbb
This commit is contained in:
parent
e45d9bc7b0
commit
ac8babe0e5
|
@ -206,7 +206,7 @@ class Website(openerp.addons.web.controllers.main.Home):
|
|||
views_ids = [view.get('id') for view in views if view.get('active')]
|
||||
domain = [('type', '=', 'view'), ('res_id', 'in', views_ids), ('lang', '=', lang)]
|
||||
irt = request.registry.get('ir.translation')
|
||||
return irt.search_read(request.cr, request.uid, domain, ['id', 'res_id', 'value','state'], context=request.context)
|
||||
return irt.search_read(request.cr, request.uid, domain, ['id', 'res_id', 'value','state','gengo_translation'], context=request.context)
|
||||
|
||||
@http.route('/website/set_translations', type='json', auth='public', website=True)
|
||||
def set_translations(self, data, lang):
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
});
|
||||
if (trans.length) {
|
||||
node.setAttribute('data-oe-translation-id', trans[0].id);
|
||||
if(trans[0].state && (trans[0].state == 'inprogress' || trans[0].state == 'to_translate')){
|
||||
if(trans[0].gengo_translation && (trans[0].state == 'inprogress' || trans[0].state == 'to_translate')){
|
||||
if(this.gengo_translate){
|
||||
node.className += ' oe_translatable_inprogress';
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
this.done = res.done;
|
||||
this.new_words = 0;
|
||||
$('.oe_translatable_todo').each(function () {
|
||||
self.new_words += $(this).text().split(" ").length;
|
||||
self.new_words += $(this).text().trim().replace(/ +/g," ").split(" ").length;
|
||||
});
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue