Tests fail when the Mac isn't set to English

Aperta Adatta ai principianti
#1,958 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@zolferfigueiredo ci sta già lavorando.

Dal 5/11/2026.

  • #1959 di @zolferfigueiredo — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
macos, swift
Ambito
testing

Direzione di ricerca

Inizia esaminando l’azione di test dello schema Xcode e i due test che non passano: MouseButtonShortcutTests.testButtonsAreNumberedFromTheLeftButton e WindowActionShortcutViewTests.testStoredMouseButtonIsShownByName. Configura l’azione di test affinché utilizzi l’inglese e la regione degli Stati Uniti, quindi esegui i test dello schema su un Mac impostato su una lingua diversa; il lavoro è completato quando entrambi i test passano lì.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

  • 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.

Lingua principale
Swift
Stelle
30.2k
Fork
1k
Merge medio
3g 1h
PR unite (30g)
38

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rxhanson/Rectangle

Tutte le issue di rxhanson/Rectangle

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.