fix cargo
Some checks failed
Deploy ailog / build-and-deploy (push) Failing after 14m42s

This commit is contained in:
2025-06-11 18:27:58 +09:00
parent ad45b151b1
commit eb5aa0a2be
23 changed files with 214 additions and 70 deletions

View File

@ -41,11 +41,13 @@ pub enum MarkdownSection {
}
pub trait Translator {
#[allow(dead_code)]
async fn translate(&self, content: &str, config: &TranslationConfig) -> Result<String>;
async fn translate_markdown(&self, content: &str, config: &TranslationConfig) -> Result<String>;
async fn translate_sections(&self, sections: Vec<MarkdownSection>, config: &TranslationConfig) -> Result<Vec<MarkdownSection>>;
}
#[allow(dead_code)]
pub struct TranslationResult {
pub original: String,
pub translated: String,
@ -56,6 +58,7 @@ pub struct TranslationResult {
}
#[derive(Debug, Clone, Default)]
#[allow(dead_code)]
pub struct TranslationMetrics {
pub character_count: usize,
pub word_count: usize,
@ -117,6 +120,7 @@ impl LanguageMapping {
self.mappings.get(code)
}
#[allow(dead_code)]
pub fn get_supported_languages(&self) -> Vec<String> {
self.mappings.keys().cloned().collect()
}