main ← fix/credit-limit-reset-time-format
merged 11:36AM - 19 Feb 26 UTC
The credit limit error messages had several i18n issues:
1. `relative_reset_t…ime` prepended a hardcoded "in " prefix that
could not be translated, and when combined with locale strings
like "Please try again after %{reset_time}" produced the
grammatically incorrect "after in 9h"
2. `playground.rb` was still using `relative_reset_time` instead of
`formatted_reset_time`, unlike the rest of the codebase which had
already been updated
3. `formatted_reset_time` used a raw `strftime` with hardcoded
English ("on", abbreviated month names) instead of `I18n.l`
4. The shared AI conversations page also used `strftime` with
English month names for the conversation date
This commit:
- Switches `playground.rb` to use `formatted_reset_time`, matching
`ai_credit_limit_handler` and the streaming jobs
- Removes the hardcoded "in " prefix from `relative_reset_time` so
the duration string is usable as a translatable fallback client-side
- Replaces `strftime` in `formatted_reset_time` with
`I18n.l(next_reset_at, format: :long)` so the date/time format is
fully locale-aware
- Replaces `strftime` in the shared conversations view with
`I18n.l(..., format: :date_only)` for the same reason
https://meta.discourse.org/t/393773