Skip to content

Commit ad93f73

Browse files
authored
Merge branch 'main' into renderer
2 parents c5e6500 + a551c69 commit ad93f73

File tree

14 files changed

+690
-417
lines changed

14 files changed

+690
-417
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
uses: actions/checkout@v3
2020

2121
- uses: Swatinem/rust-cache@v2
22+
with:
23+
save-if: ${{ github.ref == 'refs/heads/main' }}
2224

2325
- name: Test
2426
run: cargo test
@@ -35,19 +37,18 @@ jobs:
3537

3638
- uses: Swatinem/rust-cache@v2
3739
with:
38-
workspaces: fuzz -> target
40+
# Default is "v0-rust"
41+
# Use a separate key to prevent collision with main cache
42+
prefix-key: "fuzz"
43+
# Cache only on main build
44+
save-if: ${{ github.ref == 'refs/heads/main' }}
45+
cache-directories: |
46+
i18n-helpers/fuzz/target
47+
i18n-helpers/fuzz/corpus
3948
4049
- name: Install cargo-fuzz
4150
run: cargo install cargo-fuzz
4251

43-
- name: Cache fuzz corpus
44-
uses: actions/cache@v3
45-
with:
46-
path: fuzz/corpus
47-
key: fuzz-corpus-${{ github.run_id }}
48-
restore-keys: |
49-
fuzz-corpus
50-
5152
- name: Run group_events fuzzer and minimize corpus
5253
run: |
5354
cd i18n-helpers
@@ -60,6 +61,12 @@ jobs:
6061
cargo fuzz run normalize -- -only_ascii=1 -max_total_time=30
6162
cargo fuzz cmin normalize
6263
64+
- name: Run gettext fuzzer and minimize corpus
65+
run: |
66+
cd i18n-helpers
67+
cargo fuzz run gettext -- -only_ascii=1 -max_total_time=30
68+
cargo fuzz cmin normalize
69+
6370
clippy:
6471
name: Clippy
6572
runs-on: ubuntu-latest
@@ -70,7 +77,11 @@ jobs:
7077
- uses: Swatinem/rust-cache@v2
7178

7279
- name: Clippy
73-
run: cargo clippy -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr
80+
run: cargo clippy -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr -D clippy::all
81+
82+
- name: Clippy on fuzzers
83+
working-directory: ./i18n-helpers/fuzz
84+
run: cargo clippy -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr -D clippy::all
7485

7586
format:
7687
name: Format

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This lists the most important changes between releases.
44

5+
## Version 0.2.4 (2023-09-27)
6+
7+
- [#87]: Set the POT-Creation-Date field in newly generated POT files.
8+
59
## Version 0.2.3 (2023-09-19)
610

711
- [#75]: Automatically ignore code blocks without string literals and line
@@ -19,7 +23,7 @@ This lists the most important changes between releases.
1923
## Version 0.2.0 (2023-08-15)
2024

2125
> This is a breaking release. Please make sure to
22-
> [run `mdbook-i18n-normalize` on your existing PO files](USAGE.md)!
26+
> [run `mdbook-i18n-normalize` on your existing PO files](i18n-helpers/USAGE.md)!
2327
2428
- [#49]: Link to other projects which use mdbook-i18n-helpers.
2529
- [#46]: Add `mdbook-i18n-normalize` to convert existing PO files.
@@ -30,6 +34,7 @@ This lists the most important changes between releases.
3034

3135
First release as a stand-alone crate.
3236

37+
[#87]: https://github.com/google/mdbook-i18n-helpers/pull/87
3338
[#75]: https://github.com/google/mdbook-i18n-helpers/pull/75
3439
[#69]: https://github.com/google/mdbook-i18n-helpers/pull/69
3540
[#59]: https://github.com/google/mdbook-i18n-helpers/pull/59

Cargo.lock

Lines changed: 42 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
This repository contains the following crates that provide extensions and
99
infrastructure for [mdbook](https://github.com/rust-lang/mdBook/):
1010

11-
- [mdbook-i18n-helpers](./i18n-helpers/README.md): Gettext translation support
12-
for [mdbook](https://github.com/rust-lang/mdBook/)
11+
- [mdbook-i18n-helpers](i18n-helpers/README.md): Gettext translation support for
12+
[mdbook](https://github.com/rust-lang/mdBook/)
1313
- [mdbook-tera-backend](./mdbook-tera-backend/README.md): Tera templates extension
1414
for [mdbook](https://github.com/rust-lang/mdBook/)'s HTML renderer.
1515

@@ -35,10 +35,10 @@ Please add your project below if it uses
3535
Run
3636

3737
```shell
38-
$ cargo install mdbook-i18n-helpers
38+
cargo install mdbook-i18n-helpers
3939
```
4040

41-
Please see [USAGE](./i18n-helpers/USAGE.md) for how to translate your
41+
Please see [USAGE](i18n-helpers/USAGE.md) for how to translate your
4242
[mdbook](https://github.com/rust-lang/mdBook/) project.
4343

4444
### `mdbook-tera-backend`

i18n-helpers/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mdbook-i18n-helpers"
3-
version = "0.2.3"
3+
version = "0.2.4"
44
authors = ["Martin Geisler <[email protected]>"]
55
categories = ["command-line-utilities", "localization"]
66
edition = "2021"
@@ -19,6 +19,7 @@ pulldown-cmark-to-cmark = "11.0.0"
1919
regex = "1.9.4"
2020
semver = "1.0.16"
2121
serde_json = "1.0.91"
22+
textwrap = { version = "0.16.0", default-features = false }
2223

2324
[dev-dependencies]
2425
pretty_assertions = "1.3.0"

0 commit comments

Comments
 (0)