@@ -1237,15 +1237,6 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
12371237 super .dispose ();
12381238 }
12391239
1240- String _formatLabel (String enumName, AppLocalizations l10n) {
1241- // Converts camelCase to Title Case
1242- final spaced = enumName.replaceAllMapped (
1243- RegExp ('([A-Z])' ),
1244- (match) => ' ${match .group (1 )}' ,
1245- );
1246- return '${spaced [0 ].toUpperCase ()}${spaced .substring (1 )} ${l10n .daysSuffix }' ;
1247- }
1248-
12491240 @override
12501241 Widget build (BuildContext context) {
12511242 final accountActionConfig = widget.remoteConfig.accountActionConfig;
@@ -1254,10 +1245,21 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
12541245
12551246 return Column (
12561247 children: relevantActionTypes.map ((actionType) {
1248+ final localizedActionType = switch (actionType) {
1249+ FeedActionType .linkAccount => l10n.feedActionTypeLinkAccount,
1250+ FeedActionType .rateApp => l10n.feedActionTypeRateApp,
1251+ FeedActionType .followTopics => l10n.feedActionTypeFollowTopics,
1252+ FeedActionType .followSources => l10n.feedActionTypeFollowSources,
1253+ FeedActionType .upgrade => l10n.feedActionTypeUpgrade,
1254+ FeedActionType .enableNotifications =>
1255+ l10n.feedActionTypeEnableNotifications,
1256+ };
12571257 return widget.buildIntField (
12581258 context,
1259- label: _formatLabel (actionType.name, l10n),
1260- description: l10n.daysBetweenPromptDescription (actionType.name),
1259+ label: '$localizedActionType ${l10n .daysSuffix }' ,
1260+ description: l10n.daysBetweenPromptDescription (
1261+ localizedActionType,
1262+ ),
12611263 value: _getDaysMap (accountActionConfig)[actionType] ?? 0 ,
12621264 onChanged: (value) {
12631265 final currentMap = _getDaysMap (accountActionConfig);
0 commit comments