Repository navigation
Plan: move dictionary configuration and export to liblcm - #1259
jasonleenaylor wants to merge 2 commits into
Conversation
Add Docs/dictionary-configuration-to-liblcm-plan.md. It plans the move of the dictionary configuration model, its parsing and migration, ConfiguredLcmGenerator, and the XHTML, CSS, and Word writers into a new liblcm project, SIL.LCModel.DictionaryConfiguration. The plan has three phases: extract the FieldWorks-specific dependencies inside FieldWorks, move the code into liblcm, then switch FieldWorks over to the package. The document is temporary. The last step of the plan deletes it. Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1259 +/- ##
==========================================
+ Coverage 40.41% 40.92% +0.50%
==========================================
Files 1597 1602 +5
Lines 360490 360800 +310
Branches 42176 42245 +69
==========================================
+ Hits 145696 147660 +1964
+ Misses 185105 183644 -1461
+ Partials 29689 29496 -193 🚀 New features to boost your workflow:
|
|
Word export tests before the Word writer changes The plan relies on the existing Word tests in several places. They are the done-criterion for 0.L, 0.O-1 and 0.O-2 ("
Suggestion: add a Word test item at the start of Phase 0 and make it a dependency of 0.L, 0.O-1, 0.O-2 and 0.O-3. Items that don't touch the Word writer need not wait for it.
One related point: 1.D adds an |
|
Why does the JSON writer stay in FieldWorks? Decision 1 moves the XHTML, CSS and Word writers and keeps JSON, but the plan gives a reason only for the three that move. Could it say why JSON stays? I assume it is because JSON is used only by the Webonary upload, which Lexbox does not need. I ask because keeping it has costs that Decision 1's own reasoning argues against:
Its FieldWorks dependencies look like the ones Phase 0 already removes from the other writers: PropertyTable, RecordClerk, the collator and lead-character lookup, thread spawning, progress strings and If there is a reason to keep it, a sentence in Decision 1 would settle it. If not, moving it with the others looks simpler. |
|
2.B: the localization harvest also reads the default configuration files 2.B removes
Suggestion:
Related: |
|
0.E and 0.I treat |
Add item 0.O-0, Word export tests, ahead of the items that change the Word writer (0.L, 0.O-1, 0.O-2, 0.O-3). It adds document-level tests of SavePublishedDocx, right-to-left fixtures, and an OpenXmlValidator run against the unchanged writer. Keep MakeSafeFilePath in the engine (0.E, 0.I). It converts media paths to NFC on the paths that are never copied, so it is part of locating the file. Replace ConfigurableDictionaryNode.StringTable, an FwUtils type, with a LabelLocalizer delegate (0.I). Name XmlToPo as a consumer of the default configuration files and keep the configuration labels in messages.pot (2.B, 2.D). Record why the JSON writer stays in FieldWorks: it supports only the current Webonary upload and will be dropped. Record the status of the SIL.ExCSS retarget (0.N). Co-Authored-By: Claude <noreply@anthropic.com>
Adds the plan for moving dictionary configuration and export out of FieldWorks:
Docs/dictionary-configuration-to-liblcm-plan.md. This PR contains only the plan. No code changes yet.What the plan covers
The dictionary configuration model, its parsing and migration,
ConfiguredLcmGenerator, and the XHTML, CSS, and Word writers move into a new liblcm project,SIL.LCModel.DictionaryConfiguration. Lexbox is the first consumer outside FieldWorks: Webonary 2.0 (XHTML and CSS) first, Word later. The JSON writer, the preview and paging code, and the configuration dialogs stay in FieldWorks.System.Web) inside FieldWorks, with no liblcm changes.Notes for reviewers
412ee26b8and liblcmda7140f0.🤖 Generated with Claude Code
This change is