Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -77105,6 +77105,23 @@
}
}
},
"settings.search.alias.setting.terminal.smooth-scrolling": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "terminal.smoothScrolling smooth scroll scrolling pixel precise trackpad magic mouse scrollback"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "terminal.smoothScrolling smooth scroll scrolling pixel precise trackpad magic mouse scrollback ターミナル スムーズ スクロール トラックパッド"
}
}
Comment on lines 77105 to +77122
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing locale translations for search alias string

The new settings.search.alias.setting.terminal.smooth-scrolling entry only has en and ja translations, but the directly comparable settings.search.alias.setting.terminal.scrollbar entry carries translations for ar, bs, da, de, es, fr, it, ko, nb, pl, pt-BR, ru, th, tr, uk, zh-Hans, and zh-Hant. Users of those locales will get no results (or English fallback) when they search for the smooth-scrolling setting in their own language. The three settings.terminal.smoothScrolling UI-label strings (title, subtitleOn, subtitleOff) have the same gap, though that matches the existing en+ja-only pattern for settings.terminal.scrollBar; the alias string deviation is the concrete regression.

Rule Used: Flag production user-facing text that is not fully... (source)

}
},
Comment on lines +77108 to +77124
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Extract all unique locale codes from the Localizable.xcstrings catalog
# and check if the new keys are missing any of them.

# Extract all unique locale keys from the catalog
echo "=== All locales found in Localizable.xcstrings ==="
cat Resources/Localizable.xcstrings | jq -r '
  .. | objects | select(has("localizations")) | .localizations | keys[]
' | sort -u

echo ""
echo "=== Locales present in new smooth-scrolling keys ==="
cat Resources/Localizable.xcstrings | jq -r '
  .["settings.terminal.smoothScrolling"].localizations | keys[]
' | sort

echo ""
echo "=== Expected: All locales from first list should appear in second list ==="

Repository: manaflow-ai/cmux

Length of output: 384


🏁 Script executed:

#!/bin/bash
# Search for the new keys in the catalog and show their locale coverage

echo "=== Searching for the four new keys ==="

keys=("settings.search.alias.setting.terminal.smooth-scrolling" 
      "settings.terminal.smoothScrolling"
      "settings.terminal.smoothScrolling.subtitleOff"
      "settings.terminal.smoothScrolling.subtitleOn")

for key in "${keys[@]}"; do
  echo ""
  echo "--- Key: $key ---"
  # Extract section for this key including next line to count locales
  grep -A 50 "\"$key\"" Resources/Localizable.xcstrings | head -60 | grep -E "(\"(ar|bs|da|de|en|es|fr|it|ja|ko|nb|pl|pt-BR|ru|th|tr|uk|zh-Hans|zh-Hant)\":|\"state\"|\"value\")" | head -20
done

echo ""
echo "=== Verify the key exists at all ==="
grep -c "settings.terminal.smoothScrolling" Resources/Localizable.xcstrings

Repository: manaflow-ai/cmux

Length of output: 4233


All four new localization keys must include entries for every locale supported by this catalog.

The catalog supports 19 locales (ar, bs, da, de, en, es, fr, it, ja, ko, nb, pl, pt-BR, ru, th, tr, uk, zh-Hans, zh-Hant), but all four new keys—settings.search.alias.setting.terminal.smooth-scrolling, settings.terminal.smoothScrolling, settings.terminal.smoothScrolling.subtitleOff, and settings.terminal.smoothScrolling.subtitleOn—only include entries for en and ja.

Per coding guidelines and established convention, newly added keys must include entries for all 19 supported locales. For lower-confidence locales (ar, bs, da, pl, th, tr), use English-language fallback with state: "translated".

Missing locales for each key: ar, bs, da, de, es, fr, it, ko, nb, pl, pt-BR, ru, th, tr, uk, zh-Hans, zh-Hant.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Resources/Localizable.xcstrings` around lines 77108 - 77124, The four new
localization keys (settings.search.alias.setting.terminal.smooth-scrolling,
settings.terminal.smoothScrolling,
settings.terminal.smoothScrolling.subtitleOff,
settings.terminal.smoothScrolling.subtitleOn) only include en/ja; add entries
for all 19 supported locales (ar, bs, da, de, en, es, fr, it, ja, ko, nb, pl,
pt-BR, ru, th, tr, uk, zh-Hans, zh-Hant). For high-confidence locales provide
appropriate translated "value" and mark "state":"translated"; for
lower-confidence locales (ar, bs, da, pl, th, tr) use the English text as the
fallback value but still set "state":"translated". Ensure each key’s
"localizations" object contains an object for every locale with a "stringUnit"
containing "state" and "value".

"settings.search.alias.setting.sidebarAppearance.match-terminal": {
"extractionState": "manual",
"localizations": {
Expand Down Expand Up @@ -107103,6 +107120,57 @@
}
}
},
"settings.terminal.smoothScrolling": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Smooth Terminal Scrolling"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "ターミナルのスムーズスクロール"
}
}
}
},
"settings.terminal.smoothScrolling.subtitleOff": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Uses Ghostty's row-based scrollback handling for terminal wheel gestures."
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "ターミナルのホイールジェスチャには Ghostty の行単位スクロールバック処理を使います。"
}
}
}
},
"settings.terminal.smoothScrolling.subtitleOn": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Uses pixel-precise scrollback for trackpads and Magic Mouse gestures. Mouse-reporting terminal apps keep their own wheel handling."
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "トラックパッドと Magic Mouse のジェスチャではピクセル単位のスクロールバックを使います。マウス入力を扱うターミナルアプリは独自のホイール処理を維持します。"
}
}
}
},
"settings.terminal.agentAutoResume": {
"extractionState": "manual",
"localizations": {
Expand Down
17 changes: 17 additions & 0 deletions Sources/App/WorkspaceRuntimeSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,23 @@ enum TerminalScrollBarSettings {
}
}

enum TerminalSmoothScrollingSettings {
static let enabledKey = "terminal.smoothScrolling"
static let defaultEnabled = true
static let didChangeNotification = Notification.Name("cmux.terminalSmoothScrollingSettingsDidChange")

static func isEnabled(defaults: UserDefaults = .standard) -> Bool {
if defaults.object(forKey: enabledKey) == nil {
return defaultEnabled
}
return defaults.bool(forKey: enabledKey)
}

static func notifyDidChange(notificationCenter: NotificationCenter = .default) {
notificationCenter.post(name: didChangeNotification, object: nil)
}
}

enum AgentSessionAutoResumeSettings {
static let autoResumeAgentSessionsKey = "terminal.autoResumeAgentSessions"
static let defaultAutoResumeAgentSessions = true
Expand Down
1 change: 1 addition & 0 deletions Sources/CmuxSettingsJSONPathSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extension CmuxSettingsFileStore {
"app.renameSelectsExistingName",
"app.commandPaletteSearchesAllSurfaces",
"terminal.showScrollBar",
"terminal.smoothScrolling",
"terminal.autoResumeAgentSessions",
"notifications.dockBadge",
"notifications.showInMenuBar",
Expand Down
14 changes: 14 additions & 0 deletions Sources/CommandPalette/CommandPaletteSettingsToggle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,20 @@ enum CommandPaletteSettingsToggleCommands {
TerminalScrollBarSettings.notifyDidChange(notificationCenter: notificationCenter)
}
),
CommandPaletteSettingToggleDescriptor(
commandId: commandIdPrefix + "terminalSmoothScrolling",
settingsKey: "terminal.smoothScrolling",
title: {
String(localized: "settings.terminal.smoothScrolling", defaultValue: "Smooth Terminal Scrolling")
},
sectionTitle: terminal,
keywords: ["terminal.smoothScrolling", "terminal", "smooth", "scroll", "scrollback", "trackpad"],
defaultValue: TerminalSmoothScrollingSettings.defaultEnabled,
defaultsKey: TerminalSmoothScrollingSettings.enabledKey,
didSet: { _, _, notificationCenter in
TerminalSmoothScrollingSettings.notifyDidChange(notificationCenter: notificationCenter)
}
),
CommandPaletteSettingToggleDescriptor(
commandId: commandIdPrefix + "autoResumeAgentSessions",
settingsKey: "terminal.autoResumeAgentSessions",
Expand Down
Loading
Loading