Backend:
- max_ai_messages_per_day + max_ai_tokens_per_day on User model (nullable, override)
- Migration 008: add columns + seed default settings (100 msgs, 500K tokens)
- usage_service: count today's messages + tokens, check quota, get limits
- GET /chats/quota returns usage vs limits + reset time
- POST /chats/{id}/messages checks quota before streaming (429 if exceeded)
- Admin user schemas expose both limit fields
- GET /admin/usage returns per-user daily message + token counts
- admin_user_service allows updating both limit fields
Frontend:
- Chat header shows "X/Y messages · XK/YK tokens" with red highlight at limit
- Quota refreshes every 30s via TanStack Query
- Admin usage page with table: user, messages today, tokens today
- Route + sidebar entry for admin usage
- English + Russian translations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
223 lines
6.9 KiB
JSON
223 lines
6.9 KiB
JSON
{
|
|
"auth": {
|
|
"login": "Log In",
|
|
"register": "Sign Up",
|
|
"email": "Email",
|
|
"password": "Password",
|
|
"confirmPassword": "Confirm Password",
|
|
"username": "Username",
|
|
"fullName": "Full Name",
|
|
"rememberMe": "Remember me",
|
|
"submit": "Submit",
|
|
"noAccount": "Don't have an account?",
|
|
"hasAccount": "Already have an account?",
|
|
"loginTitle": "Welcome Back",
|
|
"loginSubtitle": "Sign in to your account",
|
|
"registerTitle": "Create Account",
|
|
"registerSubtitle": "Get started with your personal AI assistant",
|
|
"errors": {
|
|
"invalidCredentials": "Invalid email or password",
|
|
"emailExists": "User with this email or username already exists",
|
|
"passwordMismatch": "Passwords do not match",
|
|
"passwordMinLength": "Password must be at least 8 characters",
|
|
"usernameFormat": "Username must be 3-50 characters (letters, numbers, _ or -)",
|
|
"required": "This field is required"
|
|
}
|
|
},
|
|
"layout": {
|
|
"dashboard": "Dashboard",
|
|
"chats": "Chats",
|
|
"documents": "Documents",
|
|
"memory": "Memory",
|
|
"notifications": "Notifications",
|
|
"profile": "Profile",
|
|
"logout": "Log Out",
|
|
"settings": "Settings",
|
|
"admin": "Admin",
|
|
"users": "Users",
|
|
"context": "Context",
|
|
"skills": "Skills",
|
|
"personal_context": "My Context",
|
|
"pdf": "PDF Reports",
|
|
"pdf_templates": "Templates",
|
|
"usage": "Usage"
|
|
},
|
|
"dashboard": {
|
|
"welcome": "Welcome, {{name}}",
|
|
"subtitle": "Your personal AI assistant"
|
|
},
|
|
"chat": {
|
|
"new_chat": "New Chat",
|
|
"no_chats": "No chats yet. Create one to get started.",
|
|
"no_messages": "Start a conversation...",
|
|
"select_chat": "Select a chat to start messaging",
|
|
"type_message": "Type a message...",
|
|
"send": "Send",
|
|
"archive": "Archive",
|
|
"unarchive": "Unarchive",
|
|
"delete_confirm": "Are you sure you want to delete this chat?",
|
|
"limit_reached": "Chat limit reached",
|
|
"streaming": "AI is thinking...",
|
|
"quota_messages": "{{used}}/{{limit}} messages",
|
|
"quota_tokens": "{{used}}K/{{limit}}K tokens"
|
|
},
|
|
"admin": {
|
|
"context_editor": "Primary Context Editor",
|
|
"context_placeholder": "Enter the system prompt for the AI assistant...",
|
|
"save": "Save",
|
|
"saved": "Saved",
|
|
"unsaved_changes": "Unsaved changes",
|
|
"version": "Version",
|
|
"characters": "characters"
|
|
},
|
|
"skills": {
|
|
"my_skills": "My Skills",
|
|
"general_skills": "General Skills",
|
|
"no_skills": "No skills yet.",
|
|
"no_personal_skills": "You haven't created any personal skills yet.",
|
|
"create_personal": "Create Personal Skill",
|
|
"edit_personal": "Edit Personal Skill",
|
|
"create_general": "Create General Skill",
|
|
"edit_general": "Edit General Skill",
|
|
"name": "Name",
|
|
"name_placeholder": "e.g. Cardiologist",
|
|
"description": "Description",
|
|
"description_placeholder": "Brief description of this specialist",
|
|
"system_prompt": "System Prompt",
|
|
"prompt_placeholder": "Instructions for the AI when using this skill...",
|
|
"icon": "Icon",
|
|
"no_skill": "No specialist",
|
|
"general": "General",
|
|
"personal": "Personal"
|
|
},
|
|
"personal_context": {
|
|
"title": "Personal Context",
|
|
"subtitle": "This context is added to all your AI conversations",
|
|
"placeholder": "Add personal information that the AI should know about you..."
|
|
},
|
|
"notifications": {
|
|
"title": "Notifications",
|
|
"no_notifications": "No notifications yet.",
|
|
"mark_all_read": "Mark all read",
|
|
"mark_read": "Mark as read",
|
|
"view_all": "View all notifications",
|
|
"types": {
|
|
"reminder": "Reminder",
|
|
"alert": "Alert",
|
|
"info": "Info",
|
|
"ai_generated": "AI Generated"
|
|
}
|
|
},
|
|
"documents": {
|
|
"upload": "Upload",
|
|
"drop_or_click": "Drop a file here or click to browse",
|
|
"doc_type": "Document Type",
|
|
"no_documents": "No documents uploaded yet.",
|
|
"download": "Download",
|
|
"reindex": "Re-extract text",
|
|
"extracted_text": "Extracted Text",
|
|
"search_placeholder": "Search documents...",
|
|
"clear_search": "Clear",
|
|
"types": {
|
|
"other": "Other",
|
|
"report": "Report",
|
|
"contract": "Contract",
|
|
"receipt": "Receipt",
|
|
"certificate": "Certificate"
|
|
},
|
|
"status": {
|
|
"pending": "Pending",
|
|
"processing": "Processing",
|
|
"completed": "Completed",
|
|
"failed": "Failed"
|
|
}
|
|
},
|
|
"memory": {
|
|
"create": "Add Memory Entry",
|
|
"edit": "Edit Memory Entry",
|
|
"no_entries": "No memory entries yet. The AI will save important information here.",
|
|
"category": "Category",
|
|
"importance": "Importance",
|
|
"title_field": "Title",
|
|
"title_placeholder": "e.g. Diabetes Type 2",
|
|
"content_field": "Content",
|
|
"content_placeholder": "Detailed information...",
|
|
"categories": {
|
|
"health": "Health",
|
|
"finance": "Finance",
|
|
"personal": "Personal",
|
|
"work": "Work",
|
|
"document_summary": "Document Summary",
|
|
"other": "Other"
|
|
},
|
|
"importance_levels": {
|
|
"critical": "Critical",
|
|
"high": "High",
|
|
"medium": "Medium",
|
|
"low": "Low"
|
|
}
|
|
},
|
|
"pdf": {
|
|
"title": "PDF Reports",
|
|
"generate": "Generate PDF",
|
|
"title_placeholder": "Report title...",
|
|
"no_pdfs": "No PDF reports generated yet.",
|
|
"template": "Template",
|
|
"default_template": "Default template"
|
|
},
|
|
"pdf_templates": {
|
|
"title": "PDF Templates",
|
|
"create": "Create Template",
|
|
"edit": "Edit Template",
|
|
"no_templates": "No templates yet.",
|
|
"default": "Default",
|
|
"inactive": "Inactive",
|
|
"name": "Name",
|
|
"locale": "Language",
|
|
"description": "Description",
|
|
"html_content": "HTML Template",
|
|
"preview": "Preview",
|
|
"variables_ref": "Template Variables Reference",
|
|
"var_title": "Report title",
|
|
"var_user_name": "User's full name",
|
|
"var_generated_at": "Generation timestamp",
|
|
"var_memories": "List of memory entries (category, title, content, importance)",
|
|
"var_documents": "List of documents (original_filename, doc_type, excerpt)",
|
|
"var_ai_summary": "AI-generated summary (optional)"
|
|
},
|
|
"admin_users": {
|
|
"title": "User Management",
|
|
"create": "Create User",
|
|
"edit": "Edit User",
|
|
"max_chats": "Max Chats",
|
|
"deactivate": "Deactivate",
|
|
"activate": "Activate"
|
|
},
|
|
"admin_settings": {
|
|
"title": "App Settings",
|
|
"self_registration": "Self Registration",
|
|
"self_registration_desc": "Allow users to register accounts themselves",
|
|
"default_max_chats": "Default Max Chats",
|
|
"default_max_chats_desc": "Default chat limit for new users"
|
|
},
|
|
"admin_usage": {
|
|
"title": "Usage Statistics",
|
|
"user": "User",
|
|
"messages": "Messages Today",
|
|
"tokens": "Tokens Today",
|
|
"no_data": "No usage data available."
|
|
},
|
|
"common": {
|
|
"loading": "Loading...",
|
|
"error": "An error occurred",
|
|
"notFound": "Page not found",
|
|
"goHome": "Go to Dashboard",
|
|
"save": "Save",
|
|
"cancel": "Cancel",
|
|
"delete": "Delete",
|
|
"edit": "Edit",
|
|
"create": "Create",
|
|
"search": "Search"
|
|
}
|
|
}
|