Tests fail when the Mac isn't set to English

Open Beginner friendly
#1,958 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@zolferfigueiredo is already working on this.

Since Nov 5, 2026.

  • #1959 by @zolferfigueiredo — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift
Domain
testing

Research direction

Start by inspecting the Xcode scheme’s test action and the two failing tests: MouseButtonShortcutTests.testButtonsAreNumberedFromTheLeftButton and WindowActionShortcutViewTests.testStoredMouseButtonIsShownByName. Configure the test action to use English and the US region, then run the scheme’s tests on a Mac set to a different language; done means both tests pass there.

Written by the indexing model from the issue text.

Description

  • This is a new bug that hasn't been documented in a closed issue or in the Readme.

macOS version: 27.0.1
Rectangle version: main at 0698b04 (after v2.0.4)
Logs if applicable (In Rectangle menu, hold option, "View Logging..."): not applicable, this is a test failure

What happens

On a Mac whose language isn't English, xcodebuild test (or Product > Test in Xcode) fails 2 tests, 4 checks:

  • MouseButtonShortcutTests.testButtonsAreNumberedFromTheLeftButton
  • WindowActionShortcutViewTests.testStoredMouseButtonIsShownByName

They compare against English text ("Middle Button", "Button 4", "⌥⌘ Button 5"), but the test host runs in the Mac's language and gets the translation instead.

On main this already happens on a Mac set to Spanish, Brazilian Portuguese, Hindi, Ukrainian or Chinese, which translate those strings. #1957 adds Italian, and on an Italian Mac the tests get "Pulsante centrale" and "Pulsante 4".

Expected

The tests pass whatever language the Mac is set to.

Fix

Run the scheme's test action in English (language = "en", region = "US"). A pull request follows.

Dominant language
Swift
Stars
30.2k
Forks
1k
Avg merge
3d 1h
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rxhanson/Rectangle

All issues in rxhanson/Rectangle

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.