purchases-android icon indicating copy to clipboard operation
purchases-android copied to clipboard

CustomerCenter shows incorrect duration format in Japanese

Open chibatching opened this issue 9 months ago • 2 comments

Describe the bug

  1. Environment
    1. Platform: Android
    2. SDK version: 8.14.2
    3. OS version: Android 15
    4. Android Studio version: Meerkat
    5. All devices with Japanese language setting
  2. No logs
  3. Steps to reproduce, with a description of expected vs. actual behavior
    1. Subscribe to a 1-month cycle subscription.
    2. Open CustomerCenter on a device set to Japanese.
    3. The billing cycle row displays か月, but 1か月 is expected.
  1. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.) The Period.localized function removes 1 from the localized period text. For example, 1 month is transformed into month:
    https://github.com/RevenueCat/purchases-android/blob/0ad7e522e5e56da1c8f3c3a901a0266ef246b34c/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/extensions/PeriodExtensions.kt#L41-L50

This works well in English but not in all languages. At least in Japanese, か月 is a duration expression for "month," but it requires a number, even if it is 1.

Additional context Add any other context about the problem here.

chibatching avatar Mar 16 '25 06:03 chibatching

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Mar 16 '25 06:03 RCGitBot

Hi @chibatching, Thank you for reporting it! We've created a ticket to fix it, I'll let you know when it's ready.

nyeu avatar Mar 19 '25 10:03 nyeu

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.

github-actions[bot] avatar Oct 05 '25 00:10 github-actions[bot]