miraculixx / pyrules

Python Rules Engine
MIT License
22 stars 9 forks source link

Re enable TableRule.translations support #20

Open antisvin opened 9 years ago

antisvin commented 9 years ago

This doesn't work nicely with #15, since we have a more complex condtions definition and don't run them through eval. We'll end up with something like this:

            {'if': {'conditions': ['am Sonntag', {'das Wetter ist': 'schoen'}]},

I think that we should only support translation for initial strings for NatuarlLanguageRule in #10 , since they are human-readable strings.

miraculixx commented 9 years ago

agree to remove for now, doens't make sense with safe "eval"/"action" however let's open a new issue:

I think that we should only support translation for initial strings for NatuarlLanguageRule in #10 , since they are human-readable strings.

Translations shall be possible upon reading the yml for TableRules, logically in the same manner as it was before (though at parse, not at eval time - in the eval case parse/eval was kind of in the same place). From my perspective, this should be refactored such that it can be used for both TableRule and NaturualLanguageRule.