fix(i18n): show stored locale on addons instructions at initial load#197
Closed
dobby-coder[bot] wants to merge 1 commit into
Closed
fix(i18n): show stored locale on addons instructions at initial load#197dobby-coder[bot] wants to merge 1 commit into
dobby-coder[bot] wants to merge 1 commit into
Conversation
The {@html $_('addons.${activeItem}')} block on the addons page was
wrapped in {#key activeItem}, so it was only torn down and recreated
when the active addon tab changed. On prerendered pages the HTML is
baked at build time in en-US; once the client hydrates with a stored
nl-NL preference, the keyed block did not re-evaluate the @html
expression until the user manually switched tabs, leaving Dutch users
on the English instructions until interaction.
Include $locale in the key so the block re-renders whenever the active
locale changes after hydration, ensuring the correct language is shown
on initial load.
Closes #164
This was referenced May 9, 2026
Contributor
Author
|
Superseded by #204 (consolidation per encryption4all/dobby#53). Closing to keep the queue tidy. |
rubenhensen
pushed a commit
that referenced
this pull request
May 9, 2026
* docs: clarify Outlook add-in is under the Apps menu Closes #173 Outlook now lists custom add-ins under the "Apps" menu in the ribbon rather than as a dedicated ribbon button. Update the install instructions on the addons page (en + nl) so users know to open the add-in via Apps -> PostGuard Add-in for both sending and decrypting. * fix: make Thunderbird/Outlook addon tabs look clickable Closes #170 * fix(i18n): clarify Thunderbird add-on install step references cog icon The English instruction said "click on the sign, after Manage Your Extensions" which is unclear. Replace with "click on the cog icon next to Manage Your Extensions" and align the Dutch translation. Closes #168 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(addons): consolidate install-doc, i18n, and UX fixes Apply changes from PRs #190, #191, #193, #195, #196, #197, #199 on top of #189 and #192. Specifically: - Outlook: clarify add-in lives under Apps menu (#189) - Outlook: NL terminology aligned with current Outlook UI (#190) - Outlook: instruct user to restart after install (#191) - Outlook: save manifest as manifest.xml via download attr (#193) - Outlook: open aka.ms/olksideload in new tab (#196) - Outlook: warn users when custom add-ins are blocked (#199) - Thunderbird: clarify Manage Extensions cog icon (#195) - Addons page: rerun {#key} on locale change so instructions reflect stored locale (#197) --------- Co-authored-by: dobby-yivi-agent[bot] <275734547+dobby-yivi-agent[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{#key activeItem}, which only re-creates the block when the user clicks a different tab. Marketing pages are prerendered inen-US, so the{@html \$_('addons.\${activeItem}')}content is baked in English. After client hydration, even if the visitor's stored preference isnl-NL, the keyed block was not re-evaluating the translation expression, so users saw English instructions until they switched tabs (which is exactly the behaviour reported in the issue).\$localein the{#key}expression so the block is torn down and re-rendered when the locale store changes after hydration. The fix is local to this template — it does not touch the global i18n setup or any locale JSON files, so it should not conflict with the other in-flight Outlook/Thunderbird translation PRs.Test plan
npm run check— 0 errors / 0 warningsnpm run lint— Prettier + ESLint cleannpm run build— adapter-static build succeeds/addons/withlocalStorage.preferredLanguage = 'nl-NL'in a fresh tab and confirm the Thunderbird instructions render in Dutch on first paint, without needing a tab switch.Reviewer quickstart
Then in the browser console:
localStorage.setItem('preferredLanguage', 'nl-NL')and reload/addons/.🤖 Generated with Claude Code