From 692db3ce630a84bb94caa3495023e86ad7cb747b Mon Sep 17 00:00:00 2001 From: tamslo Date: Fri, 6 Dec 2024 12:25:54 +0100 Subject: [PATCH] feat(app): add singular to inhibitor description --- app/lib/common/widgets/gene_modulator_list.dart | 2 +- app/lib/l10n/app_en.arb | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/lib/common/widgets/gene_modulator_list.dart b/app/lib/common/widgets/gene_modulator_list.dart index 33d37072..12ae7207 100644 --- a/app/lib/common/widgets/gene_modulator_list.dart +++ b/app/lib/common/widgets/gene_modulator_list.dart @@ -47,7 +47,7 @@ class GeneModulatorList { _getModulatorDrugNames(context, modulatorDefinition, geneName); if (drugNames.isEmpty) continue; final getDescription = subdefinition.key; - content[getDescription(geneName)] = drugNames; + content[getDescription(drugNames.length, geneName)] = drugNames; } return content; } diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 8ba400f4..c7b82228 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -612,18 +612,26 @@ "faq_contact_us": "Do you have unanswered questions or feedback? Contact us", "@faq_contact_us": {}, - "strong_inhibitors_description": "Strong {geneName} inhibitors:", + "strong_inhibitors_description": "{inhibitorNumber, plural, =1{Strong {geneName} inhibitor:} other{Strong {geneName} inhibitors:}}", "@strong_inhibitors_description": { "placeholders": { + "inhibitorNumber": { + "type": "int", + "example": "2" + }, "geneName": { "type": "String", "example": "CYP2D6" } } }, - "moderate_inhibitors_description": "Moderate {geneName} inhibitors:", + "moderate_inhibitors_description": "{inhibitorNumber, plural, =1{Moderate {geneName} inhibitor:} other{Moderate {geneName} inhibitors:}}", "@moderate_inhibitors_description": { "placeholders": { + "inhibitorNumber": { + "type": "int", + "example": "2" + }, "geneName": { "type": "String", "example": "CYP2D6"