alexkyllo / bots

Automatically exported from code.google.com/p/bots
2 stars 0 forks source link

Improve: if 'alt' transaltion not found, use default translation #227

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Use case:
'alt' is extracted from value in message.
if alt=='valueX': 
    do alt translation
else:
    do default translation

In bots 2.0.2 it worked that way.
This was removed because of the risk of 'infinite loop' in translation
in case of misconfiguration.
To avoid these infinite loops bots now checks for this: if same alt-value
is return > 10 times an error is generated.
Sometime you explicitly want lot of loops in translation, eg when
splitting up a message to message-per-line.
In this (exceptional) case use:
   return {'type': 'no_check_on_infinite_loop','alt':'altvalue'}

Original issue reported on code.google.com by hjebb...@gmail.com on 2 May 2013 at 4:46

GoogleCodeExporter commented 9 years ago

Original comment by hjebb...@gmail.com on 6 Sep 2013 at 4:54

GoogleCodeExporter commented 9 years ago

Original comment by hjebb...@gmail.com on 10 Sep 2013 at 12:46