Skip to content

Commit

Permalink
taxonomy: more eurocodes for onion-family / tubers / root vegetables (#…
Browse files Browse the repository at this point in the history
…8893)

* taxonomy: more eurocodes for onion-family / tubers / root vegetables

* enable ingredients processing parsing for ar,bg,da,el,fi,nb,sv

* update tests
  • Loading branch information
stephanegigandet authored Aug 28, 2023
1 parent 53ce7dd commit e0bcd63
Show file tree
Hide file tree
Showing 16 changed files with 3,803 additions and 3,467 deletions.
18 changes: 15 additions & 3 deletions lib/ProductOpener/Ingredients.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1826,8 +1826,11 @@ sub parse_ingredients_text ($product_ref) {
(
#($product_lc =~ /^(en|es|it|fr)$/)
(
($product_lc eq 'bs')
($product_lc eq 'ar')
or ($product_lc eq 'bg')
or ($product_lc eq 'bs')
or ($product_lc eq 'cs')
or ($product_lc eq 'el')
or ($product_lc eq 'en')
or ($product_lc eq 'es')
or ($product_lc eq 'fr')
Expand All @@ -1854,8 +1857,17 @@ sub parse_ingredients_text ($product_ref) {

# match after the ingredient, does not require a space
# match before the ingredient, require a space
or ( ($product_lc eq 'fi')
and ($new_ingredient =~ /(^($regexp)\b|($regexp)$)/i))
or (
(
($product_lc eq 'da')
or ($product_lc eq 'fi')
or ($product_lc eq 'nb')
or ($product_lc eq 'no')
or ($product_lc eq 'nn')
or ($product_lc eq 'sv')
)
and ($new_ingredient =~ /(^($regexp)\b|($regexp)$)/i)
)
)
{
$new_ingredient = $` . $';
Expand Down
Loading

0 comments on commit e0bcd63

Please sign in to comment.