refactor: every count in the web app is said by one plural(), with the viewer's thousands separator; a source guard names any hand-written copy (M505 #5642)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { plural } from '#lib/utils/plural.js';
|
||||
export type ApiError = {
|
||||
code: string;
|
||||
message: string;
|
||||
@@ -18,7 +19,7 @@ export function rateLimitMessage(err: unknown): string | null {
|
||||
const secs = apiErr.retryAfter;
|
||||
if (!secs || secs <= 0) return 'Too many attempts. Try again in a few minutes.';
|
||||
const mins = Math.ceil(secs / 60);
|
||||
return `Too many attempts. Try again in ${mins} minute${mins === 1 ? '' : 's'}.`;
|
||||
return `Too many attempts. Try again in ${plural(mins, 'minute', 'minutes')}.`;
|
||||
}
|
||||
|
||||
export type User = {
|
||||
|
||||
Reference in New Issue
Block a user