diff --git a/app/lib/common/constants.dart b/app/lib/common/constants.dart index 5d9d1ab9..df123001 100644 --- a/app/lib/common/constants.dart +++ b/app/lib/common/constants.dart @@ -22,4 +22,7 @@ final cpicMaxCacheTime = Duration(days: 90); const maxCachedDrugs = 10; const cpicLookupUrl = 'https://api.cpicpgx.org/v1/diplotype?select=genesymbol,diplotype,generesult,lookupkey'; -const indeterminateIcon = Icons.help_outline_rounded; \ No newline at end of file +const indeterminateIcon = Icons.help_outline_rounded; + +const drugInteractionIndicator = '*'; +const drugInteractionIndicatorName = 'asterisk'; diff --git a/app/lib/common/widgets/drug_list/drug_items/utils.dart b/app/lib/common/widgets/drug_list/drug_items/utils.dart index 67a4e843..c4e1bd10 100644 --- a/app/lib/common/widgets/drug_list/drug_items/utils.dart +++ b/app/lib/common/widgets/drug_list/drug_items/utils.dart @@ -7,7 +7,7 @@ String formatDrugName( ) { var drugName = drug.name.capitalize(); if (showDrugInteractionIndicator && isInhibitor(drug)) { - drugName = '$drugName *'; + drugName = '$drugName$drugInteractionIndicator'; } return drugName; } \ No newline at end of file diff --git a/app/lib/common/widgets/drug_search.dart b/app/lib/common/widgets/drug_search.dart index 153abe3d..323de1fc 100644 --- a/app/lib/common/widgets/drug_search.dart +++ b/app/lib/common/widgets/drug_search.dart @@ -90,7 +90,10 @@ class DrugSearch extends HookWidget { return [ SizedBox(height: PharMeTheme.smallSpace), Text( - context.l10n.search_page_asterisk_explanation + context.l10n.search_page_indicator_explanation( + drugInteractionIndicatorName, + drugInteractionIndicator + ) ), ]; } diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 3e427f79..a4ac5e59 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -31,7 +31,20 @@ "search_page_filter_yellow": "Show yellow warning level", "search_page_filter_red": "Show red warning level", "search_page_filter_gray": "Show gray warning level", - "search_page_asterisk_explanation": "Taking drugs with an asterisk (*) can influence your results for other drugs", + "search_page_indicator_explanation": "Taking drugs with an {indicatorName} ({indicator}) can influence your results for other drugs", + "@search_page_indicator_explanation": { + "description": "Explanation of drug-drug interaction indicators", + "placeholders": { + "indicatorName": { + "type": "String", + "example": "asterisk" + }, + "indicator": { + "type": "String", + "example": "*" + } + } + }, "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",