+ {sections.map((section, sectionIndex) => (
+
- {section.label} · {formatTimelineTime(section.timeRange.start)}–{formatTimelineTime(section.timeRange.end)}
+ {translateSectionFormLabel(locale, section.label)} · {formatTimelineTime(section.timeRange.start)}–{formatTimelineTime(section.timeRange.end)}
{section.groove}
@@ -121,7 +128,17 @@ const SongStructure = memo(function SongStructure({ sections, t }: { sections: R
/** Documented. */
export function Workspace({ song, sourceBootstrap = null, onSongUpdate }: WorkspaceProps) {
const [activeRole, setActiveRole] = useState
(null);
- const t = useMemo(() => createTranslator(detectPreferredLocale()), []);
+ const locale = useMemo(() => detectPreferredLocale(), []);
+ const t = useMemo(() => createTranslator(locale), [locale]);
+ // Rehearsal priorities focus copy localizes section form labels like every
+ // other surface; unknown focus strings fall back to their raw value.
+ const focusSummary = song.exportSummary?.focusSections?.length
+ ? song.exportSummary.focusSections
+ .map((label) => translateSectionFormLabel(locale, label as SectionFormLabel))
+ .join(", ")
+ : song.sections[0]
+ ? translateSectionFormLabel(locale, song.sections[0].label)
+ : t("workspaceFocusFallback");
// Extract all unique roles from the song's sections
const roleMap = useMemo(() => {
@@ -157,9 +174,9 @@ export function Workspace({ song, sourceBootstrap = null, onSongUpdate }: Worksp
t(firstRange.overlapWarning ? "workspaceFirstRangeClash" : "workspaceFirstRangeCheck"),
{
roleName: firstRange.roleName,
- lowestNote: firstRange.lowestNote,
- highestNote: firstRange.highestNote,
- sectionLabel: firstRange.sectionLabel
+ lowestNote: firstRange.lowestNote,
+ highestNote: firstRange.highestNote,
+ sectionLabel: translateSectionFormLabel(locale, firstRange.sectionLabel)
}
)
: t("workspaceFirstRangeMissing");
@@ -348,12 +365,14 @@ export function Workspace({ song, sourceBootstrap = null, onSongUpdate }: Worksp
{t("workspaceRehearsalPrioritiesLabel")}
- Focus: {song.exportSummary?.focusSections?.join(", ") || song.sections[0]?.label || "first pass"}.
+ {t("workspaceRehearsalPrioritiesFocusPrefix")} {focusSummary}.