diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-21 12:38:11 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-22 15:11:02 -0400 |
| commit | ba461c98594f41d53a29bdb6bd54640cd14cc810 (patch) | |
| tree | da538f13090f757d5771fdf0c78b35dcb263425f /src/sisudoc/ocda | |
| parent | check: languages of a document, against each other (diff) | |
check: warn when document's languages ocn diverge
The check runs once every language of a document has been abstracted.
Providing a warning by default. --strict makes divergence a failure,
taken at the end of the run so that outputs are complete and can be
examined. (the name --strict is general, so that later checks can be
added without a second flag).
Under --parallel the profiles are appended under synchronized, and the
comparison sorts a document's languages by name rather than taking
them in the order the threads finished, so two runs print the same
lines in the same order.
The outcome is noted per language in the database as
translation.ocn_aligned, for documents that have more than one
language.
(assisted by Claude-Code)
Diffstat (limited to 'src/sisudoc/ocda')
| -rw-r--r-- | src/sisudoc/ocda/abstraction/db_in.d | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sisudoc/ocda/abstraction/db_in.d b/src/sisudoc/ocda/abstraction/db_in.d index 5535870..7f1b2c3 100644 --- a/src/sisudoc/ocda/abstraction/db_in.d +++ b/src/sisudoc/ocda/abstraction/db_in.d @@ -214,6 +214,16 @@ template spineAbstractionDbRead() { /+ ↓ this database's own note of the .ssp it was built from. it is not part of the .ssp, so it does not go back into the block +/ doc.ssp_digest = _v; + } else if (_k.startsWith("translation.")) { + /+ ↓ what the database knows about this language's place among the + others, translation.ocn_aligned being the one such key today. + A language cannot state it about itself: it is the outcome of a + comparison made when every language had been read, which is + after the .ssp was written. So it is in the database and not in + the .ssp, and putting it back into the header here would make a + round trip differ from the file it is held against. Read it from + the metadata table, which is where it is. + +/ } else if (_k.startsWith("source.")) { string _kk = _k["source.".length .. $]; doc.source_info[_kk] = _v; |
