mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 12:45:17 +08:00
feat(glossary): 实现 Rust Glossary V1
This commit is contained in:
@@ -173,6 +173,12 @@ pub struct TranslationTaskUnitResult {
|
||||
pub provider_run_id: String,
|
||||
/// Result persistence time.
|
||||
pub translated_unix_seconds: u64,
|
||||
/// Deterministic Glossary QA result, when a project Glossary was available.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub glossary_qa: Option<bat_core::domain::GlossaryQaReport>,
|
||||
/// Explicit human confirmation for a blocking Glossary deviation.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub glossary_override: Option<bat_core::domain::GlossaryOverride>,
|
||||
}
|
||||
|
||||
/// Source of one persisted TextUnit translation result.
|
||||
@@ -1808,6 +1814,8 @@ mod tests {
|
||||
provider: "manual".to_string(),
|
||||
provider_run_id: "manual-run-1".to_string(),
|
||||
translated_unix_seconds: 321,
|
||||
glossary_qa: None,
|
||||
glossary_override: None,
|
||||
};
|
||||
|
||||
let updated = repository
|
||||
@@ -1927,6 +1935,8 @@ mod tests {
|
||||
provider: "mock".to_string(),
|
||||
provider_run_id: second_run.clone(),
|
||||
translated_unix_seconds: 1,
|
||||
glossary_qa: None,
|
||||
glossary_override: None,
|
||||
};
|
||||
|
||||
assert!(repository
|
||||
|
||||
Reference in New Issue
Block a user