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 Fluent function to Tera, link to data context #21

Merged
merged 8 commits into from
Jun 23, 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
10 changes: 9 additions & 1 deletion .github/workflows/quick-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: --all-features -- -D warnings

quick_check-tests:
strategy:
fail-fast: false
matrix:
feature-flags:
- ''
- '--all-features'
runs-on: ubuntu-latest
steps:
- name: Install Rust stable toolchain
Expand All @@ -67,8 +73,10 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.feature-flags }}

- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: ${{ matrix.feature-flags }}
250 changes: 248 additions & 2 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ name = "teracli"
readme = "README.md"
version = "0.2.4"

[features]
default = []
fluent = ["fluent-templates"]

[dependencies]
clap = { version = "4", features = ["derive", "env", "unicode", "cargo"] }
env_logger = "0.10"
fluent-templates = { version = "0.8", optional = true, default-features = false, features = ["tera"]}
log = "0.4"
serde = "1.0"
serde_json = { version = "1.0", optional = false }
Expand Down
1 change: 1 addition & 0 deletions data/basic/fluent.tera
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ fluent(key="hello", name=en) }} {{ fluent(key="hello", lang="tr-TR", name=tr) }}
Loading