Implement NPC drops export and enhance language localization#7
Open
HordeXL wants to merge 5 commits intoNL0bP:masterfrom
Open
Implement NPC drops export and enhance language localization#7HordeXL wants to merge 5 commits intoNL0bP:masterfrom
HordeXL wants to merge 5 commits intoNL0bP:masterfrom
Conversation
Introduce NPC drop extraction and export UI/logic. Added UI strings and a toolbar button (ExtractNpcDrops) and a new ExtractNpcDropsCommand in MainViewModel which prompts for a file, calls DatabaseService.ExtractNpcDropsAsync, and writes JSON output (with pretty-printing and relaxed JSON escaping). DatabaseService: added NpcDropRecord/ItemDropRecord, implemented ExtractNpcDropsAsync to read loot_pack_dropping_npcs and loots (chunked queries), aggregate item lists per NPC, and report progress. Also changed localized_texts query to select columns dynamically based on language mode and simplified fallback logic. Minor UI string tweak to LangTip to clarify DB content language behavior.
Replace the toolbar language toggle button with a ComboBox (RU/EN/ZH) bound TwoWay to Language. Update MainViewModel so setting Language invokes ApplyLanguageChange(), which recreates UIStrings, persists the selection, and raises property changes for UI and related labels. ToggleLanguage now delegates to ApplyLanguageChange as well.
Add detailed technical implementation documentation for LootMaster covering four core areas: NPC drop extraction (DB queries, aggregation, JSON export), database localization (RU/EN/ZH dynamic field selection and fallback logic), JSON input parsing (multi-format handling and robustness), and UI language switching (state-driven updates, persistence, and DataGrid header refresh). The new markdown provides code snippets and rationale to aid future development and maintenance.
Add many localized UI entries to UIStrings.cs (NPC extraction, common dialog titles, open/save dialog filters/titles, MessageBox texts, import/export messages). Replace hardcoded Russian strings in MainViewModel with corresponding _ui.* properties and methods, including status texts and MessageBox prompts. Convert TryParseGroupChance from static to instance to allow localized warnings. Purpose: centralize localization and remove inline string literals to support multi-language UI and consistent messaging.
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.
No description provided.