--- phase: 06-global-site-selection plan: 03 subsystem: ui tags: [wpf, xaml, toolbar, localization, mvvm, site-picker] # Dependency graph requires: - phase: 06-global-site-selection/06-02 provides: OpenGlobalSitePickerCommand, GlobalSitesSelectedLabel, OpenGlobalSitePickerDialog factory property - phase: 06-global-site-selection/06-01 provides: SitePickerDialog (dialog already registered in DI) provides: - Toolbar button "Select Sites" bound to OpenGlobalSitePickerCommand - Toolbar TextBlock bound to GlobalSitesSelectedLabel for live site count - SitePickerDialog factory wired in MainWindow.xaml.cs - 5 EN localization keys for toolbar.selectSites and toolbar.globalSites - 5 FR localization keys matching EN keys - GlobalSitesSelectedLabel fully localized via TranslationSource affects: - 06-04 (no XAML impact; GlobalSitesChangedMessage broadcast already live from 06-02) # Tech tracking tech-stack: added: [] patterns: - "TranslationSource.Instance[key] for code-behind label formatting (same as PermissionsViewModel)" - "Func DI factory resolved in MainWindow.xaml.cs code-behind" - "XAML binding Path=[toolbar.selectSites] for localized button content and tooltip" key-files: created: [] modified: - SharepointToolbox/Localization/Strings.resx - SharepointToolbox/Localization/Strings.fr.resx - SharepointToolbox/ViewModels/MainWindowViewModel.cs - SharepointToolbox/MainWindow.xaml - SharepointToolbox/MainWindow.xaml.cs key-decisions: - "Added using SharepointToolbox.Core.Models to MainWindow.xaml.cs for TenantProfile — required by SitePickerDialog factory lambda" - "TextBlock foreground set to Gray to visually distinguish label from action buttons" - "Disabled tooltip (toolbar.selectSites.tooltipDisabled) added to resources for future use; not wired in XAML because WPF Button does not show ToolTip when IsEnabled=false without a style trigger" patterns-established: - "Global site picker factory pattern in MainWindow.xaml.cs mirrors PermissionsView factory" requirements-completed: - SITE-01 # Metrics duration: 2min completed: 2026-04-07 --- # Phase 06 Plan 03: Toolbar UI, Localization, and Dialog Factory Wiring Summary **Select Sites button and count label added to MainWindow toolbar; 5 EN + 5 FR localization keys added; GlobalSitesSelectedLabel localized via TranslationSource; SitePickerDialog factory wired in MainWindow code-behind** ## Performance - **Duration:** ~2 min - **Started:** 2026-04-07T08:06:13Z - **Completed:** 2026-04-07T08:07:51Z - **Tasks:** 3 - **Files modified:** 5 ## Accomplishments - Added 5 EN and 5 FR localization keys for the global site picker toolbar controls — button label, tooltip, disabled tooltip, count format, and empty state - Updated `GlobalSitesSelectedLabel` in `MainWindowViewModel` from hardcoded English strings to `TranslationSource.Instance` lookups — label now switches language with the app - Added ``, `