You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest Rust by Example has a Japanese translation resource based on mdbook-i18n-helpers.
But it is not built because rust-lang/rust has the original mdbook build process which doesn't contain mdbook-i18n-helpers.
In my investigation, I found that the following changes are required to build it.
Export Preprocessor struct for gettext
The bootstrap process of rust-lang/rust uses the original rustbook binary to build docs.
It uses mdbook crate as a library and the normal mdbook plugin system is not used.
So exporting Preprocessor struct which can be integrated to rustbook at compile time is required.
Fix "hidden lifetime parameters in types are deprecated"
In the rustbook build, the following error is occured, it should be fixed.
error: hidden lifetime parameters in types are deprecated
--> /home/hatta/work/repos/mdbook-i18n-helpers/i18n-helpers/src/lib.rs:95:34
|
95 | fn expand_shortcut_link(tag: Tag) -> Tag {
| ^^^ expected lifetime parameter
|
= note: `-D elided-lifetimes-in-paths` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(elided_lifetimes_in_paths)]`
help: indicate the anonymous lifetime
|
95 | fn expand_shortcut_link(tag: Tag<'_>) -> Tag {
| ++++
Export Preprocessor struct for gettext
The bootstrap process of rust-lang/rust uses the original rustbook binary to build docs.
It uses mdbook crate as a library and the normal mdbook plugin system is not used.
So exporting Preprocessor struct which can be integrated to rustbook at compile time is required.
So far, we have not paid much attention to the library interface of mdbook-i18n-helpers, but I'm not against making it usable as a library. @kdarkhan has been making similar changes to enable us to do fuzz testing against the binaries.
The latest Rust by Example has a Japanese translation resource based on mdbook-i18n-helpers.
But it is not built because rust-lang/rust has the original mdbook build process which doesn't contain mdbook-i18n-helpers.
In my investigation, I found that the following changes are required to build it.
Export
Preprocessor
struct forgettext
The bootstrap process of rust-lang/rust uses the original
rustbook
binary to build docs.It uses
mdbook
crate as a library and the normal mdbook plugin system is not used.So exporting
Preprocessor
struct which can be integrated torustbook
at compile time is required.Fix "hidden lifetime parameters in types are deprecated"
In the
rustbook
build, the following error is occured, it should be fixed.regex
to1.9.4
regex 1.9.5
requiresmemchr 2.6.0
, but it is blocked by windows-gnu thin-lto test linking error regression rust-lang/rust#109797.I opened rust-lang/rust#124731.
It refers my forked mdbook-i18n-helpers https://github.com/dalance/mdbook-i18n-helpers/tree/export_preprocessor now.
How about the above changes?
The text was updated successfully, but these errors were encountered: