openfoodfacts-dart icon indicating copy to clipboard operation
openfoodfacts-dart copied to clipboard

Possible language code bug, to test

Open M123-dev opened this issue 2 years ago • 1 comments

Describe the bug

Just had a look at https://github.com/openfoodfacts/openfoodfacts-dart/blob/d85164c756477b2be42e2f0470939cf3fdf7dfdd/lib/model/Allergens.dart

In line 17

We remove en: from the Allergens, we have to test if this could lead to unwanted results for 3 letter language codes, as we just remove the first 3 letters, which then would be 4 together with the ":"

M123-dev avatar Jun 29 '22 13:06 M123-dev

Eventhough it looks like that there are no 3 letter codes in ISO 639-1

https://github.com/openfoodfacts/openfoodfacts-dart/blob/dc77db313af4fa93e21aa4edc7ed7181a4e15e3b/lib/utils/LanguageHelper.dart#L567

M123-dev avatar Jun 29 '22 13:06 M123-dev