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
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m52s
This commit is contained in:
@@ -46,6 +46,9 @@ class GlossaryCreate(BaseModel):
|
||||
source_language: str = Field(
|
||||
default="fr", max_length=10, description="Langue source (ISO code)"
|
||||
)
|
||||
target_language: str = Field(
|
||||
default="en", max_length=10, description="Langue cible (ISO code)"
|
||||
)
|
||||
terms: list[GlossaryTermCreate] = Field(
|
||||
default_factory=list, description="Liste des termes"
|
||||
)
|
||||
@@ -61,6 +64,7 @@ class GlossaryUpdate(BaseModel):
|
||||
|
||||
name: Optional[str] = Field(None, min_length=1, max_length=255)
|
||||
source_language: Optional[str] = Field(None, max_length=10)
|
||||
target_language: Optional[str] = Field(None, max_length=10)
|
||||
terms: Optional[list[GlossaryTermCreate]] = Field(None)
|
||||
|
||||
@field_validator("name")
|
||||
@@ -75,6 +79,7 @@ class GlossaryResponse(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
source_language: str = "fr"
|
||||
target_language: str = "en"
|
||||
terms: list[GlossaryTermResponse] = []
|
||||
created_at: Optional[datetime] = None
|
||||
updated_at: Optional[datetime] = None
|
||||
@@ -88,6 +93,7 @@ class GlossaryListItem(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
source_language: str = "fr"
|
||||
target_language: str = "en"
|
||||
terms_count: int = Field(
|
||||
default=0, description="Nombre de termes dans le glossaire"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user