Open teolemon opened 3 years ago
My suggestion would be to:
enum
with all the possible message cases (ProductImprovement
?)Product
that returns a List<ProductImprovement>
Same method for #193 of course.
@teolemon Does that make sense?
That looks like a rather good plan. I would also try to mutualize translations, or possibly move them to something on the server (a file the plugin could query ?)
@teolemon Are you sure about the 'en:labels-to-be-completed'
string?
In the unit tests I could not find a product with something similar. I found something like that for product.statesTags
:
There's no label to be completed state because some products don't have labels.
@stephanegigandet I've just removed ProductImprovement.LABELS_TO_BE_COMPLETED
from #217.
Product improvements are now computed in product.getProductImprovements()
(#217).
Beyond the enum
values, I don't know how the translations are supposed to be integrated, and how.
What
I specced a system to help 3rd party apps ask for relevant Eco-Score data. How about creating the logic within openfoodfacts-dart so that it can be reused easily ?
Eco-Score for 3rd party apps
A similar system for Eco-Score, and another one for Ingredient related analysis (NOVA, allergens, gluten…) would unlock more reuses, and more data for Open Food Facts
Will unlock