Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guide: Introduce translation to the german language #2

Open
wants to merge 126 commits into
base: master
Choose a base branch
from

Conversation

rzerres
Copy link

@rzerres rzerres commented Sep 15, 2021

Dear Ruin0x11,

i do maintain the documentation for the public OrbTk framework, The Rust UI Toolkit . As a Rust project it was quite nice to get hold of mdBook, that we did adopt very early and started work on a hight-level documentation. I am following the development of mdBook since then.

Lately i did realize, that you have created a PR to support language support just the way i wanted to handle the supported variants in sudirectories that can consume the leading english variant. At best, i can share listings for examples and images while using symbolic links inside the language variants, pointing to the documentation root. This is the clean approach i was lokking for. Thank you and all the committers for this work.

This weekend i took the time to translate the book-example to the german language. This was a great opportunity to get into the glitches, learning new features. With this knowledge on hand it will for sure improve our book.

Since upstream moved on, i tried to rebase on master (commit 93008cf). But this turned out to be nontrivial ...
I didn't succed to merge in your branch localization-3 to get a working mdbook branch wip_localization with your proposed changes. So I deleted it and just based on master. This is availabel in a clean branch wip_german.

I will update my translations in this branch. Commit descriptions should be obvious for a cherry-pick.

Just let me know, if i can help in a meaningful way. All the best
Ralf

Ruin0x11 and others added 23 commits September 15, 2021 13:53
The book paths have to gracefully degrade to the default language if
they aren't available.
- Add a [language] table to book.toml. Each key in the table defines a
new language with `name` and `default` properties.
- Changes the directory structure of localized books. If the [language]
table exists, mdBook will now assume the src/ directory contains
subdirectories named after the keys in [language]. The behavior is
backwards-compatible if you don't specify [language].
- Specify which language of book to build using the -l/--language
argument to `mdbook build` and similar, or omit to use the default
language.
- Specify the default language by setting the `default` property to
`true` in an entry in [language]. Exactly one language must have `default`
set to `true` if the [language] table is defined.
- Each language has its own SUMMARY.md. It can include links to files
not in other translations. If a link in SUMMARY.md refers to a
nonexistent file that is specified in the default language, the renderer
will gracefully degrade the link to the default language's page. If it
still doesn't exist, the config's `create_missing` option will be
respected instead.
Changes how the `book` module loads books. Now it is possible to load
all of the translations of a book and put them into a single output
folder. If a book is generated this way, a menu will be created in the
handlebars renderer for switching between languages.
We can't redirect in warp based on the URL, so redirect to the default
language's 404 page instead.

See: seanmonstar/warp#171
It will follow relative links to other pages and embedded images.
…cher-js

Only switch to themes on buttons that have the `theme` class
* new README
* new SUMMARY

Signed-off-by: Ralf Zerres <[email protected]>
GuillaumeGomez and others added 10 commits January 18, 2022 16:01
Update semver dev-dependency in nop-preprocessor example to 1.0
# Conflicts:
#	.gitignore
#	guide/src/en/cli/completions.md
#	guide/src/en/format/images/rust-logo-blk.svg
#	guide/src/en/format/markdown.md
#	guide/src/en/misc/introduction.md
#	src/renderer/html_handlebars/hbs_renderer.rs
#	src/utils/mod.rs
@rzerres rzerres force-pushed the wip_german branch 2 times, most recently from 43072f5 to a73a618 Compare March 20, 2022 02:48
@rzerres
Copy link
Author

rzerres commented Mar 20, 2022

rebased and updated with new subsections documentation

* move md files to guide/src/en/guide/

Signed-off-by: Ralf Zerres <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.