Skip to content

Add i18n support to profile page#29

Merged
YannickFuereder merged 3 commits intomainfrom
copilot/add-translations-profile-page
Mar 11, 2026
Merged

Add i18n support to profile page#29
YannickFuereder merged 3 commits intomainfrom
copilot/add-translations-profile-page

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

The profile page had all UI strings hardcoded in English with no translation support, unlike the main page which already used i18next.

Changes

Bug fix — localization.js

applyLocalization() was concatenating translations onto existing innerText instead of replacing it, causing doubled text on language switches:

// Before (broken on language change)
element.innerText = i18next.t(element.getAttribute('i18n')) + element.innerText;

// After
element.innerText = i18next.t(element.getAttribute('i18n'));

Translation keys — en.json / de.json

  • Added 81 profile-specific keys (profile_*) for all UI strings: navigation, section headings, buttons, input placeholders, status labels, empty states, and dynamic content
  • Added complete German translations for all new keys

profile/index.html

  • Added i18n attributes to all static text elements; cleared hardcoded text content
  • Added i18n-placeholder attributes to all inputs
  • Used <span i18n="..."> wrapper for "Back" text (SVG sibling prevents direct innerText replacement on parent <a>)
  • Removed i18n from the 2FA toggle button since its text is state-driven in JS

profile.js / settings/device.js

  • Imported and call applyLocalization(item) on dynamically cloned SSO template nodes
  • Replaced all hardcoded strings in dynamically created DOM nodes with i18next.t('profile_*') — passkeys, API keys, devices, trusted apps, SSO entries, 2FA status, and the double-click confirm button
Original prompt

Add translations to the profile page


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 11, 2026 06:42
Co-authored-by: YannickFuereder <64203572+YannickFuereder@users.noreply.github.com>
…pe key

Co-authored-by: YannickFuereder <64203572+YannickFuereder@users.noreply.github.com>
Copilot AI changed the title [WIP] Add translations to the profile page Add i18n support to profile page Mar 11, 2026
@YannickFuereder YannickFuereder marked this pull request as ready for review March 11, 2026 07:08
@YannickFuereder YannickFuereder merged commit 3df3d9e into main Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants