don't call getDisplayCopy if category is other

This commit is contained in:
ggurdin 2024-11-11 14:12:06 -05:00
parent fd7919ac42
commit 5e74507558
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
2 changed files with 13 additions and 7 deletions

View file

@ -4493,5 +4493,6 @@
"enterLanguageLevel": "Please enter a language level",
"enterDiscussionTopic": "Please enter a discussion topic",
"selectBotChatMode": "Select chat mode",
"messageNotInTargetLang": "Message not in target language"
"messageNotInTargetLang": "Message not in target language",
"other": "Other"
}

View file

@ -55,12 +55,17 @@ class AnalyticsPopupState extends State<AnalyticsPopup> {
selectedCategory = category;
});
String categoryCopy(category) =>
widget.type.getDisplayCopy(
category,
context,
) ??
category;
String categoryCopy(category) {
if (category.toLowerCase() == "other") {
return L10n.of(context)!.other;
}
return widget.type.getDisplayCopy(
category,
context,
) ??
category;
}
@override
Widget build(BuildContext context) {