Codex/remove obs go live streaming modules#9
Conversation
…emove-obs-go-live-streaming-modules
There was a problem hiding this comment.
Pull request overview
This PR refactors and expands the app’s localization pipeline by adding German support, introducing a persisted user language override, and moving culture negotiation into a shared startup service (with browser-language interop). It also updates Settings/Diagnostics UI to use resource-based localized strings and adjusts automated tests for the new behavior.
Changes:
- Add German (
de) as a supported culture and expose display-ordered culture definitions for UI selection. - Introduce
AppCulturePreferenceServiceto resolve culture preference (typed settings → legacy key → browser languages) and applydocument.langvia new JS interop. - Localize Settings navigation/section headers and connectivity overlay strings via
UiTextKey+ shared.resxcatalogs; update unit/UI tests accordingly.
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/PrompterOne.Core.Tests/Localization/AppCultureCatalogTests.cs | Updates culture resolution expectations to treat de-DE as supported German. |
| tests/PrompterOne.App.UITests/Support/BrowserTestConstants.cs | Adds constants for German/English labels and a helper to spoof navigator.languages in Playwright. |
| tests/PrompterOne.App.UITests/Media/recording-file-harness.js | Improves video visibility detection by sampling across frames with a short timeout. |
| tests/PrompterOne.App.UITests/Localization/LocalizationFlowTests.cs | Adds UI flows for browser-language German, persisted French selection, and Russian fallback to English. |
| tests/PrompterOne.App.UITests/Learn/LearnStartupAlignmentTests.cs | Makes startup layout sampling more robust by capturing additional animation-frame samples. |
| tests/PrompterOne.App.UITests/Editor/EditorOverlayInteractionTests.cs | Stabilizes visibility assertion with explicit timeout. |
| tests/PrompterOne.App.UITests/Editor/EditorLayoutTests.cs | Stabilizes visibility assertions with explicit timeouts. |
| tests/PrompterOne.App.Tests/Support/TestSupport.cs | Extends test DI + TestJsRuntime to support browser-culture interop and AppCulturePreferenceService. |
| tests/PrompterOne.App.Tests/Localization/LocalizationRenderingTests.cs | Adds a rendering test verifying German localized Settings labels. |
| tests/PrompterOne.App.Tests/Localization/AppCulturePreferenceServiceTests.cs | Adds unit tests for preference resolution, browser-language fallback, and legacy key migration. |
| src/PrompterOne.Shared/wwwroot/localization/browser-culture.js | New JS interop module to read browser languages and set document.documentElement.lang. |
| src/PrompterOne.Shared/Settings/Pages/SettingsPage.razor | Localizes Settings title/navigation/streaming copy and wires language selection into appearance section. |
| src/PrompterOne.Shared/Settings/Pages/SettingsPage.Preferences.cs | Adds persistence + reload handler for language selection updates. |
| src/PrompterOne.Shared/Settings/Pages/SettingsPage.Localization.cs | New code-behind partial providing localizer access + selected language resolution. |
| src/PrompterOne.Shared/Settings/Models/SettingsPagePreferences.cs | Adds LanguageCulture to typed settings persisted model. |
| src/PrompterOne.Shared/Settings/Components/SettingsRecordingSection.razor | Localizes section title/description. |
| src/PrompterOne.Shared/Settings/Components/SettingsFilesSection.razor | Localizes section title/description. |
| src/PrompterOne.Shared/Settings/Components/SettingsCloudSection.razor | Localizes section title/description. |
| src/PrompterOne.Shared/Settings/Components/SettingsAppearanceSection.razor | Localizes labels, adds language selection dropdown, and uses culture display definitions. |
| src/PrompterOne.Shared/Settings/Components/SettingsAiSection.razor | Localizes section title/description. |
| src/PrompterOne.Shared/Localization/UiTextKey.cs | Adds new keys for connectivity overlay, Go Live header indicators, and Settings UI strings. |
| src/PrompterOne.Shared/Localization/SharedResource.uk.resx | Adds Ukrainian translations for new UI keys. |
| src/PrompterOne.Shared/Localization/SharedResource.resx | Adds English base strings for new UI keys. |
| src/PrompterOne.Shared/Localization/SharedResource.pt.resx | Adds Portuguese translations for new UI keys. |
| src/PrompterOne.Shared/Localization/SharedResource.it.resx | Adds Italian translations for new UI keys. |
| src/PrompterOne.Shared/Localization/SharedResource.fr.resx | Adds French translations for new UI keys. |
| src/PrompterOne.Shared/Localization/SharedResource.es.resx | Adds Spanish translations for new UI keys. |
| src/PrompterOne.Shared/Localization/SharedResource.de.resx | Introduces German resource catalog (new culture). |
| src/PrompterOne.Shared/Localization/BrowserCultureInteropMethodNames.cs | Defines JS interop identifiers for browser-language and document-lang operations. |
| src/PrompterOne.Shared/Localization/AppCulturePreferenceService.cs | New shared service implementing culture selection + legacy migration + document lang application. |
| src/PrompterOne.Shared/Diagnostics/Services/BrowserConnectivityService.cs | Localizes connectivity banner copy using UiTextKey instead of hardcoded English strings. |
| src/PrompterOne.Shared/Diagnostics/Components/ConnectivityOverlay.razor | Localizes overlay eyebrow/buttons via shared resources. |
| src/PrompterOne.Shared/Contracts/UiTestIds.cs | Adds test id for Settings language select and Settings title. |
| src/PrompterOne.Shared/AppShell/Services/PrompterOneServiceCollectionExtensions.cs | Registers AppCulturePreferenceService in Shared DI. |
| src/PrompterOne.Shared/AppShell/Layout/MainLayout.razor.cs | Replaces Go Live indicator/widget hardcoded labels with localized resources. |
| src/PrompterOne.Core/Localization/AppCultureDefinition.cs | Adds a culture definition model (culture + display name) for UI selection lists. |
| src/PrompterOne.Core/Localization/AppCultureCatalog.cs | Adds German support and exposes display-ordered supported cultures. |
| src/PrompterOne.App/wwwroot/index.html | Loads new browser-culture.js before app start. |
| src/PrompterOne.App/Services/BrowserCultureRuntime.cs | Removes old host-specific culture bootstrapper (replaced by shared service). |
| src/PrompterOne.App/Program.cs | Switches startup culture initialization to AppCulturePreferenceService.InitializeAsync(). |
| docs/Architecture.md | Updates localization architecture notes for persisted override + browser negotiation. |
| AGENTS.md | Updates repo rules to include persisted user language choice and adds German to supported cultures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `Storage` | Browser persistence and cloud transfer orchestration | Keeps scripts and settings local-first while exposing provider-backed import/export | `src/PrompterOne.Shared/Storage`, `src/PrompterOne.Shared/Library/Services/Storage` | browser `IStorage` and VFS registration, authoritative browser repositories for scripts/folders, provider credential persistence, scripts/settings snapshot transfer | routed page layout, teleprompter rendering, video-stream upload workflows | | ||
| | `Cross-Tab Messaging` | Same-origin browser runtime coordination | Lets separate WASM tabs coordinate browser-owned state without a backend | `src/PrompterOne.Shared/AppShell/Services`, `src/PrompterOne.Shared/Settings/Services`, `src/PrompterOne.Shared/wwwroot/app` | `BroadcastChannel` bridge, typed envelopes, settings fan-out, same-origin tab sync | server state, cross-origin transport, collaborative editor conflict resolution | | ||
| | `Diagnostics` | Error and operation feedback layer | Makes recoverable and fatal issues visible in the shell | `src/PrompterOne.Shared/Diagnostics` | banners, error boundary reporting, operation status wiring | owning business logic of the failing feature | | ||
| | `Localization` | Culture and UI text contract | Keeps supported runtime languages consistent and browser-driven | `src/PrompterOne.Shared/Localization`, `src/PrompterOne.Core/Localization` | text catalogs, culture bootstrap, supported culture rules | feature behavior or screen-specific layout ownership | | ||
| | `Localization` | Culture and UI text contract | Keeps supported runtime languages consistent, browser-driven, and user-overridable through persisted settings | `src/PrompterOne.Shared/Localization`, `src/PrompterOne.Core/Localization` | shared resource catalogs, startup culture bootstrap, browser-language negotiation, persisted user language override, supported culture rules | feature behavior or screen-specific layout ownership | | ||
| | `Workspace` | Active script/session state model | Gives editor, learn, read, and go-live one shared script context | `src/PrompterOne.Core/Workspace` | loaded script state, previews, estimated duration, active session metadata | feature-specific rendering details | | ||
| | `Media` | Browser media and scene domain | Models cameras, microphones, transforms, and audio bus state | `src/PrompterOne.Core/Media`, `src/PrompterOne.Shared/Media` | media device models, scene state, browser media interop | routed screen layout ownership | |
There was a problem hiding this comment.
The PR title references removing OBS Go Live modules, but the changes here are primarily localization/culture (new German support, persisted language preference, localized settings/diagnostics UI). Consider renaming the PR (or updating the PR description) so reviewers and release notes accurately reflect the scope.
No description provided.