Fix the merged i18n guard: one ALL sweep, not two half-tests

This commit is contained in:
l0ng-ai
2026-08-08 03:51:59 +08:00
parent 2a9b4764bd
commit c2dcfe445f
-26
View File
@@ -1922,9 +1922,6 @@ mod tests {
for (name, text) in [("zh", translate_zh(key)), ("ja", translate_ja(key))] {
let text = text.unwrap_or_else(|| panic!("missing {name} translation for {key:?}"));
assert!(!text.is_empty(), "empty {name} translation for {key:?}");
// A value identical to the English one is usually a key that
// was added and never translated. Some are deliberate — see
// the list above — and product names carry through.
// A value byte-identical to the English one is almost always
// a key that was added and never translated. The exceptions
// are listed above, with the reason.
@@ -1933,29 +1930,6 @@ mod tests {
"{name} still reads the English for {key:?}: {en:?}"
);
}
L10nKey::SettingsSearchLanguageKeywords,
L10nKey::SettingsFontDefault,
L10nKey::ForwardDescriptionPlaceholder,
L10nKey::SettingsShellDefaultLoginShell,
L10nKey::SftpErrorUnexpectedReply,
L10nKey::SftpErrorUnsafeRemoteName,
L10nKey::SftpReplaceTitle,
L10nKey::SftpReplaceBody,
L10nKey::Replace,
L10nKey::SftpErrorInvalidOctalMode,
] {
assert!(
translate_zh(key).is_some_and(|text| !text.is_empty()),
"missing zh translation for {key:?}"
);
assert!(
translate_ja(key).is_some_and(|text| !text.is_empty()),
"missing ja translation for {key:?}"
);
assert!(
!translate_en(key).is_empty(),
"missing en translation for {key:?}"
);
}
}