Skip to content

Commit

Permalink
refactor(app): add filter amendment to l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Nov 14, 2023
1 parent 42865ce commit d688e11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/lib/common/widgets/drug_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ class DrugSearch extends HookWidget {
@override
Widget build(BuildContext context) {
final searchController = useTextEditingController();
final noDrugsMessage = showFilter ?
context.l10n.search_no_drugs(' or filters right to the search bar') :
context.l10n.search_no_drugs('');
final amendment = showFilter
? context.l10n.search_no_drugs_with_filter_amendment
: '';
final noDrugsMessage = context.l10n.search_no_drugs(amendment);
return BlocProvider(
create: (context) => cubit,
child: BlocBuilder<DrugListCubit, DrugListState>(
Expand Down
1 change: 1 addition & 0 deletions app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
}
}
},
"search_no_drugs_with_filter_amendment": " or filters right to the search bar",
"search_no_drugs": "No drugs found. Try adjusting the search term{amendment}.",
"@search_no_drugs": {
"description": "Disclaimer for when no drug was found in the search",
Expand Down

0 comments on commit d688e11

Please sign in to comment.