Skip to content

Commit

Permalink
Extract only strings and comments from codeblock
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Oct 30, 2023
1 parent 3ef6572 commit e19b096
Show file tree
Hide file tree
Showing 8 changed files with 739 additions and 113 deletions.
237 changes: 237 additions & 0 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 i18n-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pulldown-cmark-to-cmark = "11.0.0"
regex = "1.9.4"
semver = "1.0.16"
serde_json = "1.0.91"
syntect = "5.1.0"
textwrap = { version = "0.16.0", default-features = false }

[dev-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions i18n-helpers/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ Itemized list:
- C should be translated.
````

Note that we don't extract the full text of code blocks. Only text that is recognized as comments and literal strings is extracted.

## Normalizing Existing PO Files

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

0 comments on commit e19b096

Please sign in to comment.