mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 13:08:07 -06:00
Merge pull request #2583 from zitann2020/i18n/ja-generate-category
i18n(ja): the Generate effect category is 描画
This commit is contained in:
@@ -772,12 +772,13 @@ const JAPANESE_CATEGORIES: &[(&str, &str)] = &[
|
||||
("Color Correction", "カラー補正"),
|
||||
("Distort", "ディストーション"),
|
||||
("Expression Controls", "式制御"),
|
||||
("Generate", "描画"),
|
||||
("Immersive Video", "イマーシブビデオ"),
|
||||
("Keying", "キーイング"),
|
||||
("Matte", "マット"),
|
||||
("Noise & Grain", "ノイズ&グレイン"),
|
||||
("Obsolete", "旧バージョン"),
|
||||
("Paint", "描画"),
|
||||
("Paint", "ペイント"),
|
||||
("Perspective", "遠近"),
|
||||
("Simulation", "シミュレーション"),
|
||||
("Stylize", "スタイライズ"),
|
||||
@@ -1283,3 +1284,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}`");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user