auto-claude: subtask-3-2 - Add rate limit feedback to ContactForm UI

- Added rate limit translations for en, de, and sr locales
- Added state to track remaining attempts from X-RateLimit-Remaining header
- Display warning when remaining attempts are low (<=2)
- Show user-friendly error messages with time until reset for 429 errors
- Added AlertTriangle icon for visual feedback on warnings
- All messages now use i18n translation keys for multilingual support
This commit is contained in:
2026-01-25 12:10:15 +01:00
parent 24dbadf5d6
commit 0f59df9b35
5 changed files with 65 additions and 10 deletions
+12 -1
View File
@@ -411,7 +411,18 @@
},
"submit": "Send Message",
"successMessage": "Thank you for your message! I will get back to you as soon as possible.",
"errorMessage": "Sorry, there was an error sending your message."
"errorMessage": "Sorry, there was an error sending your message.",
"rateLimit": {
"warning": "You have {count} {count, plural, one {attempt} other {attempts}} remaining",
"error": "Too many requests. Please try again in {time}.",
"blockedUntil": "Rate limit exceeded. You can try again in {time}."
},
"errors": {
"nameRequired": "Name is required",
"emailRequired": "Email is required",
"emailInvalid": "Please enter a valid email address",
"messageRequired": "Message is required"
}
}
},
"privacy": {