Fix OCR user dictionary add-actions#10594
Fix OCR user dictionary add-actions#10594HellbringerOnline wants to merge 5 commits intoSubtitleEdit:mainfrom
Conversation
|
Looks good :)
Also, it would be great to keep PRs focused on a single concern. Could you move the Unicode normalization changes into a separate PR? |
Ok, I'll try. |
thx :) |
…y-fixes-upstream # Conflicts: # src/UI/Features/Ocr/FixEngine/OcrFixEngine.cs # src/UI/Features/Ocr/OcrViewModel.cs
|
I think this does too much - and the remove stuff is not wanted. |
Summary
Problem
Some OCR add-actions used the raw OCR token instead of the displayed or corrected word. In addition, popup flows did not refresh the current OCR dictionary state immediately after adding a user word, so the just-added word could still be treated as unknown until a later refresh.
Changes
AddUserWord(string word)to the OCR fix engine and update the runtime dictionary state immediatelyDisplayWordandResolveSubmittedWord(...)so add-actions consistently submit the visible or confirmed wordValidation
dotnet test tests/UI/UITests.csproj --filter "FullyQualifiedName~UnknownWordItemTests|FullyQualifiedName~OcrFixEngineUserDictionaryTests"dotnet build src/UI/UI.csproj -c Debug --no-restore