Move frontend translations to separate domain to reduce bundle size (#1197)

* Initial plan

* Create frontend translation files and update configuration

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Fix missing semicolon in password strength controller

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Remove frontend-only translations from messages domain and set frontend as default domain

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
Copilot 2026-01-18 18:50:38 +01:00 committed by GitHub
parent 6402cfe619
commit a3d992a016
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 952 additions and 422 deletions

View file

@ -96,7 +96,7 @@ export default class extends Controller {
classes = "bg-warning badge-warning";
break;
case 2:
text = trans("user.password_strength.medium")
text = trans("user.password_strength.medium");
classes = "bg-info badge-info";
break;
case 3:

View file

@ -15,4 +15,7 @@ const translator = createTranslator({
localeFallbacks,
});
export const { trans } = translator;
// Wrapper function with default domain set to 'frontend'
export const trans = (id, parameters = {}, domain = 'frontend', locale = null) => {
return translator.trans(id, parameters, domain, locale);
};