diff --git a/lib/Helper/Filter/JSON/FixRecipeYieldFilter.php b/lib/Helper/Filter/JSON/FixRecipeYieldFilter.php index 0f6afc77..d99f2091 100644 --- a/lib/Helper/Filter/JSON/FixRecipeYieldFilter.php +++ b/lib/Helper/Filter/JSON/FixRecipeYieldFilter.php @@ -65,7 +65,7 @@ class FixRecipeYieldFilter extends AbstractJSONFilter { // Heuristics: Array with multiple entries. // XXX How to parse an array correctly? - $this->logger->debug($this->l->t('Using heuristics to parse the recipeYield field of recipe {name}.', ['name' => $json['name']])); + $this->logger->debug($this->l->t('Using heuristics to parse the `recipeYield` field representing the number of servings of recipe {name}.', ['name' => $json['name']])); $json[self::YIELD] = join(' ', $json[self::YIELD]); } @@ -77,14 +77,18 @@ class FixRecipeYieldFilter extends AbstractJSONFilter { sort($matches); $last = end($matches); - $this->logger->debug($this->l->t('Using the highest number found in recipeYield string. Totally found: {num}', ['num' => $count])); + $this->logger->debug($this->l->n( + 'Only a single number was found in the `recipeYield` field. Using it as number of servings.', + 'There are %n numbers found in the `recipeYield` field. Using the highest number found as number of servings.', + $count + )); $json[self::YIELD] = (int) $last; return true; } // We did not find anything useful. - $this->logger->info($this->l->t('Could not parse recipeYield field. Falling back to 1.')); + $this->logger->info($this->l->t('Could not parse `recipeYield` field. Falling back to 1 serving.')); $json[self::YIELD] = 1; return true; } diff --git a/src/components/RecipeEdit.vue b/src/components/RecipeEdit.vue index 91ff2443..13caf3c3 100644 --- a/src/components/RecipeEdit.vue +++ b/src/components/RecipeEdit.vue @@ -64,7 +64,8 @@