Skip to content

Commit

Permalink
feat(app): adapt wording on gene page (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Feb 28, 2024
1 parent 9326faf commit 15690ce
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
2 changes: 2 additions & 0 deletions app/lib/common/models/userdata/genotype_result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class GenotypeResult implements Genotype {

String get geneDisplayString => key.value;

String get variantDisplayString => key.allele;

String _removeAllele(String textWithAllele) =>
textWithAllele.removePrefix(key.allele).trim().capitalize();

Expand Down
1 change: 1 addition & 0 deletions app/lib/drug/widgets/sub_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SubHeader extends StatelessWidget {
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
title.toUpperCase(),
Expand Down
16 changes: 12 additions & 4 deletions app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
}
}
},
"gene_page_name_tooltip": "{gene} is the name of a segment of your DNA.",
"gene_page_name_tooltip": "{gene} is the name of a gene.",
"@gene_page_name_tooltip": {
"placeholders": {
"gene": {
Expand All @@ -261,11 +261,19 @@
}
},
"gene_page_genotype": "Genotype",
"gene_page_genotype_tooltip": "The genotype is the variant you carry for this DNA segment.",
"gene_page_genotype_tooltip": "The genotype is the variant you carry for this gene.",
"gene_page_phenotype": "Phenotype",
"gene_page_phenotype_tooltip": "The phenotype is the observable impact that your genotype has for this protein. It often describes the gene's activity level or whether a specific variant is present.",
"gene_page_phenotype_tooltip": "The phenotype often describes the gene's activity level or whether a specific variant is present.",
"gene_page_relevant_drugs": "Relevant drugs",
"gene_page_relevant_drugs_tooltip": "The drugs listed here are influenced by your phenotype for this DNA segment.",
"gene_page_relevant_drugs_tooltip": "The drugs listed here are influenced by your {geneDisplayString} result.",
"@gene_page_relevant_drugs_tooltip": {
"placeholders": {
"geneDisplayString": {
"type": "String",
"example": "HLA-B *58:01"
}
}
},
"gene_page_no_relevant_drugs": "This gene has no known effect on any drug.",
"gene_page_inhibitor_drugs": "Your results for this gene can be influenced if you are currently taking any of the following drugs:",
"gene_page_further_inhibitor_drugs": "Your results for this gene can also be influenced by taking any of the following drugs:",
Expand Down
12 changes: 8 additions & 4 deletions app/lib/report/pages/gene.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class GenePage extends HookWidget {
),
tooltip: context.l10n
.gene_page_name_tooltip(
genotypeResult.geneDisplayString,
genotypeResult.gene,
),
),
SizedBox(height: PharMeTheme.smallToMediumSpace),
Expand All @@ -55,7 +55,7 @@ class GenePage extends HookWidget {
children: [
_buildRow(
context.l10n.gene_page_genotype,
genotypeResult.genotypeDisplayString,
genotypeResult.variantDisplayString,
tooltip: context.l10n.gene_page_genotype_tooltip
),
_buildPhenotypeRow(context),
Expand All @@ -69,8 +69,12 @@ class GenePage extends HookWidget {
],
)),
SizedBox(height: PharMeTheme.smallToMediumSpace),
SubHeader(context.l10n.gene_page_relevant_drugs,
tooltip: context.l10n.gene_page_relevant_drugs_tooltip),
SubHeader(
context.l10n.gene_page_relevant_drugs,
tooltip: context.l10n.gene_page_relevant_drugs_tooltip(
genotypeResult.geneDisplayString
),
),
SizedBox(height: PharMeTheme.smallSpace),
...buildDrugList(context, state, activeDrugs,
noDrugsMessage: context.l10n.gene_page_no_relevant_drugs)
Expand Down

0 comments on commit 15690ce

Please sign in to comment.