Skip to content

Commit

Permalink
Add minor documentation on translation comments.
Browse files Browse the repository at this point in the history
This adds a small usage section on translation comments.
  • Loading branch information
dyoo committed Feb 21, 2024
1 parent 41ff1a6 commit 849ad28
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion i18n-helpers/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,30 @@ 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 with a comment

A block can be marked with a comment for translation by prepending a
special HTML comment `<!-- i18n:comment: XXX -->` in front of it.
Consecutive HTML comments will be collected into a single translation
comment.

For example:

````markdown
The following will have a comment attached to the message.

But what is a man,

<!-- i18n:comment: ...a miserable little pile of secrets. -->
<!-- i18n:comment: But enough talk! -->
what has he got. If not himself, then he has naught.
````


## Marking Sections to be Skipped for Translation

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

For example:

Expand Down

0 comments on commit 849ad28

Please sign in to comment.