Skip to content

Use device localisation for temperature/distance/pressure units - #488

Merged
Avi0n merged 1 commit into
Avi0n:devfrom
neilalexander:neil/temperatures
Nov 10, 2026
Merged

Avi0n merged 1 commit into
Avi0n:devfrom
neilalexander:neil/temperatures

Conversation

@neilalexander

@neilalexander neilalexander commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Not all locales are binary metric or imperial, the UK for example uses celsius for temperatures but miles for distances and therefore doesn't match .metric (there's .uk for our unique way of doing things), so UK users were shown ºF incorrectly in all cases. Instead just always use the device locale to tell us which units to use, that way we shouldn't ever get it wrong.

Tested on

  • iOS [version]
  • iPadOS [version]
  • macOS [version]

Checklist

  • This PR was discussed with the maintainer either via GitHub issue or other means (Also check the box if this PR is small enough not to need discussion e.g. typo fix)
  • I have read CONTRIBUTING.md
  • Testing steps are documented above.
  • This change is not low effort and I took the time to test it

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Hi @neilalexander, thanks for the contribution! This PR is being closed automatically because the required checklist items are not checked:

  • I have read CONTRIBUTING.md
  • This change is not low effort and I took the time to test it

Please verify you have completed these items, then check the corresponding boxes in the PR description (the checklist has been added there for you). The PR will reopen automatically once the above are addressed.

@github-actions github-actions Bot closed this Nov 9, 2026
@github-actions github-actions Bot reopened this Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

All required checklist items are now checked, reopening. Thanks @neilalexander!

@Avi0n
Avi0n changed the base branch from main to dev November 10, 2026 00:12
@Avi0n

Avi0n commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Awesome, thanks!!

@Avi0n

Avi0n commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Before I merge this, could you rebase onto current dev? And to satisfy SwiftFormat, remove the return on the four case lines in preferredUnit and leave the expressions.

@neilalexander

Copy link
Copy Markdown
Contributor Author

Rebased & formatter happy.

@Avi0n
Avi0n merged commit 3d7fe5b into Avi0n:dev Nov 10, 2026
4 of 5 checks passed
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