From 496ae58cb61d5898ff17d8d39335eb48562be49c Mon Sep 17 00:00:00 2001 From: Nutomic Date: Fri, 7 Feb 2025 16:44:41 +0000 Subject: [PATCH] Enable emails in Chinese (#5400) --- crates/utils/build.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/utils/build.rs b/crates/utils/build.rs index f40ac456..66b26b2b 100644 --- a/crates/utils/build.rs +++ b/crates/utils/build.rs @@ -6,7 +6,12 @@ fn main() -> Result<(), Box> { for path in read_dir("translations/email/")? { let path = path?.path(); if let Some(name) = path.file_name() { - let lang = name.to_string_lossy().to_string().replace(".json", ""); + let mut lang = name.to_string_lossy().to_string().replace(".json", ""); + + // Rename Chinese simplified variant because there is no translation zh + if lang == "zh_Hans" { + lang = "zh".to_string(); + } // Rosetta doesnt support these language variants. if lang.contains('_') { continue;