refactor: Remove unused DB translation system
Static dictionary (i18n.ts CAR_TRANSLATIONS) already covers all terms. DB translations table had only 179 entries used as fallback and was never actually reached. Simplifies useTranslate hook to static-only. DB table preserved for safety. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,6 @@ from .car import CarMaker, CarModel, Car, CarImage, CarOption
|
||||
from .user import User, CarView, PerformanceCheckView, ChargeHistory, VerificationCode
|
||||
from .inquiry import Inquiry, InquiryMessage, InquiryStatus, InquiryCategory
|
||||
from .hero_banner import HeroBanner, HeroBannerSettings
|
||||
from .translation import Translation
|
||||
from .cache import CarCache, CarDetailCache, CacheRequestQueue
|
||||
from .settings import SystemSettings
|
||||
from .vehicle_request import VehicleRequest, RequestVehicle, PurchasedVehicle
|
||||
@@ -40,7 +39,6 @@ __all__ = [
|
||||
"InquiryCategory",
|
||||
"HeroBanner",
|
||||
"HeroBannerSettings",
|
||||
"Translation",
|
||||
"CarCache",
|
||||
"CarDetailCache",
|
||||
"CacheRequestQueue",
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
from sqlalchemy import Column, Integer, String, DateTime, Index
|
||||
from sqlalchemy.sql import func
|
||||
from ..database import Base
|
||||
|
||||
|
||||
class Translation(Base):
|
||||
"""Translation dictionary for car-related terms"""
|
||||
__tablename__ = "translations"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
|
||||
# Source text (Korean)
|
||||
source_text = Column(String(500), nullable=False, index=True)
|
||||
|
||||
# Category: maker, model, fuel, transmission, color, car_name, etc.
|
||||
category = Column(String(50), nullable=False, index=True)
|
||||
|
||||
# Translations
|
||||
text_en = Column(String(500)) # English
|
||||
text_mn = Column(String(500)) # Mongolian
|
||||
text_ru = Column(String(500)) # Russian
|
||||
|
||||
created_at = Column(DateTime, default=func.now())
|
||||
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
||||
|
||||
__table_args__ = (
|
||||
Index('ix_translations_source_category', 'source_text', 'category', unique=True),
|
||||
)
|
||||
Reference in New Issue
Block a user