|
|
Patch Set 1 #
Total comments: 1
MessagesTotal messages: 9
http://codereview.appspot.com/124084/diff/1/2 File trytond/ir/translation.py (right): http://codereview.appspot.com/124084/diff/1/2#newcode1038 Line 1038: 'AND lang = %s', (False, '', data['form']['lang'],)) It makes other things than the initial query. You can not replace it like that.
Sign in to reply to this message.
On 2009/10/01 13:33:03, ced wrote: > http://codereview.appspot.com/124084/diff/1/2 > File trytond/ir/translation.py (right): > > http://codereview.appspot.com/124084/diff/1/2#newcode1038 > Line 1038: 'AND lang = %s', (False, '', data['form']['lang'],)) > It makes other things than the initial query. > You can not replace it like that. It *should* do other things than the inital query: Since it doesn't make any sense to have value <> '' and fuzzy = True for empty src, this query just does this. The original query just cleaned up fuzzy values of empty *value* (which btw. could be wrong in special cases). I admit, that it would be the cleaner way to not handle empty src throughout all those processes, but it seems rather complicated (at least my other attempts so far to get it work had always side effects). Since the former existing query is already fixing a result, that shouldn't have been produced by a clean update process I don't see the point to not change this query to have the result fixed in the correct way. At least this fix is working perfectly for me and translation clean and update process is finally working with the expected results.
Sign in to reply to this message.
On 2009/10/01 15:58:43, yangoon wrote: > On 2009/10/01 13:33:03, ced wrote: > > http://codereview.appspot.com/124084/diff/1/2 > > File trytond/ir/translation.py (right): > > > > http://codereview.appspot.com/124084/diff/1/2#newcode1038 > > Line 1038: 'AND lang = %s', (False, '', data['form']['lang'],)) > > It makes other things than the initial query. > > You can not replace it like that. > It *should* do other things than the inital query: > Since it doesn't make any sense to have value <> '' and fuzzy = True for empty > src, this query just does this. The original query just cleaned up fuzzy values > of empty *value* (which btw. could be wrong in special cases). Did anyone know from where the empty values come from? Is there a way to avoid empty values at time of creation, if possible?
Sign in to reply to this message.
On 2009/10/02 07:32:15, udo.spallek wrote: > On 2009/10/01 15:58:43, yangoon wrote: > > On 2009/10/01 13:33:03, ced wrote: > > > http://codereview.appspot.com/124084/diff/1/2 > > > File trytond/ir/translation.py (right): > > > > > > http://codereview.appspot.com/124084/diff/1/2#newcode1038 > > > Line 1038: 'AND lang = %s', (False, '', data['form']['lang'],)) > > > It makes other things than the initial query. > > > You can not replace it like that. > > It *should* do other things than the inital query: > > Since it doesn't make any sense to have value <> '' and fuzzy = True for empty > > src, this query just does this. The original query just cleaned up fuzzy > values > > of empty *value* (which btw. could be wrong in special cases). > > Did anyone know from where the empty values come from? > Is there a way to avoid empty values at time of creation, if possible? Provenience is rather different, often the empty value of selection or status fields. I wouldn't exclude empty src fields from translation, because the slight possibility exists, that in some language empty src could have values. "" "" "False" "account.tax.code.template,name" "Deutsch" "Modell" "1" "account_de_skr03" "" "" "False" "ir.lang,name" "Deutsch" "Modell" "1" "ir" "" "" "False" "stock.move,sale_exception_state" "Deutsch" "Auswahl" "0" "sale" "" "" "False" "ir.lang,name" "Deutsch" "Modell" "2" "ir" "" "" "False" "calendar.attendee,status" "Deutsch" "Auswahl" "0" "calendar" "" "" "False" "workflow.transition,instances" "Deutsch" "Feld" "0" "workflow" "" "" "False" "calendar.event,status" "Deutsch" "Auswahl" "0" "calendar" "" "" "False" "party.party,vat_country" "Deutsch" "Auswahl" "0" "party" "" "" "False" "stock.move,sale_line" "Deutsch" "Feld" "0" "sale" "" "" "False" "ir.lang,name" "Deutsch" "Modell" "5" "ir" "" "" "False" "account.invoice,purchase_exception_state" "Deutsch" "Auswahl" "0" "purchase" "" "" "False" "calendar.todo,status" "Deutsch" "Auswahl" "0" "calendar_todo" "" "" "False" "stock.move,purchase_exception_state" "Deutsch" "Auswahl" "0" "purchase" "" "" "False" "ir.ui.view,type" "Deutsch" "Auswahl" "0" "ir" "" "" "False" "purchase.request.create_purchase.ask_party" "Deutsch" "Sicht" "0" "stock_supply" "" "" "False" "ir.lang,name" "Deutsch" "Modell" "6" "ir" "" "" "False" "stock.move,purchase_line" "Deutsch" "Feld" "0" "purchase" "" "" "False" "workflow.instance,transitions" "Deutsch" "Feld" "0" "workflow" "" "" "False" "account.invoice,sale_exception_state" "Deutsch" "Auswahl" "0" "sale" "" "" "False" "ir.lang,name" "Deutsch" "Modell" "4" "ir" "" "" "False" "party.party,full_name" "Deutsch" "Feld" "0" "party" "" "" "False" "party.address,full_address" "Deutsch" "Feld" "0" "party"
Sign in to reply to this message.
Any news about this one, ced? I am running this code since 3 months now and I am having exactly the wished and stable behaviour.
Sign in to reply to this message.
On 2010/01/05 18:38:03, yangoon wrote: > Any news about this one, ced? > > I am running this code since 3 months now and I am having exactly the wished and > stable behaviour. It doesn't fix the problem. We must find why you have empty src record and prevent this happen and not hide them.
Sign in to reply to this message.
|