Skip to content

Conversation

@ignatovv
Copy link
Member

Summary

  • Cap badge counter display at 999+ when count exceeds 999
  • Move string formatting to init for better SwiftUI performance (avoids recalculation in body)

@ignatovv ignatovv requested a review from a team as a code owner November 28, 2025 15:46
@claude
Copy link
Contributor

claude bot commented Nov 28, 2025

Best Practices

CounterView.swift:15
The hardcoded string "999+" should be localized. Following CLAUDE.md guidelines, all user-facing text must use localization constants from the Loc module.

Add a key to one of the .xcstrings files (likely UI.xcstrings):

"Counter.Max" : {
  "extractionState" : "manual",
  "localizations" : {
    "en" : {
      "stringUnit" : {
        "state" : "translated",
        "value" : "%lld+"
      }
    }
  }
}

Then use it with:

self.text = count > 999 ? Loc.Counter.max(999) : "\(count)"

This ensures proper internationalization (some cultures may use different formatting or separators for large numbers).


⚠️ Minor Issues - Localize "999+" string for internationalization

@ignatovv ignatovv merged commit 0c04566 into develop Nov 28, 2025
8 checks passed
@ignatovv ignatovv deleted the ios-5505-max-count-999-for-a-badge branch November 28, 2025 16:08
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants