Repository navigation
fix(clients): i18n follow-ups after the admin and dashboard slices - #1459
Merged
Merged
Conversation
- admin: the language switcher's profile save sends If-Match with the ETag of the read it merges from, retries once on 412, and no longer sends the email field the API dropped in #1454 - admin: apiFetch gains the onResponse hook the dashboard already has - dashboard: the container renders defaultLanguage from FSH_DEFAULT_LANGUAGE like the admin does; compose passes it to both apps, Terraform sets it on the dashboard site, and the container CI job asserts the en-US default - dashboard: drop the English-text fallback for the deactivated-tenant 403, now that the API always sends the Multitenancy.TenantDeactivated code - both: add the missing t dependency to the upload hook and the file preview effect, so error text follows a language switch - admin: remove the unused theme-toggle component
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.
These are the small items from the reviews of #1383 and #1384 that I said I'd pick up myself, plus one leftover from #1454.
Admin language switcher. It reads the profile, merges in the new locale and writes it back, but the write didn't send
If-Match. So a name edit landing between the read and the write was silently overwritten. It now echoes the read's ETag (with aW/prefix stripped, like the dashboard does), and on a 412 it runs the read-merge-write once more against the fresh profile. It also stops sendingemail, which the API dropped in #1454. To make that possible, admin'sapiFetchgets the sameonResponsehook the dashboard already has.Dashboard container language. The dashboard reads
defaultLanguagefromconfig.json, but its container template never wrote it, so a containerized dashboard always started in en-US. The template and entrypoint now render it fromFSH_DEFAULT_LANGUAGE(defaulten-US), the same as admin.deploy/dockerpasses it to both apps and documents it in.env.example, and Terraform now sets it on the dashboard site too, not just admin. The container CI job asserts the en-US default for both apps.Deactivated-tenant fallback. Now that #1382 is in, the API always sends
code: Multitenancy.TenantDeactivated. So the English-text match inapi-client.ts, and the compatibility test that covered it, are gone.Smaller fixes:
tin their dependency lists, so their error text stayed in the old language after a switch.theme-toggle.tsxin admin is removed.Tested:
tscclean, build passes.config.jsonwith and withoutFSH_DEFAULT_LANGUAGE(pt-BRanden-US).tenant-deactivated.spec.ts:43and:61) time out on my machine on a cleanmaintoo, while CI passes them, so I'm treating that as local.Docs: fullstackhero/docs PR to follow (changelog entry).