frontend: plugins: Only fetch the active locale for plugin i18n#6112
frontend: plugins: Only fetch the active locale for plugin i18n#6112r0hansaxena wants to merge 2 commits into
Conversation
Signed-off-by: Rohan Saxena <rohansxn8772@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: r0hansaxena The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
I'll address the failing check |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: r0hansaxena The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary
Fixes a flood of 404 requests for plugin translation files. Plugin i18n eagerly fetched a
translation.jsonfor every locale a plugin declares, so a plugin declaring many locales whose files aren't present produced a 404 per missing locale on every render, enough to trip rate limiters like CrowdSec. Reported for the Prometheus plugin, but the fix applies to all plugins.Related Issue
Fixes #4854
Changes
enfallback) instead of every declared localeSteps to Test
Screenshots (if applicable)
Before:
After:
Notes for the Reviewer