diff options
author | davidpkj <davidpenkow1@gmail.com> | 2023-03-05 15:31:03 +0100 |
---|---|---|
committer | davidpkj <davidpenkow1@gmail.com> | 2023-03-05 15:31:03 +0100 |
commit | c9acbf458ff90d37be76fa32aeb1a2591d87144f (patch) | |
tree | 90b1f43974320c4796f8c3760a5c6f0990ca38dc /lib/views/recipe_view.dart | |
parent | 16e11a2ff518a6c5ce362d38dc137cb54d5c0425 (diff) |
Added translations
Diffstat (limited to 'lib/views/recipe_view.dart')
-rw-r--r-- | lib/views/recipe_view.dart | 6 |
1 files changed, 2 insertions, 4 deletions
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<RecipeView> { 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<RecipeView> { ShoplistData.save(); if (widget.showToastCallback != null) { - // TODO: translation - widget.showToastCallback!("Added to Shoplist", "", () {}); + widget.showToastCallback!(AppLocalizations.of(context)!.ingredientsAdded, "", () {}); } } |