-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Declare speech recognition usage description #4992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d64b960
aa4dbba
0618e65
bd1223e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,6 +149,119 @@ | |
| } | ||
| } | ||
| }, | ||
| "NSSpeechRecognitionUsageDescription": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "A program running within cmux would like to use speech recognition." | ||
| } | ||
| }, | ||
| "ja": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "cmux 内で実行中のプログラムが音声認識の使用を求めています。" | ||
| } | ||
| }, | ||
| "zh-Hans": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "在 cmux 中运行的程序想要使用语音识别。" | ||
| } | ||
| }, | ||
| "zh-Hant": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "在 cmux 中執行的程式想要使用語音辨識。" | ||
| } | ||
| }, | ||
| "ko": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "cmux 내에서 실행 중인 프로그램이 음성 인식을 사용하려고 합니다." | ||
| } | ||
| }, | ||
| "de": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Ein in cmux ausgeführtes Programm möchte Spracherkennung verwenden." | ||
| } | ||
| }, | ||
| "es": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Un programa en ejecución dentro de cmux desea usar el reconocimiento de voz." | ||
| } | ||
| }, | ||
| "fr": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Un programme s'exécutant dans cmux souhaite utiliser la reconnaissance vocale." | ||
| } | ||
| }, | ||
| "it": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Un programma in esecuzione in cmux desidera utilizzare il riconoscimento vocale." | ||
| } | ||
| }, | ||
| "da": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Et program, der kører i cmux, vil gerne bruge talegenkendelse." | ||
| } | ||
| }, | ||
| "pl": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Program działający w cmux chciałby użyć rozpoznawania mowy." | ||
| } | ||
| }, | ||
| "ru": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Программа, запущенная в cmux, хотела бы использовать распознавание речи." | ||
| } | ||
| }, | ||
| "bs": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Program koji se izvršava unutar cmux želi koristiti prepoznavanje govora." | ||
| } | ||
| }, | ||
| "ar": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "يرغب برنامج يعمل داخل cmux في استخدام التعرف على الكلام." | ||
| } | ||
| }, | ||
| "nb": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Et program som kjører i cmux ønsker å bruke talegjenkjenning." | ||
| } | ||
| }, | ||
| "pt-BR": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Um programa em execução no cmux gostaria de usar reconhecimento de fala." | ||
| } | ||
| }, | ||
| "th": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "โปรแกรมที่ทำงานภายใน cmux ต้องการใช้การรู้จำเสียงพูด" | ||
| } | ||
| }, | ||
| "tr": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "cmux içinde çalışan bir program konuşma tanımayı kullanmak istiyor." | ||
| } | ||
| } | ||
| } | ||
| }, | ||
|
Comment on lines
+152
to
+264
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new Rule Used: Flag production user-facing text that is not fully... (source) Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Comment on lines
+152
to
+264
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add full locale coverage for the new usage-description key.
As per coding guidelines, “Every new Swift localization key must be backed by a matching 🤖 Prompt for AI Agents |
||
| "New $(PRODUCT_NAME) Workspace Here": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import Foundation | ||
| import Testing | ||
|
|
||
| #if canImport(cmux_DEV) | ||
| @testable import cmux_DEV | ||
| #elseif canImport(cmux) | ||
| @testable import cmux | ||
| #endif | ||
|
|
||
| @MainActor | ||
| @Suite | ||
| struct PrivacyUsageDescriptionBundleTests { | ||
| @Test | ||
| func appBundleDeclaresSpeechRecognitionUsageDescription() throws { | ||
| let usageDescription = try #require(Bundle(for: AppDelegate.self) | ||
| .infoDictionary?["NSSpeechRecognitionUsageDescription"] as? String | ||
| ) | ||
|
|
||
| #expect(usageDescription == "A program running within cmux would like to use speech recognition.") | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
NSSpeechRecognitionUsageDescriptionentry is only provided in English, but the catalog already carries translations forNSMicrophoneUsageDescription(the most structurally similar key) inja,zh-Hans,zh-Hant,ko,de,es,fr,it,da,pl,ru,bs,ar,nb,pt-BR,th, andtr. Users running cmux on a device set to any of those locales will see the raw key or the English fallback instead of a translated permission prompt — which on macOS Ventura+ typically surfaces as an untranslated string in the system privacy dialog. The same applies toNSBluetoothAlwaysUsageDescription(ja) andNSCameraUsageDescription(ja), so at minimum a Japanese translation is required to match the baseline set by every other key in this file.Rule Used: Flag production user-facing text that is not fully... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!