From c9acbf458ff90d37be76fa32aeb1a2591d87144f Mon Sep 17 00:00:00 2001 From: davidpkj Date: Sun, 5 Mar 2023 15:31:03 +0100 Subject: Added translations --- lib/views/recipe_view.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/views/recipe_view.dart') diff --git a/lib/views/recipe_view.dart b/lib/views/recipe_view.dart index c22ea2b..3aaa160 100644 --- a/lib/views/recipe_view.dart +++ b/lib/views/recipe_view.dart @@ -292,8 +292,7 @@ class RecipeViewState extends State { final _ingredients = _unsavedRecipe.description!.split("\n")..retainWhere((element) => element.startsWith("- ")); if (_ingredients.isEmpty) { - // TODO: translation - widget.showToastCallback!("No ingredients found", "", () {}); + widget.showToastCallback!(AppLocalizations.of(context)!.ingredientsError, "", () {}); return; } @@ -308,8 +307,7 @@ class RecipeViewState extends State { ShoplistData.save(); if (widget.showToastCallback != null) { - // TODO: translation - widget.showToastCallback!("Added to Shoplist", "", () {}); + widget.showToastCallback!(AppLocalizations.of(context)!.ingredientsAdded, "", () {}); } } -- cgit v1.2.3