Enable emails in Chinese (#5400)

This commit is contained in:
Nutomic 2025-02-07 16:44:41 +00:00 committed by GitHub
parent b92853824f
commit 496ae58cb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
for path in read_dir("translations/email/")? { for path in read_dir("translations/email/")? {
let path = path?.path(); let path = path?.path();
if let Some(name) = path.file_name() { 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. // Rosetta doesnt support these language variants.
if lang.contains('_') { if lang.contains('_') {
continue; continue;