frontend: Localize startup failures with typed errors - #13871
Closed
rwinkelman wants to merge 2 commits into
Closed
Conversation
…oject#13394) Replace bare const char* throws in AppInit/GetLocaleNames with OBSInitException carrying an InitErrorCode, log the code + developer detail, and show a localized Init.Error.* message via OBSErrorBox.
Author
|
CI is waiting on first-time contributor workflow approval ( |
Member
|
This does not follow our PR template/contribution guidelines, and smells like AI. |
Author
|
Sorry about the earlier description — I missed the project PR template. Reopened with the template filled out, commits squashed to a single |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Startup failures from
OBSApp::AppInitandGetLocaleNameswere thrown as bareconst char *strings. The catch site inobs-main.cppcould only surface that English text, so users on other locales saw an untranslated error dialog.This adds
OBSInitExceptionwith anOBSInitErrorCode, keeps a short developer detail string for logging, and maps each code to a newInit.Error.*string inen-US.iniviaQTStrfor the dialog. Otherconst char *throws (outputs/modules) are left alone for a later change; the old catch remains as a fallback.Motivation and Context
Fixes #13394. Matches the typed-error approach discussed on that issue.
How Has This Been Tested?
Built the changed frontend sources locally with the project clang-format config applied. Full OBS CI was pending first-time contributor workflow approval on the earlier push; please re-run after reopen.
Manual check still needed: normal launch, and a forced AppInit failure path to confirm the dialog uses
Init.Error.*and the log line includes the error code name.Types of changes
Checklist: