Skip to content

Generalize the nbsp/dash punctuation rule; add missing tooltips - #97

Merged
liotier merged 1 commit into
mainfrom
claude/admiring-davinci-ntx7cy
Sep 10, 2026
Merged

liotier merged 1 commit into
mainfrom
claude/admiring-davinci-ntx7cy

Conversation

@liotier

@liotier liotier commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

Punctuation generalization (per your "generalize the punctuation rule" request, scoped to include the 51 theory/description strings): the non-breaking-space treatment from the bulk-export hint (PR #96) now applies to all 767 strings in en.json plus their two HTML fallback duplicates (app.subtitle, chordMatcher.description). Applied via script rather than by hand, and exhaustively verified: zero remaining plain " - ", zero remaining plain " — ", zero ?/! without a preceding nbsp. Also caught one case not covered by the original hyphen rule: a spaced em-dash in app.subtitle gets the same treatment, while the 172 tight em-dashes elsewhere (prose like comma—incomplete, and progression names like I—V—vi—IV that use em-dash as a compact chord-joiner) are correctly left alone - there's no breakable space there to protect. Scope is English only; the other five locales keep their own typographic conventions untouched, same reasoning as PR #96.

Tooltip fixes, found while working through this:

  • downloadAllBtn's two labels ("Download all .progression/MIDI files") read as duplicates of the bulk-catalogue link below them. Relabeled to "Download this progression's ... files" with a new tooltip clarifying it covers every variant - context-aware between progression and MIDI.
  • The MPC Pads tab had no tooltip. Added one.
  • Each variant's small download-icon tooltip just said "Download" - now names the file type, also context-aware, since the same icon downloads a different format depending on the active tab.
  • buttons.download became unused once the variant-icon tooltip moved to its own key; removed from all six locales.

fr/es/de/it/pt translations are drafts, not native-reviewed.

Test plan

  • Wrote a verification script (not manual spot-checking) confirming zero unconverted instances across all 767 strings, plus explicit checks that formula hyphens, tight em-dashes, and progression-name em-dash joiners survived untouched
  • Live browser test (Playwright): generated a progression, hovered all four new/changed tooltip targets in both MPC and MIDI context, confirmed exact tooltip text and button labels match, confirmed the button correctly shows no download tooltip in Guitar context (where it's a Print button instead) - 10/10 checks passed
  • node -c app.js and JSON validation on all six locale files

🤖 Generated with Claude Code

https://claude.ai/code/session_01EwQCigYZxdGBW3kPWnMMgF


Generated by Claude Code

Extends the non-breaking-space treatment (nbsp before ?/!, nbsp around a
standalone "-" or " — ") from the one bulk-export sentence to all 767
strings in en.json plus their two HTML fallback duplicates. Applied via
script, not by hand, and verified exhaustively: zero remaining unconverted
instances, and spot-checks confirm word-internal hyphens ("on-demand"),
scale-formula hyphens ("W-H-W-W-W-H-W"), tight em-dashes used as prose
punctuation ("comma—incomplete"), and progression names that use em-dash
as a compact chord-to-chord joiner ("I—V—vi—IV") are all untouched - none
of those had a breakable space to protect in the first place. Scope is
English only, per the earlier PR's reasoning about other locales' own
typographic conventions.

Also fixes four tooltip gaps found along the way:
- "Download all .progression/MIDI files" read as duplicates of the
  bulk-catalogue link below them. Relabeled to "Download this
  progression's ... files" and gave each a tooltip clarifying it covers
  every variant, context-aware (progression vs MIDI).
- The MPC Pads tab had no tooltip explaining what it does.
- Each variant's small download icon tooltip just said "Download" -
  now names the file type, also context-aware (progression vs MIDI),
  since the same icon downloads different formats depending on the
  active tab.

buttons.download became unused once the variant-icon tooltip moved to
its own key; removed from all six locales.

fr/es/de/it/pt tooltip and button-label translations are drafts, not
native-reviewed. The nbsp sweep itself is English-only, not extended to
the other locales' own description text.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwQCigYZxdGBW3kPWnMMgF
@sonarqubecloud

Copy link
Copy Markdown

@liotier
liotier merged commit 1497cee into main Sep 10, 2026
7 checks passed
@liotier
liotier deleted the claude/admiring-davinci-ntx7cy branch September 10, 2026 06:56
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