feat(glossaries): add target_language support - DB migration, API, and UI language pair display
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m52s

This commit is contained in:
2026-05-31 13:25:12 +02:00
parent fecb3f7abb
commit 85cd5456f8
7 changed files with 105 additions and 15 deletions

View File

@@ -331,6 +331,7 @@ class Glossary(Base):
)
name = Column(String(255), nullable=False)
source_language = Column(String(10), nullable=False, default="fr")
target_language = Column(String(10), nullable=True, default="en")
created_at = Column(DateTime, default=_utcnow)
updated_at = Column(DateTime, default=_utcnow, onupdate=_utcnow)
@@ -348,6 +349,7 @@ class Glossary(Base):
"user_id": self.user_id,
"name": self.name,
"source_language": self.source_language,
"target_language": self.target_language,
"terms": [term.to_dict() for term in self.terms] if self.terms else [],
"created_at": self.created_at.isoformat() if self.created_at else None,
"updated_at": self.updated_at.isoformat() if self.updated_at else None,