feat(ui): internationalize profile, subscription, integrations templates and user menu JS
- Add 155 new translation keys to en.json (common, nav, integrations, profile, subscription sections) - Add window.__i18n script block to base.html for user menu strings - Replace all hardcoded English strings in common.js with window.__i18n lookups using safe fallback pattern - Internationalize profile.html (page title, headings, labels, hints, placeholders, theme options) - Internationalize subscription.html (page title, plan cards, usage stats, plan actions, badges) - Internationalize integrations_dashboard.html (header, quota bars, modal, all form fields, action buttons, webhook section, delete modal) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -548,6 +548,23 @@
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- i18n strings for common.js (user menu) -->
|
||||
<script>
|
||||
window.__i18n = {
|
||||
accountMenu: {{ _("nav.account_menu") | tojson }},
|
||||
accountMenuFor: {{ _("nav.account_menu_for") | tojson }},
|
||||
avatar: {{ _("common.avatar") | tojson }},
|
||||
profileSettings: {{ _("nav.profile_settings") | tojson }},
|
||||
mySubscription: {{ _("nav.my_subscription") | tojson }},
|
||||
apiTokens: {{ _("nav.api_tokens") | tojson }},
|
||||
sharedLinks: {{ _("nav.shared_links") | tojson }},
|
||||
signOut: {{ _("nav.sign_out") | tojson }},
|
||||
logIn: {{ _("nav.login") | tojson }},
|
||||
signUp: {{ _("nav.signup") | tojson }},
|
||||
getStarted: {{ _("nav.get_started") | tojson }},
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- Common JS (shared) -->
|
||||
<script src="/static/js/common.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user