i18n(ja): Paint and Generate must not draw the same category name

The Generate row added here drew 描画, which Paint already used, so the Effect menu showed the same
category name twice. 描画 is Adobe's name for Generate, so Paint becomes ペイント, and a test now
rejects two categories sharing a Japanese name.

Found by the review bot on this PR.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com>
This commit is contained in:
zitann2020
2026-10-30 01:30:04 +09:00
co-authored by DeepSeek V4.1 Flash
parent 2a6cece4ea
commit 373112b38b
+19 -1
View File
@@ -496,7 +496,7 @@ const JAPANESE_CATEGORIES: &[(&str, &str)] = &[
("Matte", "マット"),
("Noise & Grain", "ノイズ&グレイン"),
("Obsolete", "旧バージョン"),
("Paint", "描画"),
("Paint", "ペイント"),
("Perspective", "遠近"),
("Simulation", "シミュレーション"),
("Stylize", "スタイライズ"),
@@ -1002,3 +1002,21 @@ mod tests {
assert!(!matches("ec.blur.gaussian", "Gaussian Blur", "高斯"));
}
}
#[cfg(test)]
mod japanese_category_tests {
use super::*;
use std::collections::HashMap;
/// Two categories drawing the same Japanese name would make the Effect menu show one name twice and
/// leave the user unable to tell them apart. `描画` was both `Generate` and `Paint` before #2583.
#[test]
fn no_two_categories_share_a_japanese_name() {
let mut seen: HashMap<&str, &str> = HashMap::new();
for (english, japanese) in JAPANESE_CATEGORIES {
if let Some(other) = seen.insert(japanese, english) {
panic!("`{english}` and `{other}` both draw as `{japanese}`");
}
}
}
}