Commit Graph

11 Commits

Author SHA1 Message Date
dev f8954e6381 Finish the comments in both languages, and take the render audit in
The last three modules — the document model, the Markdown renderer, and the
formula renderer — were the largest, and every file with comments now
carries them in English and then in Chinese, as the library does. Three
thousand eight hundred and seventy comment lines across forty-three files.

The audit that renders every route is now part of the project rather than a
script kept outside it, because a release needs it and the next person
should not have to write it again. It is documented in the README beside
the other script.

Two faults of my own were found and fixed while writing the comments. A
blank line between two doc comment lines detaches the second block from the
item it documents; the compiler says so and it was said of ninety-three
such lines, which are now empty doc lines. And a few blocks were inserted
with the wrong indentation, which  then tidied.
2026-10-02 13:52:09 +08:00
dev 9caa542b52 Write the formulas in the notation Markdown has for them
A formula was written as a fenced code block, which is what a plain text
file allows and is not what Markdown has for mathematics. A code block is
code: the reader of the source sees a formula presented as code, and the
renderer had been taught to guess which blocks held equations, which is a
guess that is wrong whenever a block holds something else.

Every formula now stands between dollar signs, which is the notation every
Markdown mathematics renderer reads, and the guess is gone from the
renderer. A hundred and four blocks became two hundred and four formulas
in the two languages.

Three things that were in a code block were not formulas and are now what
they are. A paragraph of geometry was prose. A table of the exponent
notation is a table, because its two columns are a written form and what
it means. Two blocks are left as they were: the layer diagram, which is a
diagram, and a sample element set, which has to keep its column alignment.

The renderer learned what the notation needs and did not have: matrix
environments, with an ampersand between the columns of a row and a double
backslash between the rows; the floor and ceiling marks; the modulo
operator; a mark above an argument, as in the time derivative of Omega and
a barred coefficient; the text command, whose argument is words and was
being set one letter at a time; and the spacing commands.

The check on the formulas covered the concept documents and not the
interface documentation, so every formula there was unexamined. It covers
both now, and it treats a command name and an environment name as
notation, which is what they are: neither is drawn as the letters of its
own name.
2026-10-02 11:52:17 +08:00
dev 196727c778 Take the interface translation from the apsis-rs doc comments
`apsis-rs` now writes each doc comment in English and then in Chinese, in
the one comment beside the code. The extractor splits the two halves as it
reads them and writes both to the catalogue, so the interface
documentation carries both languages and no translation file is maintained
beside it.

This replaces `content/api.zh.json`, which held the Chinese keyed by item
name. That arrangement was unsound: a name is not unique. `new` is
defined by fifty-nine crates and does not mean the same thing in each, so
a translation filed under the bare name could be shown against the wrong
documentation. Splitting the comment removes the question, because the
translation is attached to the item rather than looked up by a name.

The coverage went from 434 of 1202 items to all of them, and the crate
summaries from 15 of 40 to all of them. A test now asserts that no item in
the committed catalogue is left without Chinese, so a crate that is not
translated fails the build rather than reading as English to a Chinese
reader.

Two defects surfaced while doing this.

The JSON codec decoded one string character by validating the whole
remaining buffer as UTF-8. That is correct and quadratic, and it repeated
for every character of the document: the catalogue took twenty-nine
seconds to parse once it grew, and the service could not start. It now
validates only the sequence at hand, which is six milliseconds.

The module documentation was joined into one line before it was split,
which destroyed both the paragraph structure and the boundary between the
languages, so the English half came out empty and the Chinese half held
the English text.
2026-10-02 09:47:02 +08:00
dev ff69c1cd63 Move every test out of src, as apsis-rs does
The service is a library with a thin binary over it, which is what makes
the move possible: an integration test is a separate crate and reaches
only what the library makes public, so the modules now live in
`src/lib.rs` and `main.rs` is the entry point. `src/` holds no test
code, which is the shape `apsis-rs` already has.

Eleven items are internal to a module and a test reaches them anyway.
Those stay `pub(crate)` where they are defined and are offered through
`src/testkit.rs`, which is the one place a caller is expected to look for
them. A wrapper is also the only way to offer a private thing outward:
Rust does not let visibility be widened twice, so a `pub(crate)` item
cannot be re-exported as `pub`. That keeps the seams in one file instead
of scattering them through the modules under test.

The 146 module tests and the 23 end to end tests all still run, which is
the number this move had to preserve: the 146 are spread over eighteen
files in `tests/`, one per module that had them.
2026-10-02 01:56:21 +08:00
dev 0a8f00a8fa web: license as GPL alone, and give every document a Chinese form
The service was offered under MIT or Apache-2.0. It is now under the
GNU General Public License, version 3 or later, and that alone: the two
other licence files are removed and the manifest names one licence.
`apsis-rs` is still MIT or Apache-2.0; both permit redistribution
inside a GPL work, so the two may be distributed together under these
terms.

Every document now has a Chinese form. The concept set already had one
for each of its thirty-one documents; the README and the design notes
did not, and both now do.

The design notes carried two sections under the same heading and two
under another, so the second copy of each was unreachable from the
outline. They are merged into one section apiece, keeping every distinct
decision and dropping the two lead-ins that said the same thing twice.
2026-10-02 00:55:00 +08:00
dev c726dd1ecc web: describe the field by layer and separate it from the implementation 2026-10-01 13:57:23 +08:00
dev 87dd6b78d0 web: name assets with a content hash so a stale bundle cannot be served 2026-10-01 09:06:10 +08:00
dev 3d716469d1 web: correct the asset cache policy, serve the flow index, and drop a stray artifact 2026-10-01 07:35:56 +08:00
dev 65b0b690f7 web: fix the tool form, the search box, the toc anchors, and translate the interface 2026-09-27 10:29:10 +08:00
dev 0415a5fe6f web: bind with --host and --port 2026-09-27 09:13:47 +08:00
dev 2a14c59264 web: add the apsis-web service, content, and frontend 2026-09-27 00:53:20 +08:00