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

Add support for skipping the next translation group #69

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mdbook = { version = "0.4.25", default-features = false }
polib = "0.2.0"
pulldown-cmark = { version = "0.9.2", default-features = false }
pulldown-cmark-to-cmark = "10.0.4"
regex = "1.9.4"
semver = "1.0.16"
serde_json = "1.0.91"

Expand Down
28 changes: 28 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,34 @@ Please see the [`publish.yml`] workflow in the Comprehensive Rust 🦀 repositor

[`publish.yml`]: https://github.com/google/comprehensive-rust/blob/main/.github/workflows/publish.yml

## Marking Sections to be Skipped for Translation

A block can be marked to be skipped for translation by prepending a special HTML
comment `<!--- mdbook-xgettext:skip -->` to it.

For example:

````markdown
The following code block should not be translated.

<!--- mdbook-xgettext:skip -->

```
fn hello() {
println!("Hello world!");
}
```

Itemized list:

- A should be translated.

<!--- mdbook-xgettext:skip -->

- B should be skipped.
- C should be translated.
````

## Normalizing Existing PO Files

When mdbook-i18n-helpers change, the generated PO files change as well. This can
Expand Down
Loading