Skip to content

refactor: extract device locale helpers - #137

Closed
ethanpschoen wants to merge 1 commit into
mainfrom
ethanpschoen/refactor/device-locale-helpers
Closed

refactor: extract device locale helpers#137
ethanpschoen wants to merge 1 commit into
mainfrom
ethanpschoen/refactor/device-locale-helpers

Conversation

@ethanpschoen

@ethanpschoen ethanpschoen commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description of this change

Extracts the raw device-locale lookup and a BCP-47 formatter (getDeviceLanguageTag) into their own module, replacing the module-level deviceLanguage const in KetchServiceProvider. Pure refactor, no behavior change.

Part 1/5 of a split of #126 into a stack of small, independently reviewable PRs. Full stack: #137#138#139#140#141.

Why is this change being made?

  • Chore (non-functional changes)
  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How was this tested? How can the reviewer verify your testing?

npm run lint, npm run typecheck, and npm test (this PR's own deviceLocale.test.ts, 4/4 passing) all pass standalone on this branch.

The full 5-PR stack was verified as a faithful, complete split of #126 before publishing: git diff --exit-code <top-of-stack> origin/ethanpschoen/feat/headless-api is empty (exit 0), and the top of the stack passes the full local gate (lint, typecheck, build, npm test).

Related issues

Refs #126.

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have evaluated the security impact of this change, and OWASP Secure Coding Practices have been observed.
  • I have informed stakeholders of my changes.

Extracts the raw device-locale lookup and a BCP-47 formatter into their own module, replacing the module-level deviceLanguage const in the provider. Pure refactor, no behavior change.

Part 1/5 of the split of #126.
@ethanpschoen ethanpschoen changed the title ethanpschoen/refactor/device locale helpers refactor: extract device locale helpers Aug 6, 2026
@ethanpschoen
ethanpschoen marked this pull request as ready for review August 6, 2026 20:59
@ethanpschoen
ethanpschoen requested review from a team as code owners August 6, 2026 20:59
@ethanpschoen ethanpschoen reopened this Aug 7, 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.

1 participant