Switch: Fix uppercase labels to sentence case in all locales - #8055
Open
clairedenning wants to merge 1 commit into
Open
Switch: Fix uppercase labels to sentence case in all locales#8055clairedenning wants to merge 1 commit into
clairedenning wants to merge 1 commit into
Conversation
ljemmo
force-pushed
the
switch-update-260629
branch
3 times, most recently
from
July 14, 2026 12:51
e5d3f51 to
8b814ab
Compare
There was a problem hiding this comment.
Pull request overview
Updates Switch on/off label translations to use sentence case (instead of all-caps) across the provided locale files, aligning the component text with the design requirement and updating associated unit tests accordingly.
Changes:
- Updated
switch.on/switch.offlocale strings from uppercase to sentence case in multiple locales. - Updated Switch unit tests to reflect sentence-case labels.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/locales/pt-pt.ts | Switch on/off labels changed from ON/OFF to On/Off. |
| src/locales/fr-ca.ts | Switch on/off labels changed from OUI/NON to Oui/Non. |
| src/locales/es-es.ts | Switch on/off labels changed from SÍ/NO to Sí/No. |
| src/locales/en-gb.ts | Switch on/off labels changed from ON/OFF to On/Off. |
| src/locales/de-de.ts | Switch on/off labels changed from EIN/AUS to Ein/Aus. |
| src/components/switch/switch.test.tsx | Updated assertions/descriptions for the new sentence-case labels. |
Comment on lines
+106
to
109
| it("renders Off and On text outside the track when not loading", () => { | ||
| renderSwitch(); | ||
| expect(screen.getByText(/^(ON|OFF)$/i)).toBeInTheDocument(); | ||
| expect(screen.getByText(/^(On|Off)$/i)).toBeInTheDocument(); | ||
| }); |
Comment on lines
232
to
235
| it("hides On/Off state text when loading", () => { | ||
| renderSwitch({ loading: true }); | ||
| expect(screen.queryByText(/^(ON|OFF)$/i)).not.toBeInTheDocument(); | ||
| expect(screen.queryByText(/^(On|Off)$/i)).not.toBeInTheDocument(); | ||
| }); |
nicktitchmarsh
force-pushed
the
switch-update-260629
branch
from
September 3, 2026 14:27
8b814ab to
77692ff
Compare
nicktitchmarsh
approved these changes
Sep 3, 2026
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.
Proposed behaviour
Switch labels must be in Sentence case

Current behaviour
Switch labels are in UPPER CASE

Checklist
d.tsfile added or updated if requiredQA
Additional context
Testing instructions