tutor quota message in Persian digits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 06:36:03 +03:30
parent 2f1e257533
commit 191aba0e25

View File

@@ -287,10 +287,11 @@ class AskAIView(APIView):
if used_today >= quota: if used_today >= quota:
from subscription.services import has_unlimited_hearts as is_subscriber from subscription.services import has_unlimited_hearts as is_subscriber
n = str(quota).translate(str.maketrans('0123456789', '۰۱۲۳۴۵۶۷۸۹'))
raise Throttled(detail=( raise Throttled(detail=(
f'سقفِ امروزِ سوال از دستیار ({quota} سوال) پر شد؛ فردا دوباره می‌توانی بپرسی.' f'سقفِ امروزِ سوال از دستیار ({n} سوال) پر شد؛ فردا دوباره می‌توانی بپرسی.'
if is_subscriber(user.id) else if is_subscriber(user.id) else
f'سوال‌های رایگانِ امروز ({quota} سوال) تمام شد. با خریدِ اشتراک هر روز سوالِ بیشتری می‌توانی بپرسی.' f'سوال‌های رایگانِ امروز ({n} سوال) تمام شد. با خریدِ اشتراک هر روز سوالِ بیشتری می‌توانی بپرسی.'
)) ))
conversation_id = v.get('conversationId') conversation_id = v.get('conversationId')