From d1866fb64b9ef708e64b75d676dd15862efef69e Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 5 Feb 2025 13:14:11 +0300 Subject: [PATCH 1/2] Compile tera with locale aware date function --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + 2 files changed, 8 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index bc8e9df..70feec0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -195,6 +195,7 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", + "pure-rust-locales", "windows-targets", ] @@ -940,6 +941,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "pure-rust-locales" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" + [[package]] name = "quote" version = "1.0.37" diff --git a/Cargo.toml b/Cargo.toml index 9b44f0c..b0e2ee6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ version = "0.4.0" [features] default = [] fluent = ["fluent-templates"] +locale = ["tera/date-locale"] env_logger = [] [dependencies] From 9201f6ba478ede38358ad1176937c4b4824c9c67 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Fri, 7 Feb 2025 23:27:57 +0300 Subject: [PATCH 2/2] Add 'full' feature to enable all optional features --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index b0e2ee6..53898be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ version = "0.4.0" [features] default = [] +full = ["fluent", "locale"] fluent = ["fluent-templates"] locale = ["tera/date-locale"] env_logger = []