"""Lightweight runtime localization for the desktop GUI."""

from __future__ import annotations

import locale
from dataclasses import dataclass
from typing import Any

from PySide6.QtCore import QLocale, QObject, Qt
from PySide6.QtGui import QAction
from PySide6.QtWidgets import (
    QAbstractButton,
    QComboBox,
    QDialog,
    QGroupBox,
    QLabel,
    QLineEdit,
    QMainWindow,
    QMenu,
    QTabWidget,
    QTableWidget,
    QWidget,
)


@dataclass(frozen=True)
class LanguageOption:
    value: str
    label: str
    native_label: str


LANGUAGE_OPTIONS = [
    LanguageOption("system", "System default", "System default"),
    LanguageOption("en", "English", "English"),
    LanguageOption("zh", "Chinese", "中文"),
    LanguageOption("ja", "Japanese", "日本語"),
    LanguageOption("ko", "Korean", "한국어"),
    LanguageOption("es", "Spanish", "Español"),
    LanguageOption("fr", "French", "Français"),
    LanguageOption("de", "German", "Deutsch"),
    LanguageOption("pt", "Portuguese", "Português"),
    LanguageOption("ru", "Russian", "Русский"),
]

SUPPORTED_LANGUAGE_CODES = {option.value for option in LANGUAGE_OPTIONS if option.value != "system"}
_SOURCE_PROPERTY = "_insightface_i18n_source"
_PLACEHOLDER_PROPERTY = "_insightface_i18n_placeholder_source"
_GENERIC_BUTTON_TOOLTIP = {
    "zh": "点击执行：{action}。",
    "ja": "クリックして「{action}」を実行します。",
    "ko": "클릭하여 {action}을 실행합니다.",
    "es": "Haga clic para ejecutar: {action}.",
    "fr": "Cliquez pour exécuter : {action}.",
    "de": "Klicken, um auszuführen: {action}.",
    "pt": "Clique para executar: {action}.",
    "ru": "Нажмите, чтобы выполнить: {action}.",
}


def normalize_language(language: str | None) -> str:
    value = (language or "system").strip().replace("-", "_").lower()
    if value in {"auto", "default", "system_default"}:
        return "system"
    code = value.split("_", 1)[0]
    if code in SUPPORTED_LANGUAGE_CODES:
        return code
    return "system" if not value or value == "system" else "en"


def detect_system_language() -> str:
    candidates = []
    try:
        candidates.append(QLocale.system().name())
    except Exception:
        pass
    try:
        candidates.append(locale.getlocale()[0] or "")
    except Exception:
        pass
    for candidate in candidates:
        code = normalize_language(candidate)
        if code in SUPPORTED_LANGUAGE_CODES:
            return code
    return "en"


def effective_language(language: str | None) -> str:
    value = normalize_language(language)
    return detect_system_language() if value == "system" else value


def language_label(language: str | None) -> str:
    value = normalize_language(language)
    for option in LANGUAGE_OPTIONS:
        if option.value == value:
            return option.native_label
    return "English"


def tr(text: str, language: str | None = None) -> str:
    if not text:
        return text
    lang = effective_language(language)
    if lang == "en":
        return text
    return _TRANSLATIONS.get(lang, {}).get(text, text)


def apply_translations(root: Any, language: str | None) -> None:
    """Translate common Qt widget texts in-place with English fallback."""
    lang = effective_language(language)
    _translate_object(root, lang)
    if hasattr(root, "findChildren"):
        for obj in root.findChildren(QObject):
            _translate_object(obj, lang)


def _source_text(obj: Any, text: str, prop: str = _SOURCE_PROPERTY) -> str:
    source = obj.property(prop) if hasattr(obj, "property") else None
    if source is None and hasattr(obj, "setProperty"):
        obj.setProperty(prop, text)
        return text
    if source is not None and not _matches_source_or_translation(str(source), text) and hasattr(obj, "setProperty"):
        obj.setProperty(prop, text)
        return text
    return str(source)


def _matches_source_or_translation(source: str, text: str) -> bool:
    if text == source:
        return True
    return any(translations.get(source) == text for translations in _TRANSLATIONS.values())


def _help_source_text(obj: Any, text: str, prop: str) -> str:
    source = obj.property(prop) if hasattr(obj, "property") else None
    if source is None and hasattr(obj, "setProperty"):
        obj.setProperty(prop, text)
        return text
    if source is not None:
        if _matches_source_or_translation(str(source), text):
            return str(source)
        if isinstance(obj, QAbstractButton) and _looks_like_generic_button_tooltip(text):
            return str(source)
        if hasattr(obj, "setProperty"):
            obj.setProperty(prop, text)
            return text
    return str(source)


def _looks_like_generic_button_tooltip(text: str) -> bool:
    for template in _GENERIC_BUTTON_TOOLTIP.values():
        prefix, suffix = template.split("{action}", 1)
        if text.startswith(prefix) and text.endswith(suffix):
            return True
    return False


def _translate_object(obj: Any, lang: str) -> None:
    _translate_object_help(obj, lang)
    if isinstance(obj, (QDialog, QMainWindow)):
        title = obj.windowTitle()
        if title:
            obj.setWindowTitle(tr(_source_text(obj, title), lang))
    if isinstance(obj, QMenu):
        title = obj.title()
        if title:
            obj.setTitle(tr(_source_text(obj, title), lang))
    if isinstance(obj, QAction):
        text = obj.text()
        if text:
            obj.setText(tr(_source_text(obj, text), lang))
        _translate_action_help(obj, lang)
    if isinstance(obj, QLabel):
        text = obj.text()
        if text:
            obj.setText(tr(_source_text(obj, text), lang))
    if isinstance(obj, QAbstractButton):
        text = obj.text()
        if text:
            obj.setText(tr(_source_text(obj, text), lang))
    if isinstance(obj, QGroupBox):
        title = obj.title()
        if title:
            obj.setTitle(tr(_source_text(obj, title), lang))
    if isinstance(obj, QLineEdit):
        placeholder = obj.placeholderText()
        if placeholder:
            obj.setPlaceholderText(tr(_source_text(obj, placeholder, _PLACEHOLDER_PROPERTY), lang))
    if isinstance(obj, QTabWidget):
        for index in range(obj.count()):
            text = obj.tabText(index)
            key = f"{_SOURCE_PROPERTY}_tab_{index}"
            source = obj.property(key)
            if source is None:
                obj.setProperty(key, text)
                source = text
            obj.setTabText(index, tr(str(source), lang))
    if isinstance(obj, QComboBox) and obj.property("i18nItems"):
        for index in range(obj.count()):
            text = obj.itemText(index)
            source = obj.itemData(index, Qt.UserRole + 3000)
            if source is None:
                obj.setItemData(index, text, Qt.UserRole + 3000)
                source = text
            obj.setItemText(index, tr(str(source), lang))
    if isinstance(obj, QTableWidget):
        for index in range(obj.columnCount()):
            item = obj.horizontalHeaderItem(index)
            if item is not None:
                source = item.data(Qt.UserRole + 3000)
                if source is None:
                    source = item.text()
                    item.setData(Qt.UserRole + 3000, source)
                item.setText(tr(str(source), lang))


def _translate_object_help(obj: Any, lang: str) -> None:
    if not isinstance(obj, QWidget):
        return
    tooltip = obj.toolTip()
    if tooltip:
        tooltip_source = _help_source_text(obj, tooltip, f"{_SOURCE_PROPERTY}_tooltip")
        translated = tr(tooltip_source, lang)
        if translated == tooltip_source and lang != "en" and isinstance(obj, QAbstractButton):
            translated = _generic_button_tooltip(obj, lang)
        obj.setToolTip(translated)
    status_tip = obj.statusTip()
    if status_tip:
        obj.setStatusTip(tr(_source_text(obj, status_tip, f"{_SOURCE_PROPERTY}_status_tip"), lang))
    whats_this = obj.whatsThis()
    if whats_this:
        obj.setWhatsThis(tr(_source_text(obj, whats_this, f"{_SOURCE_PROPERTY}_whats_this"), lang))


def _translate_action_help(action: QAction, lang: str) -> None:
    tooltip = action.toolTip()
    if tooltip:
        action.setToolTip(tr(_source_text(action, tooltip, f"{_SOURCE_PROPERTY}_tooltip"), lang))
    status_tip = action.statusTip()
    if status_tip:
        action.setStatusTip(tr(_source_text(action, status_tip, f"{_SOURCE_PROPERTY}_status_tip"), lang))
    whats_this = action.whatsThis()
    if whats_this:
        action.setWhatsThis(tr(_source_text(action, whats_this, f"{_SOURCE_PROPERTY}_whats_this"), lang))


def _generic_button_tooltip(button: QAbstractButton, lang: str) -> str:
    source = button.property(_SOURCE_PROPERTY)
    if source is None:
        text = button.text().replace("&", "").strip()
        source = "Remove" if text == "×" else text
    action = tr(str(source), lang)
    if not action or action == "×":
        action = tr("Remove", lang)
    return _GENERIC_BUTTON_TOOLTIP.get(lang, "{action}").format(action=action)


_TRANSLATIONS: dict[str, dict[str, str]] = {
    "zh": {
        "System default": "跟随系统",
        "Settings": "设置",
        "Application Settings": "应用设置",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "此处仅配置界面外观。工作目录在首次启动后保持固定。",
        "UI theme": "界面主题",
        "Language": "语言",
        "Save": "保存",
        "Apply": "应用",
        "Cancel": "取消",
        "Models": "模型",
        "License": "授权",
        "Research / Non-commercial": "研究 / 非商业",
        "License Center": "授权中心",
        "Workflows": "工作流",
        "Choose the workspace for the task.": "选择当前任务的工作区。",
        "Enterprise Help": "企业支持",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "所有处理默认在本地完成。图片、特征和报告不会自动上传。",
        "Face Recognition": "人脸识别",
        "Album Management": "相册管理",
        "Face Swap": "人脸替换",
        "Enterprise Evaluation": "企业评测",
        "Query and gallery recognition": "查询图与底库识别",
        "Photo clustering and review": "照片聚类与复核",
        "Source + Target = Result": "源图 + 目标 = 结果",
        "Datasets, metrics, and reports": "数据集、指标与报告",
        "Upload a query face and recognize it against one gallery image or a local gallery.": "上传查询人脸，并与单张底库图或本地底库进行识别。",
        "Organize local photos by people, clusters, and searchable face groups.": "按人物、聚类和可搜索人脸组整理本地照片。",
        "Use a configured downloaded swap model for local image or video face swap.": "使用已配置并下载的换脸模型在本地处理图片或视频。",
        "Run local 1:1 and 1:N model evaluations and export reports.": "运行本地 1:1 和 1:N 模型评测并导出报告。",
        "Visit Homepage": "访问主页",
        "Contact Enterprise Support": "联系企业支持",
        "Usage": "用途",
        "Status": "状态",
        "Personal research": "个人研究",
        "Internal evaluation": "内部评估",
        "Commercial production": "商业生产",
        "Redistribution": "再分发",
        "SaaS / API usage": "SaaS / API 使用",
        "Face swap commercial usage": "换脸商业使用",
        "yes": "可以",
        "depends on model license": "取决于模型授权",
        "requires commercial model license": "需要商业模型授权",
        "requires explicit permission": "需要明确许可",
        "requires commercial agreement": "需要商业协议",
        "A concise local-use and commercial-deployment summary.": "本地使用与商业部署的简明说明。",
        "InsightFace Evaluation Studio runs locally and does not upload images, embeddings, videos, or reports automatically.": "InsightFace Evaluation Studio 在本地运行，不会自动上传图片、特征、视频或报告。",
        "Code and model files may have different licenses, and commercial deployment requires appropriate model authorization.": "代码和模型文件可能适用不同授权；商业部署需要相应的模型授权。",
        "Current package": "当前包",
        "Evaluation Setup": "评测设置",
        "Evaluation mode": "评测模式",
        "Data split": "数据切分",
        "Multi-face handling": "多人脸处理",
        "Dataset": "数据集",
        "Run": "运行",
        "Dataset Rules": "数据集规则",
        "Validate Dataset": "核验数据集",
        "Run Evaluation": "运行评测",
        "Export PDF": "导出 PDF",
        "Open Report Folder": "打开报告目录",
        "Validate the selected dataset and configuration before running evaluation.": "运行评测前请先核验所选数据集和配置。",
        "Validate the dataset before running an evaluation.": "运行评测前请先核验数据集。",
        "Dataset validation is required before running an evaluation.": "运行评测前需要完成数据集核验。",
        "Evaluation Dataset Rules": "评测数据集规则",
        "Prepare local identity folders using one of the supported layouts below.": "请按以下任一支持结构准备本地身份文件夹。",
        "Recognition threshold": "识别阈值",
        "Run Recognition": "运行识别",
        "Clear": "清空",
        "Query": "查询图",
        "Gallery": "底库",
        "Album": "相册",
        "Album directories": "相册目录",
        "Drag album folders into the directory list, or click Add Folder.": "将相册文件夹拖入目录列表，或点击“添加文件夹”。",
        "Import / Refresh": "导入 / 刷新",
        "Rebuild All": "全部重建",
        "Add Folder": "添加文件夹",
        "Remove Selected": "移除所选",
        "Cosine threshold": "余弦阈值",
        "Min samples": "最小样本数",
        "Minimum face size": "最小人脸尺寸",
        "Algorithm: DBSCAN": "算法：DBSCAN",
        "Thumbnail": "缩略图",
        "Photos": "照片",
        "File": "文件",
        "Faces in cluster": "聚类内人脸数",
        "Run Face Swap": "运行换脸",
        "Open Result Directory": "打开结果目录",
        "Source": "源图",
        "Target": "目标",
        "Result": "结果",
        "Result preview appears here. Video results are saved to the exports folder.": "结果预览会显示在这里。视频结果会保存到导出目录。",
        "Select": "选择",
        "Remove": "移除",
        "Click to upload or drag a folder here.": "点击上传，或将文件夹拖到这里。",
        "Click to upload or drag files here.": "点击上传，或将文件拖到这里。",
        "Click to upload or drag a file here.": "点击上传，或将文件拖到这里。",
        "File": "文件",
        "Open Workspace Folder": "打开工作目录",
        "Exit": "退出",
        "Mode": "模式",
        "Tools": "工具",
        "Help": "帮助",
        "About": "关于",
        "Responsible Use Notice": "负责任使用提示",
        "Ready": "就绪",
        "Model": "模型",
        "Provider": "运行后端",
        "DB": "数据库",
        "Coming soon": "即将推出",
    },
    "ja": {
        "System default": "システム既定",
        "Settings": "設定",
        "Application Settings": "アプリケーション設定",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "ここでは表示設定のみ変更できます。ワークスペースのパスは初回起動後に固定されます。",
        "UI theme": "UI テーマ",
        "Language": "言語",
        "Save": "保存",
        "Apply": "適用",
        "Cancel": "キャンセル",
        "Models": "モデル",
        "License": "ライセンス",
        "Research / Non-commercial": "研究 / 非商用",
        "License Center": "ライセンスセンター",
        "Workflows": "ワークフロー",
        "Choose the workspace for the task.": "作業内容に応じたワークスペースを選択します。",
        "Enterprise Help": "エンタープライズサポート",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "すべての処理はローカルで実行されます。画像、特徴量、レポートは自動的にアップロードされません。",
        "Face Recognition": "顔認識",
        "Album Management": "アルバム管理",
        "Face Swap": "顔交換",
        "Enterprise Evaluation": "エンタープライズ評価",
        "Query and gallery recognition": "クエリとギャラリー認識",
        "Photo clustering and review": "写真クラスタリングと確認",
        "Source + Target = Result": "ソース + ターゲット = 結果",
        "Datasets, metrics, and reports": "データセット、指標、レポート",
        "Upload a query face and recognize it against one gallery image or a local gallery.": "クエリ顔画像をアップロードし、1枚のギャラリー画像またはローカルギャラリーと照合します。",
        "Organize local photos by people, clusters, and searchable face groups.": "人物、クラスタ、検索可能な顔グループでローカル写真を整理します。",
        "Use a configured downloaded swap model for local image or video face swap.": "設定済みのダウンロード済み顔交換モデルで、画像または動画をローカル処理します。",
        "Run local 1:1 and 1:N model evaluations and export reports.": "ローカルの 1:1 / 1:N モデル評価を実行し、レポートを出力します。",
        "Visit Homepage": "ホームページを開く",
        "Contact Enterprise Support": "企業向けサポートに連絡",
        "Usage": "用途",
        "Status": "状態",
        "Personal research": "個人研究",
        "Internal evaluation": "社内評価",
        "Commercial production": "商用本番利用",
        "Redistribution": "再配布",
        "SaaS / API usage": "SaaS / API 利用",
        "Face swap commercial usage": "顔交換の商用利用",
        "yes": "可",
        "depends on model license": "モデルライセンスによります",
        "requires commercial model license": "商用モデルライセンスが必要",
        "requires explicit permission": "明示的な許可が必要",
        "requires commercial agreement": "商用契約が必要",
        "A concise local-use and commercial-deployment summary.": "ローカル利用と商用展開に関する簡潔な要約です。",
        "InsightFace Evaluation Studio runs locally and does not upload images, embeddings, videos, or reports automatically.": "InsightFace Evaluation Studio はローカルで動作し、画像、特徴量、動画、レポートを自動アップロードしません。",
        "Code and model files may have different licenses, and commercial deployment requires appropriate model authorization.": "コードとモデルファイルには異なるライセンスが適用される場合があり、商用展開には適切なモデル認可が必要です。",
        "Current package": "現在のパッケージ",
        "Evaluation Setup": "評価設定",
        "Evaluation mode": "評価モード",
        "Data split": "データ分割",
        "Multi-face handling": "複数顔の処理",
        "Dataset": "データセット",
        "Run": "実行",
        "Dataset Rules": "データセット規則",
        "Validate Dataset": "データセットを検証",
        "Run Evaluation": "評価を実行",
        "Export PDF": "PDF を出力",
        "Open Report Folder": "レポートフォルダを開く",
        "Validate the selected dataset and configuration before running evaluation.": "評価を実行する前に、選択したデータセットと設定を検証してください。",
        "Validate the dataset before running an evaluation.": "評価を実行する前にデータセットを検証してください。",
        "Dataset validation is required before running an evaluation.": "評価を実行する前にデータセット検証が必要です。",
        "Evaluation Dataset Rules": "評価データセット規則",
        "Prepare local identity folders using one of the supported layouts below.": "以下のいずれかの対応レイアウトでローカルの ID フォルダを準備してください。",
        "Recognition threshold": "認識しきい値",
        "Run Recognition": "認識を実行",
        "Clear": "クリア",
        "Query": "クエリ",
        "Gallery": "ギャラリー",
        "Album": "アルバム",
        "Album directories": "アルバムディレクトリ",
        "Drag album folders into the directory list, or click Add Folder.": "アルバムフォルダをリストにドラッグするか、「フォルダを追加」をクリックします。",
        "Import / Refresh": "インポート / 更新",
        "Rebuild All": "すべて再構築",
        "Add Folder": "フォルダを追加",
        "Remove Selected": "選択項目を削除",
        "Cosine threshold": "コサインしきい値",
        "Min samples": "最小サンプル数",
        "Minimum face size": "最小顔サイズ",
        "Algorithm: DBSCAN": "アルゴリズム: DBSCAN",
        "Thumbnail": "サムネイル",
        "Photos": "写真",
        "File": "ファイル",
        "Faces in cluster": "クラスタ内の顔数",
        "Run Face Swap": "顔交換を実行",
        "Open Result Directory": "結果ディレクトリを開く",
        "Source": "ソース",
        "Target": "ターゲット",
        "Result": "結果",
        "Result preview appears here. Video results are saved to the exports folder.": "結果プレビューがここに表示されます。動画結果はエクスポートフォルダに保存されます。",
        "Select": "選択",
        "Remove": "削除",
        "Click to upload or drag a folder here.": "クリックしてアップロード、またはフォルダをここにドラッグします。",
        "Click to upload or drag files here.": "クリックしてアップロード、またはファイルをここにドラッグします。",
        "Click to upload or drag a file here.": "クリックしてアップロード、またはファイルをここにドラッグします。",
        "Open Workspace Folder": "ワークスペースフォルダを開く",
        "Exit": "終了",
        "Mode": "モード",
        "Tools": "ツール",
        "Help": "ヘルプ",
        "About": "このアプリについて",
        "Responsible Use Notice": "責任ある利用に関する注意",
        "Ready": "準備完了",
        "Model": "モデル",
        "Provider": "プロバイダー",
        "DB": "DB",
        "Coming soon": "近日公開",
    },
    "ko": {
        "System default": "시스템 기본값",
        "Settings": "설정",
        "Application Settings": "애플리케이션 설정",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "여기서는 화면 표시 설정만 변경할 수 있습니다. 워크스페이스 경로는 최초 실행 후 고정됩니다.",
        "UI theme": "UI 테마",
        "Language": "언어",
        "Save": "저장",
        "Apply": "적용",
        "Cancel": "취소",
        "Models": "모델",
        "License": "라이선스",
        "Research / Non-commercial": "연구 / 비상업",
        "License Center": "라이선스 센터",
        "Workflows": "워크플로",
        "Choose the workspace for the task.": "작업에 맞는 워크스페이스를 선택합니다.",
        "Enterprise Help": "기업 지원",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "모든 처리는 로컬에서 수행됩니다. 이미지, 임베딩, 보고서는 자동으로 업로드되지 않습니다.",
        "Face Recognition": "얼굴 인식",
        "Album Management": "앨범 관리",
        "Face Swap": "얼굴 교체",
        "Enterprise Evaluation": "기업 평가",
        "Query and gallery recognition": "쿼리 및 갤러리 인식",
        "Photo clustering and review": "사진 클러스터링 및 검토",
        "Source + Target = Result": "소스 + 타깃 = 결과",
        "Datasets, metrics, and reports": "데이터셋, 지표, 보고서",
        "Upload a query face and recognize it against one gallery image or a local gallery.": "쿼리 얼굴을 업로드하고 단일 갤러리 이미지 또는 로컬 갤러리와 비교합니다.",
        "Organize local photos by people, clusters, and searchable face groups.": "로컬 사진을 인물, 클러스터, 검색 가능한 얼굴 그룹으로 정리합니다.",
        "Use a configured downloaded swap model for local image or video face swap.": "설정된 다운로드 얼굴 교체 모델로 이미지 또는 비디오를 로컬 처리합니다.",
        "Run local 1:1 and 1:N model evaluations and export reports.": "로컬 1:1 및 1:N 모델 평가를 실행하고 보고서를 내보냅니다.",
        "Visit Homepage": "홈페이지 방문",
        "Contact Enterprise Support": "기업 지원 문의",
        "Usage": "용도",
        "Status": "상태",
        "Personal research": "개인 연구",
        "Internal evaluation": "내부 평가",
        "Commercial production": "상용 운영",
        "Redistribution": "재배포",
        "SaaS / API usage": "SaaS / API 사용",
        "Face swap commercial usage": "얼굴 교체 상용 사용",
        "yes": "가능",
        "depends on model license": "모델 라이선스에 따라 다름",
        "requires commercial model license": "상용 모델 라이선스 필요",
        "requires explicit permission": "명시적 허가 필요",
        "requires commercial agreement": "상용 계약 필요",
        "A concise local-use and commercial-deployment summary.": "로컬 사용 및 상용 배포에 대한 간단한 요약입니다.",
        "InsightFace Evaluation Studio runs locally and does not upload images, embeddings, videos, or reports automatically.": "InsightFace Evaluation Studio는 로컬에서 실행되며 이미지, 임베딩, 비디오, 보고서를 자동 업로드하지 않습니다.",
        "Code and model files may have different licenses, and commercial deployment requires appropriate model authorization.": "코드와 모델 파일에는 서로 다른 라이선스가 적용될 수 있으며, 상용 배포에는 적절한 모델 승인이 필요합니다.",
        "Current package": "현재 패키지",
        "Evaluation Setup": "평가 설정",
        "Evaluation mode": "평가 모드",
        "Data split": "데이터 분할",
        "Multi-face handling": "다중 얼굴 처리",
        "Dataset": "데이터셋",
        "Run": "실행",
        "Dataset Rules": "데이터셋 규칙",
        "Validate Dataset": "데이터셋 검증",
        "Run Evaluation": "평가 실행",
        "Export PDF": "PDF 내보내기",
        "Open Report Folder": "보고서 폴더 열기",
        "Recognition threshold": "인식 임계값",
        "Run Recognition": "인식 실행",
        "Clear": "지우기",
        "Query": "쿼리",
        "Gallery": "갤러리",
        "Album": "앨범",
        "Album directories": "앨범 디렉터리",
        "Import / Refresh": "가져오기 / 새로고침",
        "Rebuild All": "전체 재구축",
        "Add Folder": "폴더 추가",
        "Remove Selected": "선택 항목 제거",
        "Cosine threshold": "코사인 임계값",
        "Min samples": "최소 샘플 수",
        "Minimum face size": "최소 얼굴 크기",
        "Thumbnail": "썸네일",
        "Photos": "사진",
        "File": "파일",
        "Faces in cluster": "클러스터 내 얼굴 수",
        "Run Face Swap": "얼굴 교체 실행",
        "Open Result Directory": "결과 디렉터리 열기",
        "Source": "소스",
        "Target": "타깃",
        "Result": "결과",
        "Select": "선택",
        "Remove": "제거",
        "Open Workspace Folder": "워크스페이스 폴더 열기",
        "Exit": "종료",
        "Mode": "모드",
        "Tools": "도구",
        "Help": "도움말",
        "About": "정보",
        "Responsible Use Notice": "책임 있는 사용 안내",
        "Ready": "준비됨",
        "Model": "모델",
        "Provider": "프로바이더",
        "DB": "DB",
        "Coming soon": "출시 예정",
    },
    "es": {
        "System default": "Predeterminado del sistema",
        "Settings": "Configuración",
        "Application Settings": "Configuración de la aplicación",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "Aquí solo se configuran opciones de apariencia. Las rutas del espacio de trabajo quedan fijadas después del primer inicio.",
        "UI theme": "Tema de interfaz",
        "Language": "Idioma",
        "Save": "Guardar",
        "Apply": "Aplicar",
        "Cancel": "Cancelar",
        "Models": "Modelos",
        "License": "Licencia",
        "Research / Non-commercial": "Investigación / no comercial",
        "License Center": "Centro de licencias",
        "Workflows": "Flujos de trabajo",
        "Choose the workspace for the task.": "Elija el espacio de trabajo para la tarea.",
        "Enterprise Help": "Soporte empresarial",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "Todo el procesamiento es local. No se suben automáticamente imágenes, embeddings ni informes.",
        "Face Recognition": "Reconocimiento facial",
        "Album Management": "Gestión de álbumes",
        "Face Swap": "Intercambio facial",
        "Enterprise Evaluation": "Evaluación empresarial",
        "Query and gallery recognition": "Reconocimiento de consulta y galería",
        "Photo clustering and review": "Agrupación y revisión de fotos",
        "Source + Target = Result": "Origen + destino = resultado",
        "Datasets, metrics, and reports": "Conjuntos de datos, métricas e informes",
        "Visit Homepage": "Visitar sitio principal",
        "Contact Enterprise Support": "Contactar soporte empresarial",
        "Usage": "Uso",
        "Status": "Estado",
        "Personal research": "Investigación personal",
        "Internal evaluation": "Evaluación interna",
        "Commercial production": "Producción comercial",
        "Redistribution": "Redistribución",
        "SaaS / API usage": "Uso SaaS / API",
        "Face swap commercial usage": "Uso comercial de intercambio facial",
        "yes": "sí",
        "depends on model license": "depende de la licencia del modelo",
        "requires commercial model license": "requiere licencia comercial del modelo",
        "requires explicit permission": "requiere permiso explícito",
        "requires commercial agreement": "requiere acuerdo comercial",
        "Current package": "Paquete actual",
        "Evaluation Setup": "Configuración de evaluación",
        "Evaluation mode": "Modo de evaluación",
        "Data split": "División de datos",
        "Multi-face handling": "Tratamiento de varias caras",
        "Dataset": "Datos",
        "Run": "Ejecutar",
        "Dataset Rules": "Reglas del conjunto de datos",
        "Validate Dataset": "Validar datos",
        "Run Evaluation": "Ejecutar evaluación",
        "Export PDF": "Exportar PDF",
        "Open Report Folder": "Abrir carpeta de informes",
        "Recognition threshold": "Umbral de reconocimiento",
        "Run Recognition": "Ejecutar reconocimiento",
        "Clear": "Limpiar",
        "Query": "Consulta",
        "Gallery": "Galería",
        "Album": "Álbum",
        "Album directories": "Directorios de álbum",
        "Import / Refresh": "Importar / actualizar",
        "Rebuild All": "Reconstruir todo",
        "Add Folder": "Añadir carpeta",
        "Remove Selected": "Quitar selección",
        "Cosine threshold": "Umbral coseno",
        "Min samples": "Muestras mínimas",
        "Minimum face size": "Tamaño mínimo de cara",
        "Thumbnail": "Miniatura",
        "Photos": "Fotos",
        "File": "Archivo",
        "Faces in cluster": "Caras en el grupo",
        "Run Face Swap": "Ejecutar intercambio facial",
        "Open Result Directory": "Abrir directorio de resultados",
        "Source": "Origen",
        "Target": "Destino",
        "Result": "Resultado",
        "Select": "Seleccionar",
        "Remove": "Quitar",
        "Open Workspace Folder": "Abrir carpeta de trabajo",
        "Exit": "Salir",
        "Mode": "Modo",
        "Tools": "Herramientas",
        "Help": "Ayuda",
        "About": "Acerca de",
        "Responsible Use Notice": "Aviso de uso responsable",
        "Ready": "Listo",
        "Model": "Modelo",
        "Provider": "Proveedor",
        "DB": "BD",
        "Coming soon": "Próximamente",
    },
    "fr": {
        "System default": "Valeur système",
        "Settings": "Paramètres",
        "Application Settings": "Paramètres de l’application",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "Seuls les paramètres d’apparence sont configurables ici. Les chemins de l’espace de travail sont figés après le premier lancement.",
        "UI theme": "Thème d’interface",
        "Language": "Langue",
        "Save": "Enregistrer",
        "Apply": "Appliquer",
        "Cancel": "Annuler",
        "Models": "Modèles",
        "License": "Licence",
        "Research / Non-commercial": "Recherche / non commercial",
        "License Center": "Centre de licences",
        "Workflows": "Flux de travail",
        "Choose the workspace for the task.": "Choisissez l’espace de travail adapté à la tâche.",
        "Enterprise Help": "Support entreprise",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "Tous les traitements sont locaux. Aucune image, embedding ni rapport n’est téléversé automatiquement.",
        "Face Recognition": "Reconnaissance faciale",
        "Album Management": "Gestion d’albums",
        "Face Swap": "Échange de visages",
        "Enterprise Evaluation": "Évaluation entreprise",
        "Query and gallery recognition": "Reconnaissance requête et galerie",
        "Photo clustering and review": "Clustering et revue des photos",
        "Source + Target = Result": "Source + cible = résultat",
        "Datasets, metrics, and reports": "Jeux de données, métriques et rapports",
        "Visit Homepage": "Visiter le site",
        "Contact Enterprise Support": "Contacter le support entreprise",
        "Usage": "Usage",
        "Status": "Statut",
        "Personal research": "Recherche personnelle",
        "Internal evaluation": "Évaluation interne",
        "Commercial production": "Production commerciale",
        "Redistribution": "Redistribution",
        "SaaS / API usage": "Usage SaaS / API",
        "Face swap commercial usage": "Usage commercial du face swap",
        "yes": "oui",
        "depends on model license": "dépend de la licence du modèle",
        "requires commercial model license": "requiert une licence commerciale du modèle",
        "requires explicit permission": "requiert une autorisation explicite",
        "requires commercial agreement": "requiert un accord commercial",
        "Current package": "Package actuel",
        "Evaluation Setup": "Configuration de l’évaluation",
        "Evaluation mode": "Mode d’évaluation",
        "Data split": "Répartition des données",
        "Multi-face handling": "Gestion des visages multiples",
        "Dataset": "Jeu de données",
        "Run": "Exécuter",
        "Dataset Rules": "Règles du jeu de données",
        "Validate Dataset": "Valider le jeu de données",
        "Run Evaluation": "Lancer l’évaluation",
        "Export PDF": "Exporter en PDF",
        "Open Report Folder": "Ouvrir le dossier des rapports",
        "Recognition threshold": "Seuil de reconnaissance",
        "Run Recognition": "Lancer la reconnaissance",
        "Clear": "Effacer",
        "Query": "Requête",
        "Gallery": "Galerie",
        "Album": "Album",
        "Album directories": "Dossiers d’album",
        "Import / Refresh": "Importer / actualiser",
        "Rebuild All": "Tout reconstruire",
        "Add Folder": "Ajouter un dossier",
        "Remove Selected": "Retirer la sélection",
        "Cosine threshold": "Seuil cosinus",
        "Min samples": "Échantillons min.",
        "Minimum face size": "Taille minimale du visage",
        "Thumbnail": "Vignette",
        "Photos": "Photos",
        "File": "Fichier",
        "Faces in cluster": "Visages dans le cluster",
        "Run Face Swap": "Lancer le face swap",
        "Open Result Directory": "Ouvrir le dossier des résultats",
        "Source": "Source",
        "Target": "Cible",
        "Result": "Résultat",
        "Select": "Sélectionner",
        "Remove": "Retirer",
        "Open Workspace Folder": "Ouvrir l’espace de travail",
        "Exit": "Quitter",
        "Mode": "Mode",
        "Tools": "Outils",
        "Help": "Aide",
        "About": "À propos",
        "Responsible Use Notice": "Avis d’utilisation responsable",
        "Ready": "Prêt",
        "Model": "Modèle",
        "Provider": "Fournisseur",
        "DB": "BD",
        "Coming soon": "Bientôt disponible",
    },
    "de": {
        "System default": "Systemstandard",
        "Settings": "Einstellungen",
        "Application Settings": "Anwendungseinstellungen",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "Hier können nur Darstellungseinstellungen geändert werden. Workspace-Pfade sind nach dem ersten Start festgelegt.",
        "UI theme": "UI-Design",
        "Language": "Sprache",
        "Save": "Speichern",
        "Apply": "Anwenden",
        "Cancel": "Abbrechen",
        "Models": "Modelle",
        "License": "Lizenz",
        "Research / Non-commercial": "Forschung / nicht kommerziell",
        "License Center": "Lizenzzentrum",
        "Workflows": "Workflows",
        "Choose the workspace for the task.": "Wählen Sie den Arbeitsbereich für die Aufgabe.",
        "Enterprise Help": "Enterprise-Support",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "Alle Verarbeitung erfolgt lokal. Bilder, Embeddings und Berichte werden nicht automatisch hochgeladen.",
        "Face Recognition": "Gesichtserkennung",
        "Album Management": "Albumverwaltung",
        "Face Swap": "Face Swap",
        "Enterprise Evaluation": "Enterprise-Evaluierung",
        "Query and gallery recognition": "Query- und Galerieerkennung",
        "Photo clustering and review": "Fotoclustering und Prüfung",
        "Source + Target = Result": "Quelle + Ziel = Ergebnis",
        "Datasets, metrics, and reports": "Datensätze, Metriken und Berichte",
        "Visit Homepage": "Homepage besuchen",
        "Contact Enterprise Support": "Enterprise-Support kontaktieren",
        "Usage": "Nutzung",
        "Status": "Status",
        "Personal research": "Persönliche Forschung",
        "Internal evaluation": "Interne Evaluierung",
        "Commercial production": "Kommerzieller Produktivbetrieb",
        "Redistribution": "Weiterverteilung",
        "SaaS / API usage": "SaaS- / API-Nutzung",
        "Face swap commercial usage": "Kommerzielle Face-Swap-Nutzung",
        "yes": "ja",
        "depends on model license": "abhängig von der Modelllizenz",
        "requires commercial model license": "erfordert eine kommerzielle Modelllizenz",
        "requires explicit permission": "erfordert ausdrückliche Genehmigung",
        "requires commercial agreement": "erfordert eine kommerzielle Vereinbarung",
        "Current package": "Aktuelles Paket",
        "Evaluation Setup": "Evaluierung einrichten",
        "Evaluation mode": "Evaluierungsmodus",
        "Data split": "Datenaufteilung",
        "Multi-face handling": "Umgang mit mehreren Gesichtern",
        "Dataset": "Datensatz",
        "Run": "Ausführen",
        "Dataset Rules": "Datensatzregeln",
        "Validate Dataset": "Datensatz validieren",
        "Run Evaluation": "Evaluierung starten",
        "Export PDF": "PDF exportieren",
        "Open Report Folder": "Berichtsordner öffnen",
        "Recognition threshold": "Erkennungsschwelle",
        "Run Recognition": "Erkennung starten",
        "Clear": "Leeren",
        "Query": "Abfrage",
        "Gallery": "Galerie",
        "Album": "Album",
        "Album directories": "Albumordner",
        "Import / Refresh": "Importieren / aktualisieren",
        "Rebuild All": "Alles neu erstellen",
        "Add Folder": "Ordner hinzufügen",
        "Remove Selected": "Auswahl entfernen",
        "Cosine threshold": "Kosinus-Schwelle",
        "Min samples": "Min. Stichproben",
        "Minimum face size": "Minimale Gesichtsgröße",
        "Thumbnail": "Miniatur",
        "Photos": "Fotos",
        "File": "Datei",
        "Faces in cluster": "Gesichter im Cluster",
        "Run Face Swap": "Face Swap ausführen",
        "Open Result Directory": "Ergebnisordner öffnen",
        "Source": "Quelle",
        "Target": "Ziel",
        "Result": "Ergebnis",
        "Select": "Auswählen",
        "Remove": "Entfernen",
        "Open Workspace Folder": "Workspace-Ordner öffnen",
        "Exit": "Beenden",
        "Mode": "Modus",
        "Tools": "Werkzeuge",
        "Help": "Hilfe",
        "About": "Info",
        "Responsible Use Notice": "Hinweis zur verantwortungsvollen Nutzung",
        "Ready": "Bereit",
        "Model": "Modell",
        "Provider": "Provider",
        "DB": "DB",
        "Coming soon": "Demnächst",
    },
    "pt": {
        "System default": "Padrão do sistema",
        "Settings": "Definições",
        "Application Settings": "Definições da aplicação",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "Aqui só pode configurar a aparência. Os caminhos do workspace ficam fixos após o primeiro arranque.",
        "UI theme": "Tema da interface",
        "Language": "Idioma",
        "Save": "Guardar",
        "Apply": "Aplicar",
        "Cancel": "Cancelar",
        "Models": "Modelos",
        "License": "Licença",
        "Research / Non-commercial": "Investigação / não comercial",
        "License Center": "Centro de licenças",
        "Workflows": "Fluxos de trabalho",
        "Choose the workspace for the task.": "Escolha o workspace para a tarefa.",
        "Enterprise Help": "Suporte empresarial",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "Todo o processamento é local. Imagens, embeddings e relatórios não são carregados automaticamente.",
        "Face Recognition": "Reconhecimento facial",
        "Album Management": "Gestão de álbuns",
        "Face Swap": "Troca de rostos",
        "Enterprise Evaluation": "Avaliação empresarial",
        "Query and gallery recognition": "Reconhecimento de consulta e galeria",
        "Photo clustering and review": "Agrupamento e revisão de fotos",
        "Source + Target = Result": "Origem + destino = resultado",
        "Datasets, metrics, and reports": "Conjuntos de dados, métricas e relatórios",
        "Visit Homepage": "Visitar página inicial",
        "Contact Enterprise Support": "Contactar suporte empresarial",
        "Usage": "Utilização",
        "Status": "Estado",
        "Personal research": "Investigação pessoal",
        "Internal evaluation": "Avaliação interna",
        "Commercial production": "Produção comercial",
        "Redistribution": "Redistribuição",
        "SaaS / API usage": "Utilização SaaS / API",
        "Face swap commercial usage": "Uso comercial de troca de rostos",
        "yes": "sim",
        "depends on model license": "depende da licença do modelo",
        "requires commercial model license": "requer licença comercial do modelo",
        "requires explicit permission": "requer autorização explícita",
        "requires commercial agreement": "requer acordo comercial",
        "Current package": "Pacote atual",
        "Evaluation Setup": "Configuração da avaliação",
        "Evaluation mode": "Modo de avaliação",
        "Data split": "Divisão de dados",
        "Multi-face handling": "Tratamento de múltiplos rostos",
        "Dataset": "Dados",
        "Run": "Executar",
        "Dataset Rules": "Regras do conjunto de dados",
        "Validate Dataset": "Validar dados",
        "Run Evaluation": "Executar avaliação",
        "Export PDF": "Exportar PDF",
        "Open Report Folder": "Abrir pasta de relatórios",
        "Recognition threshold": "Limiar de reconhecimento",
        "Run Recognition": "Executar reconhecimento",
        "Clear": "Limpar",
        "Query": "Consulta",
        "Gallery": "Galeria",
        "Album": "Álbum",
        "Album directories": "Diretórios de álbum",
        "Import / Refresh": "Importar / atualizar",
        "Rebuild All": "Reconstruir tudo",
        "Add Folder": "Adicionar pasta",
        "Remove Selected": "Remover seleção",
        "Cosine threshold": "Limiar de cosseno",
        "Min samples": "Amostras mínimas",
        "Minimum face size": "Tamanho mínimo do rosto",
        "Thumbnail": "Miniatura",
        "Photos": "Fotos",
        "File": "Ficheiro",
        "Faces in cluster": "Rostos no cluster",
        "Run Face Swap": "Executar troca de rostos",
        "Open Result Directory": "Abrir diretório de resultados",
        "Source": "Origem",
        "Target": "Destino",
        "Result": "Resultado",
        "Select": "Selecionar",
        "Remove": "Remover",
        "Open Workspace Folder": "Abrir pasta do workspace",
        "Exit": "Sair",
        "Mode": "Modo",
        "Tools": "Ferramentas",
        "Help": "Ajuda",
        "About": "Sobre",
        "Responsible Use Notice": "Aviso de utilização responsável",
        "Ready": "Pronto",
        "Model": "Modelo",
        "Provider": "Fornecedor",
        "DB": "BD",
        "Coming soon": "Em breve",
    },
    "ru": {
        "System default": "Как в системе",
        "Settings": "Настройки",
        "Application Settings": "Настройки приложения",
        "Only appearance settings are configurable here. Workspace paths are fixed after first launch.": "Здесь настраивается только внешний вид. Пути рабочей области фиксируются после первого запуска.",
        "UI theme": "Тема интерфейса",
        "Language": "Язык",
        "Save": "Сохранить",
        "Apply": "Применить",
        "Cancel": "Отмена",
        "Models": "Модели",
        "License": "Лицензия",
        "Research / Non-commercial": "Исследование / некоммерческое использование",
        "License Center": "Центр лицензий",
        "Workflows": "Рабочие процессы",
        "Choose the workspace for the task.": "Выберите рабочую область для задачи.",
        "Enterprise Help": "Поддержка для бизнеса",
        "All processing is local. No images, embeddings, or reports are uploaded automatically.": "Вся обработка выполняется локально. Изображения, эмбеддинги и отчёты не загружаются автоматически.",
        "Face Recognition": "Распознавание лиц",
        "Album Management": "Управление альбомами",
        "Face Swap": "Замена лиц",
        "Enterprise Evaluation": "Корпоративная оценка",
        "Query and gallery recognition": "Распознавание запроса и галереи",
        "Photo clustering and review": "Кластеризация и проверка фото",
        "Source + Target = Result": "Источник + цель = результат",
        "Datasets, metrics, and reports": "Датасеты, метрики и отчёты",
        "Visit Homepage": "Открыть сайт",
        "Contact Enterprise Support": "Связаться с поддержкой",
        "Usage": "Использование",
        "Status": "Статус",
        "Personal research": "Личное исследование",
        "Internal evaluation": "Внутренняя оценка",
        "Commercial production": "Коммерческий продакшен",
        "Redistribution": "Повторное распространение",
        "SaaS / API usage": "Использование SaaS / API",
        "Face swap commercial usage": "Коммерческое использование замены лиц",
        "yes": "да",
        "depends on model license": "зависит от лицензии модели",
        "requires commercial model license": "требуется коммерческая лицензия модели",
        "requires explicit permission": "требуется явное разрешение",
        "requires commercial agreement": "требуется коммерческое соглашение",
        "Current package": "Текущий пакет",
        "Evaluation Setup": "Настройка оценки",
        "Evaluation mode": "Режим оценки",
        "Data split": "Разделение данных",
        "Multi-face handling": "Обработка нескольких лиц",
        "Dataset": "Датасет",
        "Run": "Запуск",
        "Dataset Rules": "Правила датасета",
        "Validate Dataset": "Проверить датасет",
        "Run Evaluation": "Запустить оценку",
        "Export PDF": "Экспорт PDF",
        "Open Report Folder": "Открыть папку отчётов",
        "Recognition threshold": "Порог распознавания",
        "Run Recognition": "Запустить распознавание",
        "Clear": "Очистить",
        "Query": "Запрос",
        "Gallery": "Галерея",
        "Album": "Альбом",
        "Album directories": "Папки альбомов",
        "Import / Refresh": "Импорт / обновление",
        "Rebuild All": "Перестроить всё",
        "Add Folder": "Добавить папку",
        "Remove Selected": "Удалить выбранное",
        "Cosine threshold": "Косинусный порог",
        "Min samples": "Мин. образцов",
        "Minimum face size": "Мин. размер лица",
        "Thumbnail": "Миниатюра",
        "Photos": "Фото",
        "File": "Файл",
        "Faces in cluster": "Лиц в кластере",
        "Run Face Swap": "Запустить замену лиц",
        "Open Result Directory": "Открыть папку результатов",
        "Source": "Источник",
        "Target": "Цель",
        "Result": "Результат",
        "Select": "Выбрать",
        "Remove": "Удалить",
        "Open Workspace Folder": "Открыть рабочую папку",
        "Exit": "Выход",
        "Mode": "Режим",
        "Tools": "Инструменты",
        "Help": "Справка",
        "About": "О программе",
        "Responsible Use Notice": "Уведомление об ответственном использовании",
        "Ready": "Готово",
        "Model": "Модель",
        "Provider": "Провайдер",
        "DB": "БД",
        "Coming soon": "Скоро",
    },
}


_EXTRA_TRANSLATIONS: dict[str, dict[str, str]] = {
    "zh": {
        "About": "关于",
        "Add Person": "添加人员",
        "Add as New Person": "添加为新人员",
        "Anonymize report paths": "匿名化报告路径",
        "Assign to Existing Person": "分配给已有人员",
        "Auto": "自动",
        "Browse": "浏览",
        "Camera index": "摄像头索引",
        "Check Cameras": "检查摄像头",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "点击导入图片或文件夹，或拖拽到这里。文件夹会递归导入。",
        "Click to upload images or a folder, or drag them here": "点击上传图片或文件夹，或拖拽到这里",
        "Clustering is approximate. Please review and correct groups manually.": "聚类结果是近似的，请人工复核并修正分组。",
        "Compare": "比对",
        "Custom model directory": "自定义模型目录",
        "DBSCAN distance threshold": "DBSCAN 距离阈值",
        "Delete": "删除",
        "Delete Selected": "删除所选",
        "Download Selected": "下载所选",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "请先在 Models > Downloads 中下载 GFPGANv1.4.onnx。",
        "Download inswapper_128.onnx from Models > Downloads first.": "请先在 Models > Downloads 中下载 inswapper_128.onnx。",
        "Downloads are manual only. The GUI does not auto-download models. Model files may have different licenses from code; review usage before deployment.": "模型下载仅由用户手动触发，GUI 不会自动下载模型。模型文件和代码可能适用不同授权，部署前请核查使用范围。",
        "Drag one or more album folders here, or use Add Folder.": "将一个或多个相册文件夹拖到这里，或使用“添加文件夹”。",
        "Export": "导出",
        "Export All Summary": "导出全部摘要",
        "Export Annotated Image": "导出标注图片",
        "Export CSV": "导出 CSV",
        "Export CSV / JSON": "导出 CSV / JSON",
        "Export Result": "导出结果",
        "Export Results": "导出结果",
        "Export Settings": "导出设置",
        "Export Summary": "导出摘要",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "根据使用场景和模型授权，换脸功能可能需要单独的商业授权。请仅在拥有适当权利和同意的情况下使用。",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "边界框宽度或高度小于该值的人脸会被跳过。",
        "Frame interval": "帧间隔",
        "Frame skip": "跳帧",
        "ID": "ID",
        "Identify people": "识别人员",
        "Import Image or Folder": "导入图片或文件夹",
        "Import Settings": "导入设置",
        "Minimum neighboring faces needed for a DBSCAN core point.": "DBSCAN 核心点所需的最少邻近人脸数。",
        "Name": "名称",
        "No downloaded GFPGAN models": "没有已下载的 GFPGAN 模型",
        "No downloaded swap models": "没有已下载的换脸模型",
        "No images": "没有图片",
        "Only downloaded GFPGAN restore models are shown.": "仅显示已下载的 GFPGAN 修复模型。",
        "Only downloaded swap models are shown.": "仅显示已下载的换脸模型。",
        "Open": "打开",
        "Open GitHub Releases": "打开 GitHub Releases",
        "Open License Center": "打开授权中心",
        "Open Model Folder": "打开模型目录",
        "Open Reports": "打开报告",
        "Open Selected Report": "打开所选报告",
        "People": "人员",
        "Privacy": "隐私",
        "Production or commercial deployment requires an appropriate commercial model license. This page summarizes common commercial paths; it does not provide legal advice.": "生产或商业部署需要适当的商业模型授权。本页总结常见商业路径，但不构成法律建议。",
        "Re-export Selected": "重新导出所选",
        "Recognize Faces": "识别人脸",
        "Recursive": "递归",
        "Refresh": "刷新",
        "Refresh Download URLs": "刷新下载地址",
        "Refresh People": "刷新人员",
        "Register Current Face": "注册当前人脸",
        "Reset": "重置",
        "Reset Settings": "重置设置",
        "Save Details": "保存详情",
        "Save crops": "保存裁剪图",
        "Save face crops": "保存人脸裁剪图",
        "Save recognition logs": "保存识别日志",
        "Scan and Cluster": "扫描并聚类",
        "Search": "搜索",
        "Select Folder": "选择文件夹",
        "Select Image": "选择图片",
        "Select gallery images or folders": "选择 Gallery 图片或文件夹",
        "Select one or more image files or folders. Folders are scanned recursively.": "选择一个或多个图片文件或文件夹。文件夹会递归扫描。",
        "Start": "开始",
        "Stop": "停止",
        "Target person": "目标人员",
        "Test Model Load": "测试模型加载",
        "Threshold": "阈值",
        "Use Selected Model": "使用所选模型",
        "Warmup": "预热",
        "quality_score": "质量分数",
        "rank": "排名",
        "thumbnail": "缩略图",
        "gallery_file": "Gallery 文件",
        "similarity": "相似度",
        "threshold": "阈值",
        "decision": "判定",
        "det_score": "检测分数",
        "person_id": "人员 ID",
        "person_name": "人员名称",
        "status": "状态",
        "sample_id": "样本 ID",
        "crop_path": "裁剪路径",
        "image_path": "图片路径",
        "face_index": "人脸序号",
        "bbox": "检测框",
        "video_path": "视频路径",
        "timestamp_ms": "时间戳 ms",
        "timestamp_hhmmss": "时间",
        "frame_index": "帧序号",
        "id": "ID",
        "date": "日期",
        "scenario": "场景",
        "model": "模型",
        "provider": "运行后端",
        "report_path": "报告路径",
        "asset": "资源",
        "source": "来源",
        "kind": "类型",
        "release": "版本",
        "size": "大小",
        "updated_at": "更新时间",
        "local status": "本地状态",
        "download url": "下载地址",
        "Close": "关闭",
        "First Launch Wizard": "首次启动向导",
        "Workspace": "工作目录",
        "Model package": "模型包",
        "Provider": "运行后端",
        "License notice": "授权提示",
        "Personal / Research": "个人 / 研究",
        "Enterprise Evaluation": "企业评测",
        "custom model directory": "自定义模型目录",
        "Runtime": "运行时",
        "Downloads": "下载",
        "Model Settings": "模型设置",
        "Model Downloads": "模型下载",
        "Runtime information": "运行时信息",
        "Detection size": "检测尺寸",
        "Face swap model": "换脸模型",
        "GFPGAN post-processing": "GFPGAN 后处理",
        "GFPGAN model": "GFPGAN 模型",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "下载 GFPGAN 模型后才能启用 GFPGAN。",
        "Run GFPGAN face restoration after face swap.": "换脸后运行 GFPGAN 人脸修复。",
        "Enable GFPGAN restore after face swap": "换脸后启用 GFPGAN 修复",
        "Save Settings": "保存设置",
        "Open Model Downloads": "打开模型下载",
        "Test Model Load": "测试模型加载",
        "Warmup": "预热",
        "1:1 Verification": "1:1 验证",
        "1:N Identification": "1:N 识别",
        "Auto Split": "自动切分",
        "Require exactly one face": "要求恰好一张脸",
        "Use largest face": "使用最大人脸",
        "Use largest centered face": "使用最大且居中的人脸",
        "Mark as skip": "标记为跳过",
        "Identity Folders / Dataset Root": "身份文件夹 / 数据集根目录",
        "Open Dataset Rules for detailed folder examples.": "打开“数据集规则”查看详细目录示例。",
        "1:1 verification expects one identity per subfolder. Auto Split selects one gallery image per identity and compares every probe against every identity gallery.": "1:1 验证要求每个子目录对应一个身份。自动切分会为每个身份选择一张 gallery 图，并将每张 probe 与所有身份的 gallery 逐一比对。",
        "1:1 verification expects one identity per subfolder. Auto Split is off, so every image is treated as a probe and full pairwise probe-vs-probe comparisons are generated.": "1:1 验证要求每个子目录对应一个身份。关闭自动切分后，每张图片都作为 probe，并生成完整的 probe-vs-probe 两两比对。",
        "1:N Auto Split can use identities/<identity folders> or identity folders directly. Each identity must provide a gallery image and at least one probe.": "1:N 自动切分可使用 identities/<身份文件夹>，也可以直接使用身份文件夹。每个身份必须能生成一张 gallery 图和至少一张 probe 图。",
        "1:N structured evaluation requires gallery/<identity> and probe/<identity>. unknown/ is optional and contributes impostor scores for FAR thresholds.": "1:N 结构化评测要求包含 gallery/<身份> 和 probe/<身份>。unknown/ 为可选目录，会为 FAR 阈值提供冒名负样本分数。",
        "Dataset validation passed. Evaluation is ready to run.": "数据集核验通过，可以运行评测。",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "数据集核验失败。请先修复列出的问题再运行评测。",
        "Evaluation Dataset Rules": "评测数据集规则",
        "Prepare local identity folders using one of the supported layouts below.": "请按以下任一支持结构准备本地身份文件夹。",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "打开 1:1、1:N 和自动切分的身份文件夹详细规则。",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "自动从文件名包含 gallery 的图片中选择每个身份的 gallery 图；如果不存在，则选择排序后的第一张图片。",
        "Choose how evaluation handles images where more than one face is detected.": "选择评测中检测到多张人脸时的处理方式。",
        "Similarity threshold for matching query and gallery faces.": "用于匹配查询人脸和底库人脸的相似度阈值。",
        "Choose how query and gallery images handle multiple detected faces.": "选择查询图和底库图中检测到多张人脸时的处理方式。",
        "Gallery face embeddings are cached in memory after the first run and reused while the gallery image list and multi-face policy are unchanged. Changing only the query image reuses the cached gallery; adding, removing, clearing gallery images, or changing multi-face handling clears and recomputes it.": "Gallery 人脸特征在首次运行后会常驻内存；只要底库图片列表和多人脸策略不变就会复用。仅更换 Query 会复用缓存；添加、移除、清空 Gallery 图片或修改多人脸处理策略会清空并重新计算。",
        "Multi-face policy: require exactly one face. Images with multiple detected faces fail with a clear error.": "多人脸策略：要求恰好一张脸。检测到多张脸的图片会明确报错。",
        "Multi-face policy: use largest face. If an image has multiple faces, the largest detected face is used.": "多人脸策略：使用最大人脸。如果图片中有多张脸，将使用检测框最大的那张脸。",
        "Multi-face policy: use largest centered face. If an image has multiple faces, the face with the best area-minus-center-distance score is used.": "多人脸策略：使用最大且居中的人脸。如果图片中有多张脸，将使用面积与中心位置综合评分最高的人脸。",
        "Multi-face policy: mark as skip. Gallery images with multiple detected faces are skipped; a multi-face query stops the current run.": "多人脸策略：标记为跳过。Gallery 中多脸图片会跳过；Query 中多脸会停止当前运行。",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "打开 InsightFace 联系页面，获取企业评测、授权、SDK/API、SLA 或定制训练支持。",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider 可用。",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider 不可用。请先安装匹配的 onnxruntime-gpu、CUDA 运行时和 GPU 驱动。",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "Auto 会在 CUDAExecutionProvider 可用时使用 CUDA，否则使用 CPU。",
        "Click to open the saved result file.": "点击打开已保存的结果文件。",
    },
    "ja": {
        "Close": "閉じる",
        "First Launch Wizard": "初回起動ウィザード",
        "Workspace": "ワークスペース",
        "Model package": "モデルパッケージ",
        "License notice": "ライセンス通知",
        "Personal / Research": "個人 / 研究",
        "Runtime": "ランタイム",
        "Downloads": "ダウンロード",
        "Model Settings": "モデル設定",
        "Model Downloads": "モデルダウンロード",
        "Runtime information": "ランタイム情報",
        "Detection size": "検出サイズ",
        "Face swap model": "顔交換モデル",
        "GFPGAN post-processing": "GFPGAN 後処理",
        "GFPGAN model": "GFPGAN モデル",
        "1:1 Verification": "1:1 検証",
        "1:N Identification": "1:N 識別",
        "Auto Split": "自動分割",
        "Require exactly one face": "顔を1つだけ要求",
        "Use largest face": "最大の顔を使用",
        "Use largest centered face": "中央寄りの最大顔を使用",
        "Mark as skip": "スキップとして扱う",
        "Identity Folders / Dataset Root": "IDフォルダ / データセットルート",
        "Open Dataset Rules for detailed folder examples.": "詳細なフォルダ例は「データセット規則」を開いて確認してください。",
        "Dataset validation passed. Evaluation is ready to run.": "データセット検証に合格しました。評価を実行できます。",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "データセット検証に失敗しました。評価前に表示された問題を修正してください。",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "1:1、1:N、自動分割の詳細なIDフォルダ規則を開きます。",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "各IDの gallery 画像を、ファイル名に gallery を含む画像、またはソート順の最初の画像から自動選択します。",
        "Choose how evaluation handles images where more than one face is detected.": "評価時に複数の顔が検出された画像の処理方法を選択します。",
        "Similarity threshold for matching query and gallery faces.": "クエリ顔とギャラリー顔の照合に使う類似度しきい値です。",
        "Choose how query and gallery images handle multiple detected faces.": "クエリ画像とギャラリー画像で複数顔が検出された場合の処理方法を選択します。",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "エンタープライズ評価、ライセンス、SDK/API、SLA、カスタム学習の相談ページを開きます。",
        "Click to open the saved result file.": "クリックして保存済み結果ファイルを開きます。",
    },
    "ko": {
        "Close": "닫기",
        "First Launch Wizard": "첫 실행 마법사",
        "Workspace": "워크스페이스",
        "Model package": "모델 패키지",
        "License notice": "라이선스 안내",
        "Personal / Research": "개인 / 연구",
        "Runtime": "런타임",
        "Downloads": "다운로드",
        "Model Settings": "모델 설정",
        "Model Downloads": "모델 다운로드",
        "Runtime information": "런타임 정보",
        "Detection size": "검출 크기",
        "Face swap model": "얼굴 교체 모델",
        "GFPGAN post-processing": "GFPGAN 후처리",
        "GFPGAN model": "GFPGAN 모델",
        "1:1 Verification": "1:1 검증",
        "1:N Identification": "1:N 식별",
        "Auto Split": "자동 분할",
        "Require exactly one face": "정확히 한 얼굴만 허용",
        "Use largest face": "가장 큰 얼굴 사용",
        "Use largest centered face": "중앙에 가까운 가장 큰 얼굴 사용",
        "Mark as skip": "건너뛰기로 처리",
        "Identity Folders / Dataset Root": "ID 폴더 / 데이터셋 루트",
        "Open Dataset Rules for detailed folder examples.": "자세한 폴더 예시는 데이터셋 규칙을 여십시오.",
        "Dataset validation passed. Evaluation is ready to run.": "데이터셋 검증을 통과했습니다. 평가를 실행할 수 있습니다.",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "데이터셋 검증에 실패했습니다. 평가 전에 표시된 문제를 수정하십시오.",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "1:1, 1:N, 자동 분할의 상세 ID 폴더 규칙을 엽니다.",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "각 ID의 gallery 이미지를 파일명에 gallery가 포함된 이미지 또는 정렬된 첫 이미지에서 자동 선택합니다.",
        "Choose how evaluation handles images where more than one face is detected.": "평가 중 여러 얼굴이 검출된 이미지의 처리 방식을 선택합니다.",
        "Similarity threshold for matching query and gallery faces.": "쿼리 얼굴과 갤러리 얼굴 매칭에 사용할 유사도 임계값입니다.",
        "Choose how query and gallery images handle multiple detected faces.": "쿼리 및 갤러리 이미지에서 여러 얼굴이 검출될 때의 처리 방식을 선택합니다.",
        "Click to open the saved result file.": "저장된 결과 파일을 열려면 클릭하십시오.",
    },
    "es": {
        "Close": "Cerrar",
        "First Launch Wizard": "Asistente de primer inicio",
        "Workspace": "Espacio de trabajo",
        "Model package": "Paquete de modelo",
        "License notice": "Aviso de licencia",
        "Personal / Research": "Personal / investigación",
        "Runtime": "Ejecución",
        "Downloads": "Descargas",
        "Model Settings": "Configuración de modelos",
        "Model Downloads": "Descargas de modelos",
        "Runtime information": "Información de ejecución",
        "Detection size": "Tamaño de detección",
        "Face swap model": "Modelo de intercambio facial",
        "GFPGAN post-processing": "Posprocesamiento GFPGAN",
        "GFPGAN model": "Modelo GFPGAN",
        "1:1 Verification": "Verificación 1:1",
        "1:N Identification": "Identificación 1:N",
        "Auto Split": "División automática",
        "Require exactly one face": "Exigir exactamente una cara",
        "Use largest face": "Usar la cara más grande",
        "Use largest centered face": "Usar la cara más grande y centrada",
        "Mark as skip": "Marcar como omitida",
        "Identity Folders / Dataset Root": "Carpetas de identidad / raíz del dataset",
        "Open Dataset Rules for detailed folder examples.": "Abra Reglas del dataset para ver ejemplos detallados de carpetas.",
        "Dataset validation passed. Evaluation is ready to run.": "La validación del dataset se completó correctamente. La evaluación está lista.",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "La validación del dataset falló. Corrija los problemas listados antes de ejecutar la evaluación.",
        "Choose how evaluation handles images where more than one face is detected.": "Elija cómo tratar imágenes con más de una cara detectada durante la evaluación.",
        "Similarity threshold for matching query and gallery faces.": "Umbral de similitud para comparar caras de consulta y galería.",
        "Choose how query and gallery images handle multiple detected faces.": "Elija cómo tratar varias caras detectadas en imágenes de consulta y galería.",
        "Click to open the saved result file.": "Haga clic para abrir el archivo de resultado guardado.",
    },
    "fr": {
        "Close": "Fermer",
        "First Launch Wizard": "Assistant de premier lancement",
        "Workspace": "Espace de travail",
        "Model package": "Package de modèle",
        "License notice": "Avis de licence",
        "Personal / Research": "Personnel / recherche",
        "Runtime": "Exécution",
        "Downloads": "Téléchargements",
        "Model Settings": "Paramètres des modèles",
        "Model Downloads": "Téléchargements de modèles",
        "Runtime information": "Informations d’exécution",
        "Detection size": "Taille de détection",
        "Face swap model": "Modèle de face swap",
        "GFPGAN post-processing": "Post-traitement GFPGAN",
        "GFPGAN model": "Modèle GFPGAN",
        "1:1 Verification": "Vérification 1:1",
        "1:N Identification": "Identification 1:N",
        "Auto Split": "Découpage automatique",
        "Require exactly one face": "Exiger exactement un visage",
        "Use largest face": "Utiliser le plus grand visage",
        "Use largest centered face": "Utiliser le plus grand visage centré",
        "Mark as skip": "Marquer comme ignoré",
        "Identity Folders / Dataset Root": "Dossiers d’identité / racine du jeu de données",
        "Open Dataset Rules for detailed folder examples.": "Ouvrez les règles du jeu de données pour des exemples de dossiers détaillés.",
        "Dataset validation passed. Evaluation is ready to run.": "La validation du jeu de données a réussi. L’évaluation peut être lancée.",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "La validation du jeu de données a échoué. Corrigez les problèmes listés avant l’évaluation.",
        "Choose how evaluation handles images where more than one face is detected.": "Choisissez comment traiter les images contenant plusieurs visages détectés.",
        "Similarity threshold for matching query and gallery faces.": "Seuil de similarité pour associer les visages requête et galerie.",
        "Choose how query and gallery images handle multiple detected faces.": "Choisissez comment traiter plusieurs visages détectés dans la requête et la galerie.",
        "Click to open the saved result file.": "Cliquez pour ouvrir le fichier de résultat enregistré.",
    },
    "de": {
        "Close": "Schließen",
        "First Launch Wizard": "Assistent für den ersten Start",
        "Workspace": "Arbeitsbereich",
        "Model package": "Modellpaket",
        "License notice": "Lizenzhinweis",
        "Personal / Research": "Privat / Forschung",
        "Runtime": "Laufzeit",
        "Downloads": "Downloads",
        "Model Settings": "Modelleinstellungen",
        "Model Downloads": "Modelldownloads",
        "Runtime information": "Laufzeitinformationen",
        "Detection size": "Erkennungsgröße",
        "Face swap model": "Face-Swap-Modell",
        "GFPGAN post-processing": "GFPGAN-Nachbearbeitung",
        "GFPGAN model": "GFPGAN-Modell",
        "1:1 Verification": "1:1-Verifikation",
        "1:N Identification": "1:N-Identifikation",
        "Auto Split": "Automatische Aufteilung",
        "Require exactly one face": "Genau ein Gesicht verlangen",
        "Use largest face": "Größtes Gesicht verwenden",
        "Use largest centered face": "Größtes zentriertes Gesicht verwenden",
        "Mark as skip": "Als überspringen markieren",
        "Identity Folders / Dataset Root": "Identitätsordner / Datensatzwurzel",
        "Open Dataset Rules for detailed folder examples.": "Öffnen Sie die Datensatzregeln für detaillierte Ordnerbeispiele.",
        "Dataset validation passed. Evaluation is ready to run.": "Die Datensatzvalidierung war erfolgreich. Die Evaluierung kann gestartet werden.",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "Die Datensatzvalidierung ist fehlgeschlagen. Beheben Sie die aufgeführten Probleme vor der Evaluierung.",
        "Choose how evaluation handles images where more than one face is detected.": "Wählen Sie, wie Bilder mit mehr als einem erkannten Gesicht behandelt werden.",
        "Similarity threshold for matching query and gallery faces.": "Ähnlichkeitsschwelle für den Abgleich von Abfrage- und Galeriegesichtern.",
        "Choose how query and gallery images handle multiple detected faces.": "Wählen Sie, wie mehrere erkannte Gesichter in Abfrage- und Galeriebildern behandelt werden.",
        "Click to open the saved result file.": "Klicken, um die gespeicherte Ergebnisdatei zu öffnen.",
    },
    "pt": {
        "Close": "Fechar",
        "First Launch Wizard": "Assistente do primeiro arranque",
        "Workspace": "Workspace",
        "Model package": "Pacote de modelo",
        "License notice": "Aviso de licença",
        "Personal / Research": "Pessoal / investigação",
        "Runtime": "Execução",
        "Downloads": "Transferências",
        "Model Settings": "Definições de modelos",
        "Model Downloads": "Transferências de modelos",
        "Runtime information": "Informação de execução",
        "Detection size": "Tamanho de deteção",
        "Face swap model": "Modelo de troca de rostos",
        "GFPGAN post-processing": "Pós-processamento GFPGAN",
        "GFPGAN model": "Modelo GFPGAN",
        "1:1 Verification": "Verificação 1:1",
        "1:N Identification": "Identificação 1:N",
        "Auto Split": "Divisão automática",
        "Require exactly one face": "Exigir exatamente um rosto",
        "Use largest face": "Usar o maior rosto",
        "Use largest centered face": "Usar o maior rosto centrado",
        "Mark as skip": "Marcar como ignorado",
        "Identity Folders / Dataset Root": "Pastas de identidade / raiz do dataset",
        "Open Dataset Rules for detailed folder examples.": "Abra as regras do dataset para exemplos detalhados de pastas.",
        "Dataset validation passed. Evaluation is ready to run.": "A validação do dataset passou. A avaliação está pronta.",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "A validação do dataset falhou. Corrija os problemas listados antes da avaliação.",
        "Choose how evaluation handles images where more than one face is detected.": "Escolha como a avaliação trata imagens com mais de um rosto detetado.",
        "Similarity threshold for matching query and gallery faces.": "Limiar de similaridade para comparar rostos de consulta e galeria.",
        "Choose how query and gallery images handle multiple detected faces.": "Escolha como tratar múltiplos rostos em imagens de consulta e galeria.",
        "Click to open the saved result file.": "Clique para abrir o ficheiro de resultado guardado.",
    },
    "ru": {
        "Close": "Закрыть",
        "First Launch Wizard": "Мастер первого запуска",
        "Workspace": "Рабочая область",
        "Model package": "Пакет модели",
        "License notice": "Уведомление о лицензии",
        "Personal / Research": "Личное / исследовательское",
        "Runtime": "Среда выполнения",
        "Downloads": "Загрузки",
        "Model Settings": "Настройки моделей",
        "Model Downloads": "Загрузки моделей",
        "Runtime information": "Информация о среде выполнения",
        "Detection size": "Размер детекции",
        "Face swap model": "Модель замены лиц",
        "GFPGAN post-processing": "Постобработка GFPGAN",
        "GFPGAN model": "Модель GFPGAN",
        "1:1 Verification": "Верификация 1:1",
        "1:N Identification": "Идентификация 1:N",
        "Auto Split": "Авторазделение",
        "Require exactly one face": "Требовать ровно одно лицо",
        "Use largest face": "Использовать самое крупное лицо",
        "Use largest centered face": "Использовать самое крупное центральное лицо",
        "Mark as skip": "Помечать как пропуск",
        "Identity Folders / Dataset Root": "Папки идентичностей / корень датасета",
        "Open Dataset Rules for detailed folder examples.": "Откройте правила датасета для подробных примеров структуры папок.",
        "Dataset validation passed. Evaluation is ready to run.": "Проверка датасета пройдена. Оценку можно запускать.",
        "Dataset validation failed. Fix the listed issues before running evaluation.": "Проверка датасета не пройдена. Исправьте перечисленные проблемы перед запуском оценки.",
        "Choose how evaluation handles images where more than one face is detected.": "Выберите, как оценка будет обрабатывать изображения с несколькими найденными лицами.",
        "Similarity threshold for matching query and gallery faces.": "Порог сходства для сопоставления лиц запроса и галереи.",
        "Choose how query and gallery images handle multiple detected faces.": "Выберите обработку нескольких лиц в изображениях запроса и галереи.",
        "Click to open the saved result file.": "Нажмите, чтобы открыть сохранённый файл результата.",
    },
}

for _lang, _values in _EXTRA_TRANSLATIONS.items():
    _TRANSLATIONS.setdefault(_lang, {}).update(_values)


_ADDITIONAL_UI_TRANSLATIONS: dict[str, dict[str, str]] = {
    "zh": {
        "<a href='#'>Browse</a>": "<a href='#'>浏览</a>",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "本应用在本地运行。代码与模型文件可能适用不同授权。研究模型可能仅限非商业使用。商业部署需要相应的模型授权。本工具不提供法律建议。",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "余弦阈值是人脸相似度截断值：数值越高，聚类越严格。DBSCAN 内部使用的余弦距离为 1 - 余弦阈值。",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "余弦相似度阈值。数值越高，聚类越严格；默认值为 0.48。",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "当前机器不可用 CUDA，因此 Auto 将使用 CPU。",
        "Name, notes, and tags are shown here.": "姓名、备注和标签会显示在这里。",
        "cluster_id": "聚类 ID",
        "face_count": "人脸数",
        "photo_count": "照片数",
        "average_quality": "平均质量",
        "sample_paths": "样本路径",
        "model_name": "模型名称",
        "source_image_path": "源图片路径",
        "Min det score %": "最低检测分数 %",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
    },
    "ja": {
        "<a href='#'>Browse</a>": "<a href='#'>参照</a>",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
        "custom model directory": "カスタムモデルディレクトリ",
        "Custom model directory": "カスタムモデルディレクトリ",
        "Auto": "自動",
        "Browse": "参照",
        "Add Person": "人物を追加",
        "Add as New Person": "新しい人物として追加",
        "Assign to Existing Person": "既存の人物に割り当て",
        "Compare": "比較",
        "Search": "検索",
        "Export": "エクスポート",
        "Export Result": "結果をエクスポート",
        "Export Results": "結果をエクスポート",
        "Export Summary": "概要をエクスポート",
        "Export Settings": "設定をエクスポート",
        "Import Settings": "設定をインポート",
        "Delete": "削除",
        "Delete Selected": "選択項目を削除",
        "Reset": "リセット",
        "Reset Settings": "設定をリセット",
        "Refresh": "更新",
        "Start": "開始",
        "Stop": "停止",
        "Open": "開く",
        "Save Settings": "設定を保存",
        "Save Details": "詳細を保存",
        "Save crops": "クロップを保存",
        "Save face crops": "顔クロップを保存",
        "Save recognition logs": "認識ログを保存",
        "Anonymize report paths": "レポートパスを匿名化",
        "Privacy": "プライバシー",
        "Recursive": "再帰的に処理",
        "Identify people": "人物を識別",
        "Camera index": "カメラインデックス",
        "Frame skip": "フレームスキップ",
        "Frame interval": "フレーム間隔",
        "Target person": "対象人物",
        "Check Cameras": "カメラを確認",
        "Register Current Face": "現在の顔を登録",
        "Refresh People": "人物リストを更新",
        "Recognize Faces": "顔を認識",
        "Test Model Load": "モデル読み込みをテスト",
        "Warmup": "ウォームアップ",
        "Export Annotated Image": "注釈付き画像をエクスポート",
        "Export CSV": "CSV をエクスポート",
        "Export CSV / JSON": "CSV / JSON をエクスポート",
        "Refresh Download URLs": "ダウンロード URL を更新",
        "Download Selected": "選択項目をダウンロード",
        "Use Selected Model": "選択したモデルを使用",
        "Open Model Folder": "モデルフォルダを開く",
        "Open GitHub Releases": "GitHub Releases を開く",
        "Open Model Downloads": "モデルダウンロードを開く",
        "Open License Center": "ライセンスセンターを開く",
        "Open Reports": "レポートを開く",
        "Open Selected Report": "選択したレポートを開く",
        "Re-export Selected": "選択項目を再エクスポート",
        "Export All Summary": "全概要をエクスポート",
        "Import Image or Folder": "画像またはフォルダをインポート",
        "Select Image": "画像を選択",
        "Select Folder": "フォルダを選択",
        "Select gallery images or folders": "ギャラリー画像またはフォルダを選択",
        "Select one or more image files or folders. Folders are scanned recursively.": "1つ以上の画像ファイルまたはフォルダを選択してください。フォルダは再帰的にスキャンされます。",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "画像またはフォルダをクリックしてインポートするか、ここにドラッグしてください。フォルダは再帰的にインポートされます。",
        "Click to upload images or a folder, or drag them here": "画像またはフォルダをクリックしてアップロードするか、ここにドラッグしてください",
        "Drag one or more album folders here, or use Add Folder.": "1つ以上のアルバムフォルダをここにドラッグするか、「フォルダを追加」を使用してください。",
        "Drag album folders into the directory list, or click Add Folder.": "アルバムフォルダをディレクトリ一覧にドラッグするか、「フォルダを追加」をクリックしてください。",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "コサインしきい値は顔類似度の判定基準です。値が高いほどクラスタリングは厳しくなります。DBSCAN では内部的にコサイン距離 = 1 - コサインしきい値を使用します。",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "コサイン類似度のしきい値です。値が高いほどクラスタリングは厳しくなります。既定値は 0.48 です。",
        "DBSCAN distance threshold": "DBSCAN 距離しきい値",
        "Algorithm: DBSCAN": "アルゴリズム: DBSCAN",
        "Scan and Cluster": "スキャンしてクラスタリング",
        "Minimum neighboring faces needed for a DBSCAN core point.": "DBSCAN のコア点に必要な近傍顔数です。",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "バウンディングボックスの幅または高さがこの値より小さい顔はスキップされます。",
        "No images": "画像なし",
        "People": "人物",
        "ID": "ID",
        "Name": "名前",
        "Name, notes, and tags are shown here.": "名前、メモ、タグがここに表示されます。",
        "Threshold": "しきい値",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "このアプリケーションはローカルで動作します。コードとモデルのライセンスは異なる場合があります。研究用モデルは非商用利用に制限されることがあります。商用展開には適切なモデルライセンスが必要です。本ツールは法的助言を提供しません。",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "このマシンでは CUDA を利用できないため、自動設定では CPU を使用します。",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "CUDAExecutionProvider が利用可能な場合は自動で CUDA を使用し、それ以外は CPU を使用します。",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider を利用できます。",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider を利用できません。対応する onnxruntime-gpu、CUDA ランタイム、GPU ドライバを先にインストールしてください。",
        "No downloaded swap models": "ダウンロード済みの顔交換モデルがありません",
        "Only downloaded swap models are shown.": "ダウンロード済みの顔交換モデルのみ表示されます。",
        "Download inswapper_128.onnx from Models > Downloads first.": "先に Models > Downloads から inswapper_128.onnx をダウンロードしてください。",
        "No downloaded GFPGAN models": "ダウンロード済みの GFPGAN モデルがありません",
        "Only downloaded GFPGAN restore models are shown.": "ダウンロード済みの GFPGAN 復元モデルのみ表示されます。",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "先に Models > Downloads から GFPGANv1.4.onnx をダウンロードしてください。",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "GFPGAN モデルをダウンロードするまで GFPGAN は利用できません。",
        "Run GFPGAN face restoration after face swap.": "顔交換後に GFPGAN 顔復元を実行します。",
        "Enable GFPGAN restore after face swap": "顔交換後に GFPGAN 復元を有効化",
        "Validate the dataset before running an evaluation.": "評価を実行する前にデータセットを検証してください。",
        "Validate the selected dataset and configuration before running evaluation.": "評価を実行する前に、選択したデータセットと設定を検証してください。",
        "Result preview appears here. Video results are saved to the exports folder.": "結果プレビューがここに表示されます。動画結果はエクスポートフォルダに保存されます。",
        "Min det score %": "最小検出スコア %",
        "asset": "アセット",
        "source": "ソース",
        "kind": "種類",
        "release": "リリース",
        "size": "サイズ",
        "updated_at": "更新日時",
        "local status": "ローカル状態",
        "download url": "ダウンロード URL",
        "rank": "順位",
        "thumbnail": "サムネイル",
        "gallery_file": "ギャラリーファイル",
        "similarity": "類似度",
        "threshold": "しきい値",
        "decision": "判定",
        "det_score": "検出スコア",
        "person_id": "人物 ID",
        "person_name": "人物名",
        "status": "状態",
        "sample_id": "サンプル ID",
        "crop_path": "クロップパス",
        "image_path": "画像パス",
        "face_index": "顔インデックス",
        "bbox": "バウンディングボックス",
        "video_path": "動画パス",
        "timestamp_ms": "タイムスタンプ ms",
        "timestamp_hhmmss": "時刻",
        "frame_index": "フレーム番号",
        "id": "ID",
        "date": "日付",
        "scenario": "シナリオ",
        "model": "モデル",
        "provider": "プロバイダ",
        "report_path": "レポートパス",
        "quality_score": "品質スコア",
        "cluster_id": "クラスタ ID",
        "face_count": "顔数",
        "photo_count": "写真数",
        "average_quality": "平均品質",
        "sample_paths": "サンプルパス",
        "model_name": "モデル名",
        "source_image_path": "元画像パス",
    },
    "ko": {
        "<a href='#'>Browse</a>": "<a href='#'>찾아보기</a>",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
        "custom model directory": "사용자 지정 모델 디렉터리",
        "Custom model directory": "사용자 지정 모델 디렉터리",
        "Auto": "자동",
        "Browse": "찾아보기",
        "Add Person": "사람 추가",
        "Add as New Person": "새 사람으로 추가",
        "Assign to Existing Person": "기존 사람에게 지정",
        "Compare": "비교",
        "Search": "검색",
        "Export": "내보내기",
        "Export Result": "결과 내보내기",
        "Export Results": "결과 내보내기",
        "Export Summary": "요약 내보내기",
        "Export Settings": "설정 내보내기",
        "Import Settings": "설정 가져오기",
        "Delete": "삭제",
        "Delete Selected": "선택 항목 삭제",
        "Reset": "초기화",
        "Reset Settings": "설정 초기화",
        "Refresh": "새로고침",
        "Start": "시작",
        "Stop": "중지",
        "Open": "열기",
        "Save Settings": "설정 저장",
        "Save Details": "세부 정보 저장",
        "Save crops": "크롭 저장",
        "Save face crops": "얼굴 크롭 저장",
        "Save recognition logs": "인식 로그 저장",
        "Anonymize report paths": "보고서 경로 익명화",
        "Privacy": "개인정보",
        "Recursive": "재귀적으로 처리",
        "Identify people": "사람 식별",
        "Camera index": "카메라 인덱스",
        "Frame skip": "프레임 건너뛰기",
        "Frame interval": "프레임 간격",
        "Target person": "대상 사람",
        "Check Cameras": "카메라 확인",
        "Register Current Face": "현재 얼굴 등록",
        "Refresh People": "사람 목록 새로고침",
        "Recognize Faces": "얼굴 인식",
        "Test Model Load": "모델 로드 테스트",
        "Warmup": "워밍업",
        "Export Annotated Image": "주석 이미지 내보내기",
        "Export CSV": "CSV 내보내기",
        "Export CSV / JSON": "CSV / JSON 내보내기",
        "Refresh Download URLs": "다운로드 URL 새로고침",
        "Download Selected": "선택 항목 다운로드",
        "Use Selected Model": "선택한 모델 사용",
        "Open Model Folder": "모델 폴더 열기",
        "Open GitHub Releases": "GitHub Releases 열기",
        "Open Model Downloads": "모델 다운로드 열기",
        "Open License Center": "라이선스 센터 열기",
        "Open Reports": "보고서 열기",
        "Open Selected Report": "선택한 보고서 열기",
        "Re-export Selected": "선택 항목 다시 내보내기",
        "Export All Summary": "전체 요약 내보내기",
        "Import Image or Folder": "이미지 또는 폴더 가져오기",
        "Select Image": "이미지 선택",
        "Select Folder": "폴더 선택",
        "Select gallery images or folders": "갤러리 이미지 또는 폴더 선택",
        "Select one or more image files or folders. Folders are scanned recursively.": "하나 이상의 이미지 파일 또는 폴더를 선택하십시오. 폴더는 재귀적으로 스캔됩니다.",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "이미지 또는 폴더를 클릭해 가져오거나 여기로 끌어오십시오. 폴더는 재귀적으로 가져옵니다.",
        "Click to upload images or a folder, or drag them here": "이미지 또는 폴더를 클릭해 업로드하거나 여기로 끌어오십시오",
        "Drag one or more album folders here, or use Add Folder.": "하나 이상의 앨범 폴더를 여기로 끌어오거나 폴더 추가를 사용하십시오.",
        "Drag album folders into the directory list, or click Add Folder.": "앨범 폴더를 디렉터리 목록으로 끌어오거나 폴더 추가를 클릭하십시오.",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "코사인 임계값은 얼굴 유사도의 기준값입니다. 값이 높을수록 클러스터가 더 엄격해집니다. DBSCAN은 내부적으로 코사인 거리 = 1 - 코사인 임계값을 사용합니다.",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "코사인 유사도 임계값입니다. 값이 높을수록 클러스터가 더 엄격해지며 기본값은 0.48입니다.",
        "DBSCAN distance threshold": "DBSCAN 거리 임계값",
        "Algorithm: DBSCAN": "알고리즘: DBSCAN",
        "Scan and Cluster": "스캔 및 클러스터링",
        "Minimum neighboring faces needed for a DBSCAN core point.": "DBSCAN 핵심점에 필요한 최소 이웃 얼굴 수입니다.",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "바운딩 박스의 너비 또는 높이가 이 값보다 작은 얼굴은 건너뜁니다.",
        "No images": "이미지 없음",
        "People": "사람",
        "ID": "ID",
        "Name": "이름",
        "Name, notes, and tags are shown here.": "이름, 메모, 태그가 여기에 표시됩니다.",
        "Threshold": "임계값",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "이 애플리케이션은 로컬에서 실행됩니다. 코드와 모델 라이선스는 다를 수 있습니다. 연구용 모델은 비상업적 사용으로 제한될 수 있습니다. 상용 배포에는 적절한 모델 라이선스가 필요합니다. 이 도구는 법률 자문을 제공하지 않습니다.",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "이 컴퓨터에서 CUDA를 사용할 수 없어 자동 설정은 CPU를 사용합니다.",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "CUDAExecutionProvider를 사용할 수 있으면 자동으로 CUDA를 사용하고, 그렇지 않으면 CPU를 사용합니다.",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider를 사용할 수 있습니다.",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider를 사용할 수 없습니다. 먼저 호환되는 onnxruntime-gpu, CUDA 런타임, GPU 드라이버를 설치하십시오.",
        "No downloaded swap models": "다운로드된 얼굴 교체 모델 없음",
        "Only downloaded swap models are shown.": "다운로드된 얼굴 교체 모델만 표시됩니다.",
        "Download inswapper_128.onnx from Models > Downloads first.": "먼저 Models > Downloads에서 inswapper_128.onnx를 다운로드하십시오.",
        "No downloaded GFPGAN models": "다운로드된 GFPGAN 모델 없음",
        "Only downloaded GFPGAN restore models are shown.": "다운로드된 GFPGAN 복원 모델만 표시됩니다.",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "먼저 Models > Downloads에서 GFPGANv1.4.onnx를 다운로드하십시오.",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "GFPGAN 모델을 다운로드하기 전에는 GFPGAN을 사용할 수 없습니다.",
        "Run GFPGAN face restoration after face swap.": "얼굴 교체 후 GFPGAN 얼굴 복원을 실행합니다.",
        "Enable GFPGAN restore after face swap": "얼굴 교체 후 GFPGAN 복원 활성화",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "기업 평가, 라이선스, SDK/API, SLA 또는 맞춤 학습 지원을 위해 InsightFace 문의 페이지를 엽니다.",
        "Evaluation Dataset Rules": "평가 데이터셋 규칙",
        "Prepare local identity folders using one of the supported layouts below.": "아래 지원 레이아웃 중 하나로 로컬 ID 폴더를 준비하십시오.",
        "Validate the dataset before running an evaluation.": "평가를 실행하기 전에 데이터셋을 검증하십시오.",
        "Validate the selected dataset and configuration before running evaluation.": "평가를 실행하기 전에 선택한 데이터셋과 구성을 검증하십시오.",
        "Result preview appears here. Video results are saved to the exports folder.": "결과 미리보기가 여기에 표시됩니다. 비디오 결과는 내보내기 폴더에 저장됩니다.",
        "Min det score %": "최소 검출 점수 %",
        "asset": "자산",
        "source": "소스",
        "kind": "종류",
        "release": "릴리스",
        "size": "크기",
        "updated_at": "업데이트 시간",
        "local status": "로컬 상태",
        "download url": "다운로드 URL",
        "rank": "순위",
        "thumbnail": "썸네일",
        "gallery_file": "갤러리 파일",
        "similarity": "유사도",
        "threshold": "임계값",
        "decision": "판정",
        "det_score": "검출 점수",
        "person_id": "사람 ID",
        "person_name": "사람 이름",
        "status": "상태",
        "sample_id": "샘플 ID",
        "crop_path": "크롭 경로",
        "image_path": "이미지 경로",
        "face_index": "얼굴 인덱스",
        "bbox": "바운딩 박스",
        "video_path": "비디오 경로",
        "timestamp_ms": "타임스탬프 ms",
        "timestamp_hhmmss": "시간",
        "frame_index": "프레임 인덱스",
        "id": "ID",
        "date": "날짜",
        "scenario": "시나리오",
        "model": "모델",
        "provider": "제공자",
        "report_path": "보고서 경로",
        "quality_score": "품질 점수",
        "cluster_id": "클러스터 ID",
        "face_count": "얼굴 수",
        "photo_count": "사진 수",
        "average_quality": "평균 품질",
        "sample_paths": "샘플 경로",
        "model_name": "모델 이름",
        "source_image_path": "원본 이미지 경로",
    },
    "es": {
        "<a href='#'>Browse</a>": "<a href='#'>Explorar</a>",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
        "custom model directory": "directorio de modelo personalizado",
        "Custom model directory": "Directorio de modelo personalizado",
        "Auto": "Automático",
        "Browse": "Explorar",
        "Add Person": "Añadir persona",
        "Add as New Person": "Añadir como nueva persona",
        "Assign to Existing Person": "Asignar a una persona existente",
        "Compare": "Comparar",
        "Search": "Buscar",
        "Export": "Exportar",
        "Export Result": "Exportar resultado",
        "Export Results": "Exportar resultados",
        "Export Summary": "Exportar resumen",
        "Export Settings": "Exportar configuración",
        "Import Settings": "Importar configuración",
        "Delete": "Eliminar",
        "Delete Selected": "Eliminar selección",
        "Reset": "Restablecer",
        "Reset Settings": "Restablecer configuración",
        "Refresh": "Actualizar",
        "Start": "Iniciar",
        "Stop": "Detener",
        "Open": "Abrir",
        "Save Settings": "Guardar configuración",
        "Save Details": "Guardar detalles",
        "Save crops": "Guardar recortes",
        "Save face crops": "Guardar recortes de rostro",
        "Save recognition logs": "Guardar registros de reconocimiento",
        "Anonymize report paths": "Anonimizar rutas de informes",
        "Privacy": "Privacidad",
        "Recursive": "Recursivo",
        "Identify people": "Identificar personas",
        "Camera index": "Índice de cámara",
        "Frame skip": "Salto de fotogramas",
        "Frame interval": "Intervalo de fotogramas",
        "Target person": "Persona objetivo",
        "Check Cameras": "Comprobar cámaras",
        "Register Current Face": "Registrar rostro actual",
        "Refresh People": "Actualizar personas",
        "Recognize Faces": "Reconocer rostros",
        "Test Model Load": "Probar carga del modelo",
        "Warmup": "Calentamiento",
        "Export Annotated Image": "Exportar imagen anotada",
        "Export CSV": "Exportar CSV",
        "Export CSV / JSON": "Exportar CSV / JSON",
        "Refresh Download URLs": "Actualizar URL de descarga",
        "Download Selected": "Descargar selección",
        "Use Selected Model": "Usar modelo seleccionado",
        "Open Model Folder": "Abrir carpeta de modelos",
        "Open GitHub Releases": "Abrir GitHub Releases",
        "Open Model Downloads": "Abrir descargas de modelos",
        "Open License Center": "Abrir centro de licencias",
        "Open Reports": "Abrir informes",
        "Open Selected Report": "Abrir informe seleccionado",
        "Re-export Selected": "Reexportar selección",
        "Export All Summary": "Exportar resumen completo",
        "Import Image or Folder": "Importar imagen o carpeta",
        "Select Image": "Seleccionar imagen",
        "Select Folder": "Seleccionar carpeta",
        "Select gallery images or folders": "Seleccionar imágenes o carpetas de galería",
        "Select one or more image files or folders. Folders are scanned recursively.": "Seleccione uno o más archivos de imagen o carpetas. Las carpetas se escanean de forma recursiva.",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "Haga clic para importar una imagen o carpeta, o arrástrela aquí. Las carpetas se importan de forma recursiva.",
        "Click to upload images or a folder, or drag them here": "Haga clic para subir imágenes o una carpeta, o arrástrelas aquí",
        "Drag one or more album folders here, or use Add Folder.": "Arrastre aquí una o más carpetas de álbum, o use Añadir carpeta.",
        "Drag album folders into the directory list, or click Add Folder.": "Arrastre carpetas de álbum a la lista de directorios, o haga clic en Añadir carpeta.",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "El umbral de coseno es el corte de similitud facial: valores más altos hacen que los clústeres sean más estrictos. DBSCAN usa internamente distancia de coseno = 1 - umbral de coseno.",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "Umbral de similitud de coseno. Valores más altos hacen que los clústeres sean más estrictos; el valor predeterminado es 0,48.",
        "DBSCAN distance threshold": "Umbral de distancia DBSCAN",
        "Algorithm: DBSCAN": "Algoritmo: DBSCAN",
        "Scan and Cluster": "Escanear y agrupar",
        "Minimum neighboring faces needed for a DBSCAN core point.": "Número mínimo de rostros vecinos necesarios para un punto núcleo de DBSCAN.",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "Se omiten los rostros cuyo cuadro delimitador tenga anchura o altura menor que este valor.",
        "No images": "Sin imágenes",
        "People": "Personas",
        "ID": "ID",
        "Name": "Nombre",
        "Name, notes, and tags are shown here.": "Aquí se muestran el nombre, las notas y las etiquetas.",
        "Threshold": "Umbral",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "Esta aplicación se ejecuta localmente. Las licencias del código y de los modelos pueden ser diferentes. Los modelos de investigación pueden estar limitados a uso no comercial. El despliegue comercial requiere una licencia de modelo adecuada. Esta herramienta no ofrece asesoramiento legal.",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "CUDA no está disponible en esta máquina, por lo que Automático usará CPU.",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "Automático usa CUDA cuando CUDAExecutionProvider está disponible; en caso contrario usa CPU.",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider está disponible.",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider no está disponible. Instale primero una versión compatible de onnxruntime-gpu, el runtime CUDA y el controlador GPU.",
        "No downloaded swap models": "No hay modelos de intercambio facial descargados",
        "Only downloaded swap models are shown.": "Solo se muestran modelos de intercambio facial descargados.",
        "Download inswapper_128.onnx from Models > Downloads first.": "Descargue primero inswapper_128.onnx desde Models > Downloads.",
        "No downloaded GFPGAN models": "No hay modelos GFPGAN descargados",
        "Only downloaded GFPGAN restore models are shown.": "Solo se muestran modelos de restauración GFPGAN descargados.",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "Descargue primero GFPGANv1.4.onnx desde Models > Downloads.",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "GFPGAN no estará disponible hasta descargar un modelo GFPGAN.",
        "Run GFPGAN face restoration after face swap.": "Ejecutar restauración facial GFPGAN después del intercambio.",
        "Enable GFPGAN restore after face swap": "Activar restauración GFPGAN después del intercambio facial",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "Seleccione automáticamente la imagen de galería de cada identidad desde un archivo que contenga “gallery”, o la primera imagen ordenada.",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "Abra las reglas detalladas de carpetas de identidad para 1:1, 1:N y División automática.",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "Abrir la página de contacto de InsightFace para evaluación empresarial, licencias, SDK/API, SLA o formación personalizada.",
        "Evaluation Dataset Rules": "Reglas del dataset de evaluación",
        "Prepare local identity folders using one of the supported layouts below.": "Prepare carpetas locales de identidad usando uno de los formatos admitidos a continuación.",
        "Validate the dataset before running an evaluation.": "Valide el dataset antes de ejecutar una evaluación.",
        "Validate the selected dataset and configuration before running evaluation.": "Valide el dataset y la configuración seleccionados antes de ejecutar la evaluación.",
        "Result preview appears here. Video results are saved to the exports folder.": "La vista previa del resultado aparece aquí. Los resultados de vídeo se guardan en la carpeta de exportaciones.",
        "Min det score %": "Puntuación mínima de detección %",
        "asset": "recurso",
        "source": "origen",
        "kind": "tipo",
        "release": "versión",
        "size": "tamaño",
        "updated_at": "actualizado",
        "local status": "estado local",
        "download url": "URL de descarga",
        "rank": "posición",
        "thumbnail": "miniatura",
        "gallery_file": "archivo de galería",
        "similarity": "similitud",
        "threshold": "umbral",
        "decision": "decisión",
        "det_score": "puntuación de detección",
        "person_id": "ID de persona",
        "person_name": "nombre de persona",
        "status": "estado",
        "sample_id": "ID de muestra",
        "crop_path": "ruta del recorte",
        "image_path": "ruta de imagen",
        "face_index": "índice de rostro",
        "bbox": "cuadro",
        "video_path": "ruta de vídeo",
        "timestamp_ms": "marca temporal ms",
        "timestamp_hhmmss": "hora",
        "frame_index": "índice de fotograma",
        "id": "ID",
        "date": "fecha",
        "scenario": "escenario",
        "model": "modelo",
        "provider": "proveedor",
        "report_path": "ruta del informe",
        "quality_score": "puntuación de calidad",
        "cluster_id": "ID de clúster",
        "face_count": "rostros",
        "photo_count": "fotos",
        "average_quality": "calidad media",
        "sample_paths": "rutas de muestra",
        "model_name": "nombre del modelo",
        "source_image_path": "ruta de imagen origen",
    },
    "fr": {
        "<a href='#'>Browse</a>": "<a href='#'>Parcourir</a>",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
        "custom model directory": "répertoire de modèle personnalisé",
        "Custom model directory": "Répertoire de modèle personnalisé",
        "Auto": "Auto",
        "Browse": "Parcourir",
        "Add Person": "Ajouter une personne",
        "Add as New Person": "Ajouter comme nouvelle personne",
        "Assign to Existing Person": "Attribuer à une personne existante",
        "Compare": "Comparer",
        "Search": "Rechercher",
        "Export": "Exporter",
        "Export Result": "Exporter le résultat",
        "Export Results": "Exporter les résultats",
        "Export Summary": "Exporter le résumé",
        "Export Settings": "Exporter les paramètres",
        "Import Settings": "Importer les paramètres",
        "Delete": "Supprimer",
        "Delete Selected": "Supprimer la sélection",
        "Reset": "Réinitialiser",
        "Reset Settings": "Réinitialiser les paramètres",
        "Refresh": "Actualiser",
        "Start": "Démarrer",
        "Stop": "Arrêter",
        "Open": "Ouvrir",
        "Save Settings": "Enregistrer les paramètres",
        "Save Details": "Enregistrer les détails",
        "Save crops": "Enregistrer les recadrages",
        "Save face crops": "Enregistrer les recadrages de visage",
        "Save recognition logs": "Enregistrer les journaux de reconnaissance",
        "Anonymize report paths": "Anonymiser les chemins des rapports",
        "Privacy": "Confidentialité",
        "Recursive": "Récursif",
        "Identify people": "Identifier les personnes",
        "Camera index": "Index de caméra",
        "Frame skip": "Saut d’images",
        "Frame interval": "Intervalle d’images",
        "Target person": "Personne cible",
        "Check Cameras": "Vérifier les caméras",
        "Register Current Face": "Enregistrer le visage actuel",
        "Refresh People": "Actualiser les personnes",
        "Recognize Faces": "Reconnaître les visages",
        "Test Model Load": "Tester le chargement du modèle",
        "Warmup": "Préchauffage",
        "Export Annotated Image": "Exporter l’image annotée",
        "Export CSV": "Exporter CSV",
        "Export CSV / JSON": "Exporter CSV / JSON",
        "Refresh Download URLs": "Actualiser les URL de téléchargement",
        "Download Selected": "Télécharger la sélection",
        "Use Selected Model": "Utiliser le modèle sélectionné",
        "Open Model Folder": "Ouvrir le dossier des modèles",
        "Open GitHub Releases": "Ouvrir GitHub Releases",
        "Open Model Downloads": "Ouvrir les téléchargements de modèles",
        "Open License Center": "Ouvrir le centre de licences",
        "Open Reports": "Ouvrir les rapports",
        "Open Selected Report": "Ouvrir le rapport sélectionné",
        "Re-export Selected": "Réexporter la sélection",
        "Export All Summary": "Exporter le résumé complet",
        "Import Image or Folder": "Importer une image ou un dossier",
        "Select Image": "Sélectionner une image",
        "Select Folder": "Sélectionner un dossier",
        "Select gallery images or folders": "Sélectionner des images ou dossiers de galerie",
        "Select one or more image files or folders. Folders are scanned recursively.": "Sélectionnez un ou plusieurs fichiers image ou dossiers. Les dossiers sont analysés récursivement.",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "Cliquez pour importer une image ou un dossier, ou faites-le glisser ici. Les dossiers sont importés récursivement.",
        "Click to upload images or a folder, or drag them here": "Cliquez pour charger des images ou un dossier, ou faites-les glisser ici",
        "Drag one or more album folders here, or use Add Folder.": "Faites glisser un ou plusieurs dossiers d’album ici, ou utilisez Ajouter un dossier.",
        "Drag album folders into the directory list, or click Add Folder.": "Faites glisser des dossiers d’album dans la liste, ou cliquez sur Ajouter un dossier.",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "Le seuil cosinus est le seuil de similarité faciale : plus il est élevé, plus les clusters sont stricts. DBSCAN utilise en interne la distance cosinus = 1 - seuil cosinus.",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "Seuil de similarité cosinus. Plus la valeur est élevée, plus les clusters sont stricts ; la valeur par défaut est 0,48.",
        "DBSCAN distance threshold": "Seuil de distance DBSCAN",
        "Algorithm: DBSCAN": "Algorithme : DBSCAN",
        "Scan and Cluster": "Analyser et regrouper",
        "Minimum neighboring faces needed for a DBSCAN core point.": "Nombre minimal de visages voisins nécessaire pour un point cœur DBSCAN.",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "Les visages dont la boîte englobante est plus petite que cette valeur en largeur ou hauteur sont ignorés.",
        "No images": "Aucune image",
        "People": "Personnes",
        "ID": "ID",
        "Name": "Nom",
        "Name, notes, and tags are shown here.": "Le nom, les notes et les tags apparaissent ici.",
        "Threshold": "Seuil",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "Cette application s’exécute localement. Les licences du code et des modèles peuvent différer. Les modèles de recherche peuvent être limités à un usage non commercial. Un déploiement commercial requiert une licence de modèle appropriée. Cet outil ne fournit pas de conseil juridique.",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "CUDA n’est pas disponible sur cette machine ; le mode Auto utilisera donc le CPU.",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "Le mode Auto utilise CUDA lorsque CUDAExecutionProvider est disponible, sinon le CPU.",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider est disponible.",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider n’est pas disponible. Installez d’abord une version compatible de onnxruntime-gpu, le runtime CUDA et le pilote GPU.",
        "No downloaded swap models": "Aucun modèle de face swap téléchargé",
        "Only downloaded swap models are shown.": "Seuls les modèles de face swap téléchargés sont affichés.",
        "Download inswapper_128.onnx from Models > Downloads first.": "Téléchargez d’abord inswapper_128.onnx depuis Models > Downloads.",
        "No downloaded GFPGAN models": "Aucun modèle GFPGAN téléchargé",
        "Only downloaded GFPGAN restore models are shown.": "Seuls les modèles de restauration GFPGAN téléchargés sont affichés.",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "Téléchargez d’abord GFPGANv1.4.onnx depuis Models > Downloads.",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "GFPGAN est indisponible tant qu’un modèle GFPGAN n’a pas été téléchargé.",
        "Run GFPGAN face restoration after face swap.": "Exécuter la restauration de visage GFPGAN après le face swap.",
        "Enable GFPGAN restore after face swap": "Activer la restauration GFPGAN après le face swap",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "Sélectionne automatiquement l’image de galerie de chaque identité à partir d’un fichier contenant « gallery », ou la première image triée.",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "Ouvre les règles détaillées des dossiers d’identité pour 1:1, 1:N et le découpage automatique.",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "Ouvrir la page de contact InsightFace pour l’évaluation entreprise, les licences, SDK/API, SLA ou l’entraînement personnalisé.",
        "Evaluation Dataset Rules": "Règles du jeu de données d’évaluation",
        "Prepare local identity folders using one of the supported layouts below.": "Préparez des dossiers d’identité locaux selon l’une des structures prises en charge ci-dessous.",
        "Validate the dataset before running an evaluation.": "Validez le jeu de données avant de lancer une évaluation.",
        "Validate the selected dataset and configuration before running evaluation.": "Validez le jeu de données et la configuration sélectionnés avant de lancer l’évaluation.",
        "Result preview appears here. Video results are saved to the exports folder.": "L’aperçu du résultat apparaît ici. Les résultats vidéo sont enregistrés dans le dossier d’export.",
        "Min det score %": "Score de détection min. %",
        "asset": "ressource",
        "source": "source",
        "kind": "type",
        "release": "version",
        "size": "taille",
        "updated_at": "mis à jour",
        "local status": "état local",
        "download url": "URL de téléchargement",
        "rank": "rang",
        "thumbnail": "vignette",
        "gallery_file": "fichier galerie",
        "similarity": "similarité",
        "threshold": "seuil",
        "decision": "décision",
        "det_score": "score de détection",
        "person_id": "ID personne",
        "person_name": "nom de personne",
        "status": "état",
        "sample_id": "ID échantillon",
        "crop_path": "chemin du recadrage",
        "image_path": "chemin image",
        "face_index": "index visage",
        "bbox": "boîte",
        "video_path": "chemin vidéo",
        "timestamp_ms": "horodatage ms",
        "timestamp_hhmmss": "temps",
        "frame_index": "index image",
        "id": "ID",
        "date": "date",
        "scenario": "scénario",
        "model": "modèle",
        "provider": "fournisseur",
        "report_path": "chemin du rapport",
        "quality_score": "score qualité",
        "cluster_id": "ID cluster",
        "face_count": "visages",
        "photo_count": "photos",
        "average_quality": "qualité moyenne",
        "sample_paths": "chemins des échantillons",
        "model_name": "nom du modèle",
        "source_image_path": "chemin de l’image source",
    },
    "de": {
        "<a href='#'>Browse</a>": "<a href='#'>Durchsuchen</a>",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
        "custom model directory": "benutzerdefiniertes Modellverzeichnis",
        "Custom model directory": "Benutzerdefiniertes Modellverzeichnis",
        "Auto": "Auto",
        "Browse": "Durchsuchen",
        "Add Person": "Person hinzufügen",
        "Add as New Person": "Als neue Person hinzufügen",
        "Assign to Existing Person": "Bestehender Person zuweisen",
        "Compare": "Vergleichen",
        "Search": "Suchen",
        "Export": "Exportieren",
        "Export Result": "Ergebnis exportieren",
        "Export Results": "Ergebnisse exportieren",
        "Export Summary": "Zusammenfassung exportieren",
        "Export Settings": "Einstellungen exportieren",
        "Import Settings": "Einstellungen importieren",
        "Delete": "Löschen",
        "Delete Selected": "Auswahl löschen",
        "Reset": "Zurücksetzen",
        "Reset Settings": "Einstellungen zurücksetzen",
        "Refresh": "Aktualisieren",
        "Start": "Starten",
        "Stop": "Stoppen",
        "Open": "Öffnen",
        "Save Settings": "Einstellungen speichern",
        "Save Details": "Details speichern",
        "Save crops": "Ausschnitte speichern",
        "Save face crops": "Gesichtsausschnitte speichern",
        "Save recognition logs": "Erkennungsprotokolle speichern",
        "Anonymize report paths": "Berichtspfade anonymisieren",
        "Privacy": "Datenschutz",
        "Recursive": "Rekursiv",
        "Identify people": "Personen identifizieren",
        "Camera index": "Kameraindex",
        "Frame skip": "Frames überspringen",
        "Frame interval": "Frameintervall",
        "Target person": "Zielperson",
        "Check Cameras": "Kameras prüfen",
        "Register Current Face": "Aktuelles Gesicht registrieren",
        "Refresh People": "Personen aktualisieren",
        "Recognize Faces": "Gesichter erkennen",
        "Test Model Load": "Modellladen testen",
        "Warmup": "Aufwärmen",
        "Export Annotated Image": "Annotiertes Bild exportieren",
        "Export CSV": "CSV exportieren",
        "Export CSV / JSON": "CSV / JSON exportieren",
        "Refresh Download URLs": "Download-URLs aktualisieren",
        "Download Selected": "Auswahl herunterladen",
        "Use Selected Model": "Ausgewähltes Modell verwenden",
        "Open Model Folder": "Modellordner öffnen",
        "Open GitHub Releases": "GitHub Releases öffnen",
        "Open Model Downloads": "Modelldownloads öffnen",
        "Open License Center": "Lizenzcenter öffnen",
        "Open Reports": "Berichte öffnen",
        "Open Selected Report": "Ausgewählten Bericht öffnen",
        "Re-export Selected": "Auswahl erneut exportieren",
        "Export All Summary": "Gesamtübersicht exportieren",
        "Import Image or Folder": "Bild oder Ordner importieren",
        "Select Image": "Bild auswählen",
        "Select Folder": "Ordner auswählen",
        "Select gallery images or folders": "Galeriebilder oder Ordner auswählen",
        "Select one or more image files or folders. Folders are scanned recursively.": "Wählen Sie eine oder mehrere Bilddateien oder Ordner aus. Ordner werden rekursiv gescannt.",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "Klicken Sie, um ein Bild oder einen Ordner zu importieren, oder ziehen Sie ihn hierher. Ordner werden rekursiv importiert.",
        "Click to upload images or a folder, or drag them here": "Klicken Sie zum Hochladen von Bildern oder eines Ordners, oder ziehen Sie sie hierher",
        "Drag one or more album folders here, or use Add Folder.": "Ziehen Sie einen oder mehrere Albumordner hierher oder verwenden Sie Ordner hinzufügen.",
        "Drag album folders into the directory list, or click Add Folder.": "Ziehen Sie Albumordner in die Verzeichnisliste oder klicken Sie auf Ordner hinzufügen.",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "Der Kosinusschwellenwert ist die Grenze für Gesichtähnlichkeit: höhere Werte machen Cluster strenger. DBSCAN verwendet intern Kosinusdistanz = 1 - Kosinusschwellenwert.",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "Kosinussimilaritätsschwelle. Höhere Werte machen Cluster strenger; Standard ist 0,48.",
        "DBSCAN distance threshold": "DBSCAN-Distanzschwelle",
        "Algorithm: DBSCAN": "Algorithmus: DBSCAN",
        "Scan and Cluster": "Scannen und clustern",
        "Minimum neighboring faces needed for a DBSCAN core point.": "Mindestanzahl benachbarter Gesichter für einen DBSCAN-Kernpunkt.",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "Gesichter, deren Boxbreite oder -höhe kleiner als dieser Wert ist, werden übersprungen.",
        "No images": "Keine Bilder",
        "People": "Personen",
        "ID": "ID",
        "Name": "Name",
        "Name, notes, and tags are shown here.": "Name, Notizen und Tags werden hier angezeigt.",
        "Threshold": "Schwelle",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "Diese Anwendung läuft lokal. Code- und Modelllizenzen können sich unterscheiden. Forschungsmodelle können auf nichtkommerzielle Nutzung beschränkt sein. Kommerzielle Bereitstellung erfordert eine geeignete Modelllizenz. Dieses Tool bietet keine Rechtsberatung.",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "CUDA ist auf diesem Rechner nicht verfügbar; Auto verwendet daher die CPU.",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "Auto verwendet CUDA, wenn CUDAExecutionProvider verfügbar ist, andernfalls CPU.",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider ist verfügbar.",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider ist nicht verfügbar. Installieren Sie zuerst passendes onnxruntime-gpu, CUDA Runtime und GPU-Treiber.",
        "No downloaded swap models": "Keine heruntergeladenen Face-Swap-Modelle",
        "Only downloaded swap models are shown.": "Es werden nur heruntergeladene Face-Swap-Modelle angezeigt.",
        "Download inswapper_128.onnx from Models > Downloads first.": "Laden Sie zuerst inswapper_128.onnx unter Models > Downloads herunter.",
        "No downloaded GFPGAN models": "Keine heruntergeladenen GFPGAN-Modelle",
        "Only downloaded GFPGAN restore models are shown.": "Es werden nur heruntergeladene GFPGAN-Wiederherstellungsmodelle angezeigt.",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "Laden Sie zuerst GFPGANv1.4.onnx unter Models > Downloads herunter.",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "GFPGAN ist erst nach dem Herunterladen eines GFPGAN-Modells verfügbar.",
        "Run GFPGAN face restoration after face swap.": "GFPGAN-Gesichtswiederherstellung nach dem Face Swap ausführen.",
        "Enable GFPGAN restore after face swap": "GFPGAN-Wiederherstellung nach Face Swap aktivieren",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "Wählt das Galeriebild jeder Identität automatisch aus einer Datei mit „gallery“ im Namen oder dem ersten sortierten Bild.",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "Öffnet die detaillierten Identitätsordnerregeln für 1:1, 1:N und automatische Aufteilung.",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "Öffnet die InsightFace-Kontaktseite für Unternehmensevaluierung, Lizenzierung, SDK/API, SLA oder individuelles Training.",
        "Evaluation Dataset Rules": "Regeln für Evaluierungsdatensätze",
        "Prepare local identity folders using one of the supported layouts below.": "Bereiten Sie lokale Identitätsordner mit einer der unten unterstützten Strukturen vor.",
        "Validate the dataset before running an evaluation.": "Validieren Sie den Datensatz, bevor Sie eine Evaluierung starten.",
        "Validate the selected dataset and configuration before running evaluation.": "Validieren Sie den ausgewählten Datensatz und die Konfiguration vor der Evaluierung.",
        "Result preview appears here. Video results are saved to the exports folder.": "Die Ergebnisvorschau erscheint hier. Videoergebnisse werden im Exportordner gespeichert.",
        "Min det score %": "Min. Detektionsscore %",
        "asset": "Asset",
        "source": "Quelle",
        "kind": "Art",
        "release": "Release",
        "size": "Größe",
        "updated_at": "aktualisiert",
        "local status": "lokaler Status",
        "download url": "Download-URL",
        "rank": "Rang",
        "thumbnail": "Miniatur",
        "gallery_file": "Galeriedatei",
        "similarity": "Ähnlichkeit",
        "threshold": "Schwelle",
        "decision": "Entscheidung",
        "det_score": "Detektionsscore",
        "person_id": "Personen-ID",
        "person_name": "Personenname",
        "status": "Status",
        "sample_id": "Sample-ID",
        "crop_path": "Ausschnittspfad",
        "image_path": "Bildpfad",
        "face_index": "Gesichtsindex",
        "bbox": "Box",
        "video_path": "Videopfad",
        "timestamp_ms": "Zeitstempel ms",
        "timestamp_hhmmss": "Zeit",
        "frame_index": "Frameindex",
        "id": "ID",
        "date": "Datum",
        "scenario": "Szenario",
        "model": "Modell",
        "provider": "Provider",
        "report_path": "Berichtspfad",
        "quality_score": "Qualitätsscore",
        "cluster_id": "Cluster-ID",
        "face_count": "Gesichter",
        "photo_count": "Fotos",
        "average_quality": "Durchschnittsqualität",
        "sample_paths": "Sample-Pfade",
        "model_name": "Modellname",
        "source_image_path": "Quellbildpfad",
    },
    "pt": {
        "<a href='#'>Browse</a>": "<a href='#'>Procurar</a>",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
        "custom model directory": "diretório de modelo personalizado",
        "Custom model directory": "Diretório de modelo personalizado",
        "Auto": "Automático",
        "Browse": "Procurar",
        "Add Person": "Adicionar pessoa",
        "Add as New Person": "Adicionar como nova pessoa",
        "Assign to Existing Person": "Atribuir a pessoa existente",
        "Compare": "Comparar",
        "Search": "Pesquisar",
        "Export": "Exportar",
        "Export Result": "Exportar resultado",
        "Export Results": "Exportar resultados",
        "Export Summary": "Exportar resumo",
        "Export Settings": "Exportar definições",
        "Import Settings": "Importar definições",
        "Delete": "Eliminar",
        "Delete Selected": "Eliminar seleção",
        "Reset": "Repor",
        "Reset Settings": "Repor definições",
        "Refresh": "Atualizar",
        "Start": "Iniciar",
        "Stop": "Parar",
        "Open": "Abrir",
        "Save Settings": "Guardar definições",
        "Save Details": "Guardar detalhes",
        "Save crops": "Guardar recortes",
        "Save face crops": "Guardar recortes de rosto",
        "Save recognition logs": "Guardar registos de reconhecimento",
        "Anonymize report paths": "Anonimizar caminhos dos relatórios",
        "Privacy": "Privacidade",
        "Recursive": "Recursivo",
        "Identify people": "Identificar pessoas",
        "Camera index": "Índice da câmara",
        "Frame skip": "Saltar fotogramas",
        "Frame interval": "Intervalo de fotogramas",
        "Target person": "Pessoa alvo",
        "Check Cameras": "Verificar câmaras",
        "Register Current Face": "Registar rosto atual",
        "Refresh People": "Atualizar pessoas",
        "Recognize Faces": "Reconhecer rostos",
        "Test Model Load": "Testar carregamento do modelo",
        "Warmup": "Aquecimento",
        "Export Annotated Image": "Exportar imagem anotada",
        "Export CSV": "Exportar CSV",
        "Export CSV / JSON": "Exportar CSV / JSON",
        "Refresh Download URLs": "Atualizar URLs de transferência",
        "Download Selected": "Transferir seleção",
        "Use Selected Model": "Usar modelo selecionado",
        "Open Model Folder": "Abrir pasta de modelos",
        "Open GitHub Releases": "Abrir GitHub Releases",
        "Open Model Downloads": "Abrir transferências de modelos",
        "Open License Center": "Abrir centro de licenças",
        "Open Reports": "Abrir relatórios",
        "Open Selected Report": "Abrir relatório selecionado",
        "Re-export Selected": "Reexportar seleção",
        "Export All Summary": "Exportar resumo completo",
        "Import Image or Folder": "Importar imagem ou pasta",
        "Select Image": "Selecionar imagem",
        "Select Folder": "Selecionar pasta",
        "Select gallery images or folders": "Selecionar imagens ou pastas da galeria",
        "Select one or more image files or folders. Folders are scanned recursively.": "Selecione um ou mais ficheiros de imagem ou pastas. As pastas são analisadas recursivamente.",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "Clique para importar uma imagem ou pasta, ou arraste-a para aqui. As pastas são importadas recursivamente.",
        "Click to upload images or a folder, or drag them here": "Clique para carregar imagens ou uma pasta, ou arraste-as para aqui",
        "Drag one or more album folders here, or use Add Folder.": "Arraste uma ou mais pastas de álbum para aqui, ou use Adicionar pasta.",
        "Drag album folders into the directory list, or click Add Folder.": "Arraste pastas de álbum para a lista de diretórios, ou clique em Adicionar pasta.",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "O limiar de cosseno é o corte de similaridade facial: valores mais altos tornam os clusters mais rigorosos. O DBSCAN usa internamente distância de cosseno = 1 - limiar de cosseno.",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "Limiar de similaridade de cosseno. Valores mais altos tornam os clusters mais rigorosos; predefinição 0,48.",
        "DBSCAN distance threshold": "Limiar de distância DBSCAN",
        "Algorithm: DBSCAN": "Algoritmo: DBSCAN",
        "Scan and Cluster": "Analisar e agrupar",
        "Minimum neighboring faces needed for a DBSCAN core point.": "Número mínimo de rostos vizinhos necessário para um ponto central do DBSCAN.",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "Rostos cuja caixa delimitadora tenha largura ou altura inferior a este valor são ignorados.",
        "No images": "Sem imagens",
        "People": "Pessoas",
        "ID": "ID",
        "Name": "Nome",
        "Name, notes, and tags are shown here.": "O nome, notas e etiquetas aparecem aqui.",
        "Threshold": "Limiar",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "Esta aplicação é executada localmente. As licenças do código e dos modelos podem diferir. Modelos de investigação podem estar limitados a uso não comercial. A implantação comercial requer uma licença de modelo adequada. Esta ferramenta não fornece aconselhamento jurídico.",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "CUDA não está disponível nesta máquina, por isso Automático usará CPU.",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "Automático usa CUDA quando CUDAExecutionProvider está disponível; caso contrário usa CPU.",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider está disponível.",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider não está disponível. Instale primeiro onnxruntime-gpu compatível, runtime CUDA e driver GPU.",
        "No downloaded swap models": "Não há modelos de troca de rostos transferidos",
        "Only downloaded swap models are shown.": "Só são mostrados modelos de troca de rostos transferidos.",
        "Download inswapper_128.onnx from Models > Downloads first.": "Transfira primeiro inswapper_128.onnx em Models > Downloads.",
        "No downloaded GFPGAN models": "Não há modelos GFPGAN transferidos",
        "Only downloaded GFPGAN restore models are shown.": "Só são mostrados modelos GFPGAN de restauro transferidos.",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "Transfira primeiro GFPGANv1.4.onnx em Models > Downloads.",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "GFPGAN fica indisponível até transferir um modelo GFPGAN.",
        "Run GFPGAN face restoration after face swap.": "Executar restauro facial GFPGAN após a troca de rostos.",
        "Enable GFPGAN restore after face swap": "Ativar restauro GFPGAN após troca de rostos",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "Seleciona automaticamente a imagem de galeria de cada identidade a partir de um ficheiro que contenha “gallery”, ou da primeira imagem ordenada.",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "Abre as regras detalhadas de pastas de identidade para 1:1, 1:N e Divisão automática.",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "Abrir a página de contacto da InsightFace para avaliação empresarial, licenciamento, SDK/API, SLA ou treino personalizado.",
        "Evaluation Dataset Rules": "Regras do dataset de avaliação",
        "Prepare local identity folders using one of the supported layouts below.": "Prepare pastas locais de identidade usando uma das estruturas suportadas abaixo.",
        "Validate the dataset before running an evaluation.": "Valide o dataset antes de executar uma avaliação.",
        "Validate the selected dataset and configuration before running evaluation.": "Valide o dataset e a configuração selecionados antes de executar a avaliação.",
        "Result preview appears here. Video results are saved to the exports folder.": "A pré-visualização do resultado aparece aqui. Os resultados de vídeo são guardados na pasta de exportações.",
        "Min det score %": "Pontuação mínima de deteção %",
        "asset": "recurso",
        "source": "origem",
        "kind": "tipo",
        "release": "versão",
        "size": "tamanho",
        "updated_at": "atualizado",
        "local status": "estado local",
        "download url": "URL de transferência",
        "rank": "classificação",
        "thumbnail": "miniatura",
        "gallery_file": "ficheiro da galeria",
        "similarity": "similaridade",
        "threshold": "limiar",
        "decision": "decisão",
        "det_score": "pontuação de deteção",
        "person_id": "ID da pessoa",
        "person_name": "nome da pessoa",
        "status": "estado",
        "sample_id": "ID da amostra",
        "crop_path": "caminho do recorte",
        "image_path": "caminho da imagem",
        "face_index": "índice do rosto",
        "bbox": "caixa",
        "video_path": "caminho do vídeo",
        "timestamp_ms": "timestamp ms",
        "timestamp_hhmmss": "hora",
        "frame_index": "índice do fotograma",
        "id": "ID",
        "date": "data",
        "scenario": "cenário",
        "model": "modelo",
        "provider": "fornecedor",
        "report_path": "caminho do relatório",
        "quality_score": "pontuação de qualidade",
        "cluster_id": "ID do cluster",
        "face_count": "rostos",
        "photo_count": "fotos",
        "average_quality": "qualidade média",
        "sample_paths": "caminhos das amostras",
        "model_name": "nome do modelo",
        "source_image_path": "caminho da imagem de origem",
    },
    "ru": {
        "<a href='#'>Browse</a>": "<a href='#'>Обзор</a>",
        "InsightFace Evaluation Studio": "InsightFace Evaluation Studio",
        "custom model directory": "пользовательский каталог модели",
        "Custom model directory": "Пользовательский каталог модели",
        "Auto": "Авто",
        "Browse": "Обзор",
        "Add Person": "Добавить человека",
        "Add as New Person": "Добавить как нового человека",
        "Assign to Existing Person": "Назначить существующему человеку",
        "Compare": "Сравнить",
        "Search": "Поиск",
        "Export": "Экспорт",
        "Export Result": "Экспорт результата",
        "Export Results": "Экспорт результатов",
        "Export Summary": "Экспорт сводки",
        "Export Settings": "Экспорт настроек",
        "Import Settings": "Импорт настроек",
        "Delete": "Удалить",
        "Delete Selected": "Удалить выбранное",
        "Reset": "Сброс",
        "Reset Settings": "Сбросить настройки",
        "Refresh": "Обновить",
        "Start": "Старт",
        "Stop": "Стоп",
        "Open": "Открыть",
        "Save Settings": "Сохранить настройки",
        "Save Details": "Сохранить детали",
        "Save crops": "Сохранять кадры",
        "Save face crops": "Сохранять кадры лиц",
        "Save recognition logs": "Сохранять журналы распознавания",
        "Anonymize report paths": "Анонимизировать пути в отчётах",
        "Privacy": "Конфиденциальность",
        "Recursive": "Рекурсивно",
        "Identify people": "Идентифицировать людей",
        "Camera index": "Индекс камеры",
        "Frame skip": "Пропуск кадров",
        "Frame interval": "Интервал кадров",
        "Target person": "Целевая персона",
        "Check Cameras": "Проверить камеры",
        "Register Current Face": "Зарегистрировать текущее лицо",
        "Refresh People": "Обновить людей",
        "Recognize Faces": "Распознать лица",
        "Test Model Load": "Проверить загрузку модели",
        "Warmup": "Прогрев",
        "Export Annotated Image": "Экспортировать размеченное изображение",
        "Export CSV": "Экспорт CSV",
        "Export CSV / JSON": "Экспорт CSV / JSON",
        "Refresh Download URLs": "Обновить URL загрузки",
        "Download Selected": "Загрузить выбранное",
        "Use Selected Model": "Использовать выбранную модель",
        "Open Model Folder": "Открыть папку моделей",
        "Open GitHub Releases": "Открыть GitHub Releases",
        "Open Model Downloads": "Открыть загрузки моделей",
        "Open License Center": "Открыть центр лицензий",
        "Open Reports": "Открыть отчёты",
        "Open Selected Report": "Открыть выбранный отчёт",
        "Re-export Selected": "Переэкспортировать выбранное",
        "Export All Summary": "Экспорт общей сводки",
        "Import Image or Folder": "Импортировать изображение или папку",
        "Select Image": "Выбрать изображение",
        "Select Folder": "Выбрать папку",
        "Select gallery images or folders": "Выбрать изображения или папки галереи",
        "Select one or more image files or folders. Folders are scanned recursively.": "Выберите один или несколько файлов изображений или папок. Папки сканируются рекурсивно.",
        "Click to import an image or folder, or drag one here. Folders are imported recursively.": "Нажмите для импорта изображения или папки либо перетащите сюда. Папки импортируются рекурсивно.",
        "Click to upload images or a folder, or drag them here": "Нажмите для загрузки изображений или папки либо перетащите их сюда",
        "Drag one or more album folders here, or use Add Folder.": "Перетащите сюда одну или несколько папок альбома либо используйте «Добавить папку».",
        "Drag album folders into the directory list, or click Add Folder.": "Перетащите папки альбома в список каталогов или нажмите «Добавить папку».",
        "Cosine threshold is a face similarity cutoff: higher values make clusters stricter. DBSCAN internally uses cosine distance = 1 - cosine threshold.": "Косинусный порог задаёт отсечку сходства лиц: чем выше значение, тем строже кластеры. DBSCAN внутренне использует косинусную дистанцию = 1 - косинусный порог.",
        "Cosine similarity threshold. Higher values make clusters stricter; default is 0.48.": "Порог косинусного сходства. Более высокие значения делают кластеры строже; значение по умолчанию 0,48.",
        "DBSCAN distance threshold": "Порог дистанции DBSCAN",
        "Algorithm: DBSCAN": "Алгоритм: DBSCAN",
        "Scan and Cluster": "Сканировать и кластеризовать",
        "Minimum neighboring faces needed for a DBSCAN core point.": "Минимальное число соседних лиц для ядровой точки DBSCAN.",
        "Faces whose bounding box width or height is smaller than this value are skipped.": "Лица, ширина или высота рамки которых меньше этого значения, пропускаются.",
        "No images": "Нет изображений",
        "People": "Люди",
        "ID": "ID",
        "Name": "Имя",
        "Name, notes, and tags are shown here.": "Здесь отображаются имя, заметки и теги.",
        "Threshold": "Порог",
        "This application runs locally. Code and model licenses may differ. Research models may be limited to non-commercial use. Commercial deployment requires appropriate model license. This tool does not provide legal advice.": "Это приложение работает локально. Лицензии кода и моделей могут различаться. Исследовательские модели могут быть ограничены некоммерческим использованием. Коммерческое развертывание требует соответствующей лицензии на модель. Этот инструмент не предоставляет юридических консультаций.",
        "CUDA is unavailable on this machine, so Auto will use CPU.": "CUDA недоступна на этом компьютере, поэтому Авто будет использовать CPU.",
        "Auto uses CUDA when CUDAExecutionProvider is available, otherwise CPU.": "Авто использует CUDA, когда доступен CUDAExecutionProvider, иначе CPU.",
        "CUDAExecutionProvider is available.": "CUDAExecutionProvider доступен.",
        "CUDAExecutionProvider is not available. Install a matching onnxruntime-gpu, CUDA runtime, and GPU driver first.": "CUDAExecutionProvider недоступен. Сначала установите совместимые onnxruntime-gpu, CUDA runtime и драйвер GPU.",
        "No downloaded swap models": "Нет загруженных моделей замены лиц",
        "Only downloaded swap models are shown.": "Показаны только загруженные модели замены лиц.",
        "Download inswapper_128.onnx from Models > Downloads first.": "Сначала загрузите inswapper_128.onnx в Models > Downloads.",
        "No downloaded GFPGAN models": "Нет загруженных моделей GFPGAN",
        "Only downloaded GFPGAN restore models are shown.": "Показаны только загруженные модели восстановления GFPGAN.",
        "Download GFPGANv1.4.onnx from Models > Downloads first.": "Сначала загрузите GFPGANv1.4.onnx в Models > Downloads.",
        "GFPGAN is unavailable until a GFPGAN model is downloaded.": "GFPGAN недоступен, пока модель GFPGAN не загружена.",
        "Run GFPGAN face restoration after face swap.": "Запускать восстановление лиц GFPGAN после замены лиц.",
        "Enable GFPGAN restore after face swap": "Включить восстановление GFPGAN после замены лиц",
        "Automatically select each identity's gallery image from a file containing 'gallery', or the first sorted image.": "Автоматически выбирает галерейное изображение каждой идентичности из файла с «gallery» в имени или первое изображение по сортировке.",
        "Open the detailed identity folder rules for 1:1, 1:N, and Auto Split.": "Открыть подробные правила папок идентичностей для 1:1, 1:N и авторазделения.",
        "Open the InsightFace contact page for enterprise evaluation, licensing, SDK/API, SLA, or custom training help.": "Открыть страницу контактов InsightFace для корпоративной оценки, лицензирования, SDK/API, SLA или индивидуального обучения.",
        "Evaluation Dataset Rules": "Правила датасета оценки",
        "Prepare local identity folders using one of the supported layouts below.": "Подготовьте локальные папки идентичностей в одной из поддерживаемых структур ниже.",
        "Validate the dataset before running an evaluation.": "Проверьте датасет перед запуском оценки.",
        "Validate the selected dataset and configuration before running evaluation.": "Проверьте выбранный датасет и конфигурацию перед запуском оценки.",
        "Result preview appears here. Video results are saved to the exports folder.": "Предпросмотр результата появится здесь. Видео сохраняются в папку экспорта.",
        "Min det score %": "Мин. score детекции %",
        "asset": "ресурс",
        "source": "источник",
        "kind": "тип",
        "release": "релиз",
        "size": "размер",
        "updated_at": "обновлено",
        "local status": "локальный статус",
        "download url": "URL загрузки",
        "rank": "ранг",
        "thumbnail": "миниатюра",
        "gallery_file": "файл галереи",
        "similarity": "сходство",
        "threshold": "порог",
        "decision": "решение",
        "det_score": "score детекции",
        "person_id": "ID человека",
        "person_name": "имя человека",
        "status": "статус",
        "sample_id": "ID образца",
        "crop_path": "путь кадра",
        "image_path": "путь изображения",
        "face_index": "индекс лица",
        "bbox": "рамка",
        "video_path": "путь видео",
        "timestamp_ms": "временная метка ms",
        "timestamp_hhmmss": "время",
        "frame_index": "индекс кадра",
        "id": "ID",
        "date": "дата",
        "scenario": "сценарий",
        "model": "модель",
        "provider": "провайдер",
        "report_path": "путь отчёта",
        "quality_score": "score качества",
        "cluster_id": "ID кластера",
        "face_count": "лиц",
        "photo_count": "фото",
        "average_quality": "среднее качество",
        "sample_paths": "пути образцов",
        "model_name": "имя модели",
        "source_image_path": "путь исходного изображения",
    },
}

for _lang, _values in _ADDITIONAL_UI_TRANSLATIONS.items():
    _TRANSLATIONS.setdefault(_lang, {}).update(_values)


_DYNAMIC_UI_TRANSLATIONS: dict[str, dict[str, str]] = {
    "zh": {
        "Click to upload or drag a file here": "点击上传，或将文件拖到这里",
        "Drop another file to replace it": "拖入另一个文件可替换当前文件",
        "Click or drag more images or folders to add to Gallery.": "点击或继续拖入图片/文件夹以添加到 Gallery。",
        "Image swap saved. Click Result to open it.": "图片换脸结果已保存。点击结果区域可打开文件。",
        "Video swap saved. Click Result to open it.": "视频换脸结果已保存。点击结果区域可打开文件。",
        "image": "image",
        "images": "images",
    },
    "ja": {
        "Click to upload or drag a file here": "クリックしてアップロードするか、ファイルをここにドラッグしてください",
        "Drop another file to replace it": "別のファイルをドロップすると置き換えられます",
        "Click or drag more images or folders to add to Gallery.": "クリックするか画像/フォルダをさらにドラッグしてギャラリーに追加します。",
        "Image swap saved. Click Result to open it.": "画像の顔交換結果を保存しました。結果エリアをクリックして開けます。",
        "Video swap saved. Click Result to open it.": "動画の顔交換結果を保存しました。結果エリアをクリックして開けます。",
        "image": "画像",
        "images": "画像",
    },
    "ko": {
        "Click to upload or drag a file here": "클릭하여 업로드하거나 파일을 여기로 끌어오십시오",
        "Drop another file to replace it": "다른 파일을 놓으면 현재 파일을 교체합니다",
        "Click or drag more images or folders to add to Gallery.": "클릭하거나 이미지/폴더를 더 끌어와 Gallery에 추가하십시오.",
        "Image swap saved. Click Result to open it.": "이미지 얼굴 교체 결과가 저장되었습니다. 결과 영역을 클릭하면 열 수 있습니다.",
        "Video swap saved. Click Result to open it.": "비디오 얼굴 교체 결과가 저장되었습니다. 결과 영역을 클릭하면 열 수 있습니다.",
        "image": "이미지",
        "images": "이미지",
    },
    "es": {
        "Click to upload or drag a file here": "Haga clic para subir un archivo o arrástrelo aquí",
        "Drop another file to replace it": "Suelte otro archivo para reemplazarlo",
        "Click or drag more images or folders to add to Gallery.": "Haga clic o arrastre más imágenes o carpetas para añadirlas a la galería.",
        "Image swap saved. Click Result to open it.": "Intercambio de imagen guardado. Haga clic en el área de resultado para abrirlo.",
        "Video swap saved. Click Result to open it.": "Intercambio de vídeo guardado. Haga clic en el área de resultado para abrirlo.",
        "image": "imagen",
        "images": "imágenes",
    },
    "fr": {
        "Click to upload or drag a file here": "Cliquez pour charger un fichier ou faites-le glisser ici",
        "Drop another file to replace it": "Déposez un autre fichier pour le remplacer",
        "Click or drag more images or folders to add to Gallery.": "Cliquez ou faites glisser d’autres images ou dossiers pour les ajouter à la galerie.",
        "Image swap saved. Click Result to open it.": "Face swap d’image enregistré. Cliquez sur la zone de résultat pour l’ouvrir.",
        "Video swap saved. Click Result to open it.": "Face swap vidéo enregistré. Cliquez sur la zone de résultat pour l’ouvrir.",
        "image": "image",
        "images": "images",
    },
    "de": {
        "Click to upload or drag a file here": "Klicken Sie zum Hochladen oder ziehen Sie eine Datei hierher",
        "Drop another file to replace it": "Legen Sie eine andere Datei ab, um sie zu ersetzen",
        "Click or drag more images or folders to add to Gallery.": "Klicken oder ziehen Sie weitere Bilder oder Ordner hierher, um sie zur Galerie hinzuzufügen.",
        "Image swap saved. Click Result to open it.": "Bild-Face-Swap gespeichert. Klicken Sie auf den Ergebnisbereich, um ihn zu öffnen.",
        "Video swap saved. Click Result to open it.": "Video-Face-Swap gespeichert. Klicken Sie auf den Ergebnisbereich, um ihn zu öffnen.",
        "image": "Bild",
        "images": "Bilder",
    },
    "pt": {
        "Click to upload or drag a file here": "Clique para carregar um ficheiro ou arraste-o para aqui",
        "Drop another file to replace it": "Largue outro ficheiro para substituir",
        "Click or drag more images or folders to add to Gallery.": "Clique ou arraste mais imagens ou pastas para adicionar à galeria.",
        "Image swap saved. Click Result to open it.": "Troca de rosto em imagem guardada. Clique na área de resultado para abrir.",
        "Video swap saved. Click Result to open it.": "Troca de rosto em vídeo guardada. Clique na área de resultado para abrir.",
        "image": "imagem",
        "images": "imagens",
    },
    "ru": {
        "Click to upload or drag a file here": "Нажмите для загрузки файла или перетащите его сюда",
        "Drop another file to replace it": "Перетащите другой файл, чтобы заменить текущий",
        "Click or drag more images or folders to add to Gallery.": "Нажмите или перетащите дополнительные изображения/папки, чтобы добавить их в галерею.",
        "Image swap saved. Click Result to open it.": "Результат замены лиц на изображении сохранён. Нажмите область результата, чтобы открыть его.",
        "Video swap saved. Click Result to open it.": "Результат замены лиц в видео сохранён. Нажмите область результата, чтобы открыть его.",
        "image": "изображение",
        "images": "изображений",
    },
}

for _lang, _values in _DYNAMIC_UI_TRANSLATIONS.items():
    _TRANSLATIONS.setdefault(_lang, {}).update(_values)


_STATUS_ERROR_TRANSLATIONS: dict[str, dict[str, str]] = {
    "zh": {
        "Select album folder": "选择相册文件夹",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "当前没有选择相册目录。全部重建将清空已保存的相册聚类结果。是否继续？",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "全部重建会重新处理所选相册目录中的每张图片，并替换已保存的聚类结果。是否继续？",
        "Model is not loaded. Please open Models.": "模型尚未加载。请打开 Models。",
        "Image read failure.": "图片读取失败。",
        "Please upload a query image.": "请上传查询图片。",
        "Please upload one or more gallery images or folders.": "请上传一个或多个 Gallery 图片或文件夹。",
        "Please select identity folders or a dataset root.": "请选择身份文件夹或数据集根目录。",
        "Please validate this dataset and configuration before running evaluation.": "请先核验该数据集和配置，再运行评测。",
        "Run an evaluation first.": "请先运行一次评测。",
        "PDF export is unavailable. Please install reportlab.": "PDF 导出不可用。请安装 reportlab。",
        "Select a source image first.": "请先选择源图。",
        "Select a target image or video first.": "请先选择目标图片或视频。",
        "Face swap model not found. Please download and choose a swap model in Models.": "未找到换脸模型。请在 Models 中下载并选择换脸模型。",
        "Unsupported target file type.": "不支持的目标文件类型。",
        "No saved result file to open.": "没有可打开的已保存结果文件。",
        "Add one or more album directories first.": "请先添加一个或多个相册目录。",
        "No supported images found in the selected directories.": "所选目录中没有找到支持的图片。",
        "Select a model asset first.": "请先选择一个模型资源。",
        "Selected asset cannot be used as a model package.": "所选资源不能作为模型包使用。",
        "Model settings saved.": "模型设置已保存。",
        "Model loaded successfully.": "模型加载成功。",
        "Model loaded.": "模型已加载。",
        "Cleared.": "已清空。",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "多人脸处理策略已更改，Gallery 特征将重新计算。",
        "Dataset validation passed.": "数据集核验通过。",
        "Dataset validation failed.": "数据集核验失败。",
        "Album directories cleared. Existing clustering results are still available.": "相册目录已清空。已有聚类结果仍可查看。",
        "Saved album clustering results were cleared.": "已保存的相册聚类结果已清空。",
        "Opened InsightFace homepage.": "已打开 InsightFace 主页。",
        "Opened InsightFace enterprise contact page.": "已打开 InsightFace 企业联系页面。",
    },
    "ja": {
        "Select album folder": "アルバムフォルダを選択",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "アルバムディレクトリが選択されていません。すべて再構築すると保存済みのクラスタリング結果が消去されます。続行しますか？",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "すべて再構築すると、選択したアルバムディレクトリ内の全画像を再処理し、保存済みのクラスタリング結果を置き換えます。続行しますか？",
        "Model is not loaded. Please open Models.": "モデルが読み込まれていません。Models を開いてください。",
        "Image read failure.": "画像の読み込みに失敗しました。",
        "Please upload a query image.": "クエリ画像をアップロードしてください。",
        "Please upload one or more gallery images or folders.": "1つ以上のギャラリー画像またはフォルダをアップロードしてください。",
        "Please select identity folders or a dataset root.": "IDフォルダまたはデータセットルートを選択してください。",
        "Please validate this dataset and configuration before running evaluation.": "評価を実行する前に、このデータセットと設定を検証してください。",
        "Run an evaluation first.": "先に評価を実行してください。",
        "PDF export is unavailable. Please install reportlab.": "PDF 出力は利用できません。reportlab をインストールしてください。",
        "Select a source image first.": "先にソース画像を選択してください。",
        "Select a target image or video first.": "先にターゲット画像または動画を選択してください。",
        "Face swap model not found. Please download and choose a swap model in Models.": "顔交換モデルが見つかりません。Models でモデルをダウンロードして選択してください。",
        "Unsupported target file type.": "サポートされていないターゲットファイル形式です。",
        "No saved result file to open.": "開ける保存済み結果ファイルがありません。",
        "Add one or more album directories first.": "先に1つ以上のアルバムディレクトリを追加してください。",
        "No supported images found in the selected directories.": "選択したディレクトリに対応画像が見つかりません。",
        "Select a model asset first.": "先にモデルアセットを選択してください。",
        "Selected asset cannot be used as a model package.": "選択したアセットはモデルパッケージとして使用できません。",
        "Model settings saved.": "モデル設定を保存しました。",
        "Model loaded successfully.": "モデルを正常に読み込みました。",
        "Model loaded.": "モデルを読み込みました。",
        "Cleared.": "クリアしました。",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "複数顔の処理方法が変更されました。ギャラリー特徴量を再計算します。",
        "Dataset validation passed.": "データセット検証に合格しました。",
        "Dataset validation failed.": "データセット検証に失敗しました。",
        "Album directories cleared. Existing clustering results are still available.": "アルバムディレクトリをクリアしました。既存のクラスタリング結果は引き続き利用できます。",
        "Saved album clustering results were cleared.": "保存済みのアルバムクラスタリング結果を消去しました。",
        "Opened InsightFace homepage.": "InsightFace ホームページを開きました。",
        "Opened InsightFace enterprise contact page.": "InsightFace 企業向けお問い合わせページを開きました。",
    },
    "ko": {
        "Select album folder": "앨범 폴더 선택",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "선택된 앨범 디렉터리가 없습니다. 전체 재빌드는 저장된 앨범 클러스터링 결과를 지웁니다. 계속하시겠습니까?",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "전체 재빌드는 선택한 앨범 디렉터리의 모든 이미지를 다시 처리하고 저장된 클러스터링 결과를 교체합니다. 계속하시겠습니까?",
        "Model is not loaded. Please open Models.": "모델이 로드되지 않았습니다. Models를 여십시오.",
        "Image read failure.": "이미지를 읽지 못했습니다.",
        "Please upload a query image.": "쿼리 이미지를 업로드하십시오.",
        "Please upload one or more gallery images or folders.": "하나 이상의 갤러리 이미지 또는 폴더를 업로드하십시오.",
        "Please select identity folders or a dataset root.": "ID 폴더 또는 데이터셋 루트를 선택하십시오.",
        "Please validate this dataset and configuration before running evaluation.": "평가 실행 전에 이 데이터셋과 구성을 검증하십시오.",
        "Run an evaluation first.": "먼저 평가를 실행하십시오.",
        "PDF export is unavailable. Please install reportlab.": "PDF 내보내기를 사용할 수 없습니다. reportlab을 설치하십시오.",
        "Select a source image first.": "먼저 소스 이미지를 선택하십시오.",
        "Select a target image or video first.": "먼저 대상 이미지 또는 비디오를 선택하십시오.",
        "Face swap model not found. Please download and choose a swap model in Models.": "얼굴 교체 모델을 찾을 수 없습니다. Models에서 모델을 다운로드하고 선택하십시오.",
        "Unsupported target file type.": "지원되지 않는 대상 파일 형식입니다.",
        "No saved result file to open.": "열 수 있는 저장된 결과 파일이 없습니다.",
        "Add one or more album directories first.": "먼저 하나 이상의 앨범 디렉터리를 추가하십시오.",
        "No supported images found in the selected directories.": "선택한 디렉터리에서 지원되는 이미지를 찾지 못했습니다.",
        "Select a model asset first.": "먼저 모델 자산을 선택하십시오.",
        "Selected asset cannot be used as a model package.": "선택한 자산은 모델 패키지로 사용할 수 없습니다.",
        "Model settings saved.": "모델 설정이 저장되었습니다.",
        "Model loaded successfully.": "모델을 성공적으로 로드했습니다.",
        "Model loaded.": "모델이 로드되었습니다.",
        "Cleared.": "지웠습니다.",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "다중 얼굴 처리 방식이 변경되었습니다. Gallery 임베딩을 다시 계산합니다.",
        "Dataset validation passed.": "데이터셋 검증을 통과했습니다.",
        "Dataset validation failed.": "데이터셋 검증에 실패했습니다.",
        "Album directories cleared. Existing clustering results are still available.": "앨범 디렉터리가 지워졌습니다. 기존 클러스터링 결과는 계속 사용할 수 있습니다.",
        "Saved album clustering results were cleared.": "저장된 앨범 클러스터링 결과가 지워졌습니다.",
        "Opened InsightFace homepage.": "InsightFace 홈페이지를 열었습니다.",
        "Opened InsightFace enterprise contact page.": "InsightFace 기업 문의 페이지를 열었습니다.",
    },
    "es": {
        "Select album folder": "Seleccionar carpeta de álbum",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "No hay directorios de álbum seleccionados. Rebuild All borrará los resultados de agrupación guardados. ¿Continuar?",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "Rebuild All reprocesará todas las imágenes de los directorios seleccionados y reemplazará los resultados guardados. ¿Continuar?",
        "Model is not loaded. Please open Models.": "El modelo no está cargado. Abra Models.",
        "Image read failure.": "Error al leer la imagen.",
        "Please upload a query image.": "Suba una imagen de consulta.",
        "Please upload one or more gallery images or folders.": "Suba una o más imágenes o carpetas de galería.",
        "Please select identity folders or a dataset root.": "Seleccione carpetas de identidad o la raíz de un dataset.",
        "Please validate this dataset and configuration before running evaluation.": "Valide este dataset y configuración antes de ejecutar la evaluación.",
        "Run an evaluation first.": "Ejecute primero una evaluación.",
        "PDF export is unavailable. Please install reportlab.": "La exportación PDF no está disponible. Instale reportlab.",
        "Select a source image first.": "Seleccione primero una imagen fuente.",
        "Select a target image or video first.": "Seleccione primero una imagen o vídeo de destino.",
        "Face swap model not found. Please download and choose a swap model in Models.": "No se encontró el modelo de intercambio facial. Descárguelo y selecciónelo en Models.",
        "Unsupported target file type.": "Tipo de archivo de destino no compatible.",
        "No saved result file to open.": "No hay archivo de resultado guardado para abrir.",
        "Add one or more album directories first.": "Añada primero uno o más directorios de álbum.",
        "No supported images found in the selected directories.": "No se encontraron imágenes compatibles en los directorios seleccionados.",
        "Select a model asset first.": "Seleccione primero un recurso de modelo.",
        "Selected asset cannot be used as a model package.": "El recurso seleccionado no puede usarse como paquete de modelo.",
        "Model settings saved.": "Configuración del modelo guardada.",
        "Model loaded successfully.": "Modelo cargado correctamente.",
        "Model loaded.": "Modelo cargado.",
        "Cleared.": "Borrado.",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "Cambió el manejo de múltiples rostros. Se recalcularán los embeddings de la galería.",
        "Dataset validation passed.": "Validación del dataset superada.",
        "Dataset validation failed.": "Validación del dataset fallida.",
        "Album directories cleared. Existing clustering results are still available.": "Directorios de álbum borrados. Los resultados de agrupación existentes siguen disponibles.",
        "Saved album clustering results were cleared.": "Se borraron los resultados de agrupación guardados.",
        "Opened InsightFace homepage.": "Página principal de InsightFace abierta.",
        "Opened InsightFace enterprise contact page.": "Página de contacto empresarial de InsightFace abierta.",
    },
    "fr": {
        "Select album folder": "Sélectionner un dossier d’album",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "Aucun dossier d’album n’est sélectionné. Rebuild All effacera les résultats de clustering enregistrés. Continuer ?",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "Rebuild All retraitera toutes les images des dossiers sélectionnés et remplacera les résultats enregistrés. Continuer ?",
        "Model is not loaded. Please open Models.": "Le modèle n’est pas chargé. Ouvrez Models.",
        "Image read failure.": "Échec de lecture de l’image.",
        "Please upload a query image.": "Chargez une image de requête.",
        "Please upload one or more gallery images or folders.": "Chargez une ou plusieurs images ou dossiers de galerie.",
        "Please select identity folders or a dataset root.": "Sélectionnez des dossiers d’identité ou la racine d’un jeu de données.",
        "Please validate this dataset and configuration before running evaluation.": "Validez ce jeu de données et cette configuration avant l’évaluation.",
        "Run an evaluation first.": "Lancez d’abord une évaluation.",
        "PDF export is unavailable. Please install reportlab.": "L’export PDF est indisponible. Installez reportlab.",
        "Select a source image first.": "Sélectionnez d’abord une image source.",
        "Select a target image or video first.": "Sélectionnez d’abord une image ou vidéo cible.",
        "Face swap model not found. Please download and choose a swap model in Models.": "Modèle de face swap introuvable. Téléchargez et choisissez un modèle dans Models.",
        "Unsupported target file type.": "Type de fichier cible non pris en charge.",
        "No saved result file to open.": "Aucun fichier de résultat enregistré à ouvrir.",
        "Add one or more album directories first.": "Ajoutez d’abord un ou plusieurs dossiers d’album.",
        "No supported images found in the selected directories.": "Aucune image prise en charge trouvée dans les dossiers sélectionnés.",
        "Select a model asset first.": "Sélectionnez d’abord une ressource de modèle.",
        "Selected asset cannot be used as a model package.": "La ressource sélectionnée ne peut pas être utilisée comme package de modèle.",
        "Model settings saved.": "Paramètres du modèle enregistrés.",
        "Model loaded successfully.": "Modèle chargé avec succès.",
        "Model loaded.": "Modèle chargé.",
        "Cleared.": "Effacé.",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "La gestion multi-visages a changé. Les embeddings de galerie seront recalculés.",
        "Dataset validation passed.": "Validation du jeu de données réussie.",
        "Dataset validation failed.": "Validation du jeu de données échouée.",
        "Album directories cleared. Existing clustering results are still available.": "Dossiers d’album effacés. Les résultats de clustering existants restent disponibles.",
        "Saved album clustering results were cleared.": "Les résultats de clustering enregistrés ont été effacés.",
        "Opened InsightFace homepage.": "Page d’accueil InsightFace ouverte.",
        "Opened InsightFace enterprise contact page.": "Page de contact entreprise InsightFace ouverte.",
    },
    "de": {
        "Select album folder": "Albumordner auswählen",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "Es sind keine Albumordner ausgewählt. Rebuild All löscht gespeicherte Clustering-Ergebnisse. Fortfahren?",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "Rebuild All verarbeitet jedes Bild in den ausgewählten Albumordnern erneut und ersetzt gespeicherte Clustering-Ergebnisse. Fortfahren?",
        "Model is not loaded. Please open Models.": "Das Modell ist nicht geladen. Öffnen Sie Models.",
        "Image read failure.": "Bild konnte nicht gelesen werden.",
        "Please upload a query image.": "Laden Sie ein Abfragebild hoch.",
        "Please upload one or more gallery images or folders.": "Laden Sie ein oder mehrere Galeriebilder oder Ordner hoch.",
        "Please select identity folders or a dataset root.": "Wählen Sie Identitätsordner oder eine Datensatzwurzel aus.",
        "Please validate this dataset and configuration before running evaluation.": "Validieren Sie diesen Datensatz und die Konfiguration vor der Evaluierung.",
        "Run an evaluation first.": "Führen Sie zuerst eine Evaluierung aus.",
        "PDF export is unavailable. Please install reportlab.": "PDF-Export ist nicht verfügbar. Installieren Sie reportlab.",
        "Select a source image first.": "Wählen Sie zuerst ein Quellbild aus.",
        "Select a target image or video first.": "Wählen Sie zuerst ein Zielbild oder Video aus.",
        "Face swap model not found. Please download and choose a swap model in Models.": "Face-Swap-Modell nicht gefunden. Laden Sie in Models ein Modell herunter und wählen Sie es aus.",
        "Unsupported target file type.": "Nicht unterstützter Zieldateityp.",
        "No saved result file to open.": "Keine gespeicherte Ergebnisdatei zum Öffnen.",
        "Add one or more album directories first.": "Fügen Sie zuerst einen oder mehrere Albumordner hinzu.",
        "No supported images found in the selected directories.": "In den ausgewählten Ordnern wurden keine unterstützten Bilder gefunden.",
        "Select a model asset first.": "Wählen Sie zuerst ein Modell-Asset aus.",
        "Selected asset cannot be used as a model package.": "Das ausgewählte Asset kann nicht als Modellpaket verwendet werden.",
        "Model settings saved.": "Modelleinstellungen gespeichert.",
        "Model loaded successfully.": "Modell erfolgreich geladen.",
        "Model loaded.": "Modell geladen.",
        "Cleared.": "Geleert.",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "Die Mehrgesicht-Verarbeitung wurde geändert. Galerie-Embeddings werden neu berechnet.",
        "Dataset validation passed.": "Datensatzvalidierung bestanden.",
        "Dataset validation failed.": "Datensatzvalidierung fehlgeschlagen.",
        "Album directories cleared. Existing clustering results are still available.": "Albumordner geleert. Bestehende Clustering-Ergebnisse bleiben verfügbar.",
        "Saved album clustering results were cleared.": "Gespeicherte Album-Clustering-Ergebnisse wurden gelöscht.",
        "Opened InsightFace homepage.": "InsightFace-Homepage geöffnet.",
        "Opened InsightFace enterprise contact page.": "InsightFace-Kontaktseite für Unternehmen geöffnet.",
    },
    "pt": {
        "Select album folder": "Selecionar pasta de álbum",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "Não há diretórios de álbum selecionados. Rebuild All irá limpar os resultados de clustering guardados. Continuar?",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "Rebuild All irá reprocessar todas as imagens nos diretórios selecionados e substituir os resultados guardados. Continuar?",
        "Model is not loaded. Please open Models.": "O modelo não está carregado. Abra Models.",
        "Image read failure.": "Falha ao ler a imagem.",
        "Please upload a query image.": "Carregue uma imagem de consulta.",
        "Please upload one or more gallery images or folders.": "Carregue uma ou mais imagens ou pastas da galeria.",
        "Please select identity folders or a dataset root.": "Selecione pastas de identidade ou a raiz de um dataset.",
        "Please validate this dataset and configuration before running evaluation.": "Valide este dataset e configuração antes de executar a avaliação.",
        "Run an evaluation first.": "Execute primeiro uma avaliação.",
        "PDF export is unavailable. Please install reportlab.": "A exportação PDF não está disponível. Instale reportlab.",
        "Select a source image first.": "Selecione primeiro uma imagem de origem.",
        "Select a target image or video first.": "Selecione primeiro uma imagem ou vídeo de destino.",
        "Face swap model not found. Please download and choose a swap model in Models.": "Modelo de troca de rostos não encontrado. Transfira e escolha um modelo em Models.",
        "Unsupported target file type.": "Tipo de ficheiro de destino não suportado.",
        "No saved result file to open.": "Não há ficheiro de resultado guardado para abrir.",
        "Add one or more album directories first.": "Adicione primeiro um ou mais diretórios de álbum.",
        "No supported images found in the selected directories.": "Não foram encontradas imagens suportadas nos diretórios selecionados.",
        "Select a model asset first.": "Selecione primeiro um recurso de modelo.",
        "Selected asset cannot be used as a model package.": "O recurso selecionado não pode ser usado como pacote de modelo.",
        "Model settings saved.": "Definições do modelo guardadas.",
        "Model loaded successfully.": "Modelo carregado com sucesso.",
        "Model loaded.": "Modelo carregado.",
        "Cleared.": "Limpo.",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "O tratamento de múltiplos rostos mudou. Os embeddings da galeria serão recalculados.",
        "Dataset validation passed.": "Validação do dataset concluída.",
        "Dataset validation failed.": "Validação do dataset falhou.",
        "Album directories cleared. Existing clustering results are still available.": "Diretórios de álbum limpos. Os resultados de clustering existentes continuam disponíveis.",
        "Saved album clustering results were cleared.": "Os resultados de clustering guardados foram limpos.",
        "Opened InsightFace homepage.": "Página inicial InsightFace aberta.",
        "Opened InsightFace enterprise contact page.": "Página de contacto empresarial InsightFace aberta.",
    },
    "ru": {
        "Select album folder": "Выбрать папку альбома",
        "No album directories are selected. Rebuild All will clear saved album clustering results. Continue?": "Папки альбомов не выбраны. Rebuild All очистит сохранённые результаты кластеризации. Продолжить?",
        "Rebuild All will reprocess every image in the selected album directories and replace saved clustering results. Continue?": "Rebuild All заново обработает все изображения в выбранных папках и заменит сохранённые результаты кластеризации. Продолжить?",
        "Model is not loaded. Please open Models.": "Модель не загружена. Откройте Models.",
        "Image read failure.": "Не удалось прочитать изображение.",
        "Please upload a query image.": "Загрузите изображение запроса.",
        "Please upload one or more gallery images or folders.": "Загрузите одно или несколько изображений/папок галереи.",
        "Please select identity folders or a dataset root.": "Выберите папки идентичностей или корень датасета.",
        "Please validate this dataset and configuration before running evaluation.": "Проверьте этот датасет и конфигурацию перед запуском оценки.",
        "Run an evaluation first.": "Сначала запустите оценку.",
        "PDF export is unavailable. Please install reportlab.": "Экспорт PDF недоступен. Установите reportlab.",
        "Select a source image first.": "Сначала выберите исходное изображение.",
        "Select a target image or video first.": "Сначала выберите целевое изображение или видео.",
        "Face swap model not found. Please download and choose a swap model in Models.": "Модель замены лиц не найдена. Загрузите и выберите модель в Models.",
        "Unsupported target file type.": "Неподдерживаемый тип целевого файла.",
        "No saved result file to open.": "Нет сохранённого файла результата для открытия.",
        "Add one or more album directories first.": "Сначала добавьте одну или несколько папок альбомов.",
        "No supported images found in the selected directories.": "В выбранных папках не найдены поддерживаемые изображения.",
        "Select a model asset first.": "Сначала выберите ресурс модели.",
        "Selected asset cannot be used as a model package.": "Выбранный ресурс нельзя использовать как пакет модели.",
        "Model settings saved.": "Настройки модели сохранены.",
        "Model loaded successfully.": "Модель успешно загружена.",
        "Model loaded.": "Модель загружена.",
        "Cleared.": "Очищено.",
        "Multi-face handling changed. Gallery embeddings will be recomputed.": "Обработка нескольких лиц изменена. Эмбеддинги галереи будут пересчитаны.",
        "Dataset validation passed.": "Проверка датасета пройдена.",
        "Dataset validation failed.": "Проверка датасета не пройдена.",
        "Album directories cleared. Existing clustering results are still available.": "Папки альбомов очищены. Существующие результаты кластеризации всё ещё доступны.",
        "Saved album clustering results were cleared.": "Сохранённые результаты кластеризации альбома очищены.",
        "Opened InsightFace homepage.": "Домашняя страница InsightFace открыта.",
        "Opened InsightFace enterprise contact page.": "Страница контактов InsightFace для предприятий открыта.",
    },
}

for _lang, _values in _STATUS_ERROR_TRANSLATIONS.items():
    _TRANSLATIONS.setdefault(_lang, {}).update(_values)


_PAGE_COPY_TRANSLATIONS: dict[str, dict[str, str]] = {
    "zh": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "导入或刷新本地相册文件夹，对检测到的人脸进行聚类，并查看每个人物组中的照片。",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "所有相册处理均在本地完成。导入 / 刷新会扫描每个已选择的文件夹，仅为新增图片提取特征，然后使用所选余弦阈值对全部已索引人脸运行 DBSCAN 聚类。",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "上传一张查询图片，以及一张 Gallery 图片、一组图片或一个文件夹。只有一张 Gallery 图片时执行 1:1 比对；多张 Gallery 图片时执行 1:N Gallery 搜索。",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "配置模型包、运行后端、换脸模型和运行时检查。",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "手动刷新 GitHub Release 模型下载地址，并将所选模型包下载到本地。",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "代码和模型文件可能适用不同授权。商业部署需要相应的模型授权。",
        "Refresh source": "刷新来源",
        "Local model root": "本地模型根目录",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "源图 + 目标 = 结果。目标可以是图片或视频，工作流会自动选择图片换脸或视频换脸。",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "根据使用场景和模型授权，换脸功能可能需要单独的商业授权。请仅在拥有适当权利和同意的情况下使用。",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "基于身份文件夹运行本地 1:1 验证或 1:N 识别评测，并导出可用于采购决策的报告。",
    },
    "ja": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "ローカルのアルバムフォルダをインポートまたは更新し、検出された顔をクラスタリングして、各人物グループの写真を確認します。",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "すべてのアルバム処理はローカルで実行されます。インポート / 更新では選択された各フォルダをスキャンし、新しい画像のみ特徴量を抽出してから、選択したコサインしきい値で全インデックス済み顔に DBSCAN クラスタリングを実行します。",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "1枚のクエリ画像と、ギャラリー画像、画像セット、またはフォルダをアップロードします。ギャラリーが1枚なら 1:1 比較、複数なら 1:N ギャラリー検索を実行します。",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "モデルパック、実行プロバイダ、顔交換モデル、ランタイム確認を設定します。",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "GitHub Release のモデル URL を手動で更新し、選択したモデルパッケージをローカルにダウンロードします。",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "コードとモデルファイルには異なるライセンスが適用される場合があります。商用展開には適切なモデル認可が必要です。",
        "Refresh source": "更新元",
        "Local model root": "ローカルモデルルート",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "ソース + ターゲット = 結果。ターゲットは画像または動画に対応し、ワークフローが画像または動画の顔交換を自動的に選択します。",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "利用目的やモデルライセンスによっては、顔交換に別途商用許諾が必要になる場合があります。適切な権利と同意がある場合にのみ使用してください。",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "IDフォルダからローカルの 1:1 検証または 1:N 識別評価を実行し、調達判断に使えるレポートを出力します。",
    },
    "ko": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "로컬 앨범 폴더를 가져오거나 새로고침하고, 검출된 얼굴을 클러스터링한 뒤 각 사람 그룹의 사진을 검토합니다.",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "모든 앨범 처리는 로컬에서 수행됩니다. 가져오기 / 새로고침은 선택한 모든 폴더를 스캔하고 새 이미지에 대해서만 특징을 추출한 다음, 선택한 코사인 임계값으로 모든 인덱싱된 얼굴에 DBSCAN 클러스터링을 실행합니다.",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "쿼리 이미지 하나와 갤러리 이미지, 이미지 세트 또는 폴더를 업로드합니다. 갤러리 이미지가 하나이면 1:1 비교를 실행하고, 여러 장이면 1:N 갤러리 검색을 실행합니다.",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "모델 패키지, 실행 제공자, 얼굴 교체 모델, 런타임 점검을 구성합니다.",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "GitHub Release 모델 URL을 수동으로 새로고침하고 선택한 모델 패키지를 로컬에 다운로드합니다.",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "코드와 모델 파일에는 서로 다른 라이선스가 적용될 수 있습니다. 상용 배포에는 적절한 모델 승인이 필요합니다.",
        "Refresh source": "새로고침 소스",
        "Local model root": "로컬 모델 루트",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "소스 + 타깃 = 결과. 타깃은 이미지 또는 비디오일 수 있으며, 워크플로가 이미지 또는 비디오 얼굴 교체를 자동으로 선택합니다.",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "사용 목적과 모델 라이선스에 따라 얼굴 교체에는 별도의 상업적 허가가 필요할 수 있습니다. 적절한 권리와 동의가 있는 경우에만 사용하십시오.",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "ID 폴더에서 로컬 1:1 검증 또는 1:N 식별 평가를 실행하고 구매 검토용 보고서를 내보냅니다.",
    },
    "es": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "Importe o actualice carpetas de álbum locales, agrupe los rostros detectados y revise las fotos de cada grupo de personas.",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "Todo el procesamiento del álbum es local. Importar / Actualizar escanea cada carpeta seleccionada, extrae características solo de imágenes nuevas y luego ejecuta DBSCAN sobre todos los rostros indexados con el umbral de coseno seleccionado.",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "Suba una imagen de consulta y una imagen de galería, un conjunto de imágenes o una carpeta. Una sola imagen de galería ejecuta comparación 1:1; varias imágenes ejecutan búsqueda 1:N en la galería.",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "Configure paquetes de modelos, proveedor de ejecución, modelos de intercambio facial y comprobaciones de runtime.",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "Actualice manualmente las URL de modelos de GitHub Releases y descargue localmente los paquetes seleccionados.",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "El código y los archivos de modelo pueden tener licencias diferentes. El despliegue comercial requiere autorización de modelo adecuada.",
        "Refresh source": "Fuente de actualización",
        "Local model root": "Raíz local de modelos",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "Origen + destino = resultado. El destino puede ser una imagen o un vídeo; el flujo elige automáticamente intercambio en imagen o vídeo.",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "El intercambio facial puede requerir autorización comercial separada según el uso y la licencia del modelo. Úselo solo con los derechos y consentimientos adecuados.",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "Ejecute evaluación local de verificación 1:1 o identificación 1:N desde carpetas de identidad y exporte informes listos para compras.",
    },
    "fr": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "Importez ou actualisez des dossiers d’album locaux, regroupez les visages détectés et examinez les photos de chaque groupe de personnes.",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "Tout le traitement de l’album est local. Importer / Actualiser analyse chaque dossier sélectionné, extrait des caractéristiques uniquement pour les nouvelles images, puis exécute DBSCAN sur tous les visages indexés avec le seuil cosinus choisi.",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "Chargez une image de requête et une image de galerie, un ensemble d’images ou un dossier. Une seule image de galerie lance une comparaison 1:1 ; plusieurs images lancent une recherche 1:N dans la galerie.",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "Configurez les packages de modèles, le fournisseur d’exécution, les modèles de face swap et les vérifications runtime.",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "Actualisez manuellement les URL des modèles GitHub Releases et téléchargez localement les packages sélectionnés.",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "Le code et les fichiers de modèle peuvent avoir des licences différentes. Un déploiement commercial requiert une autorisation de modèle appropriée.",
        "Refresh source": "Source d’actualisation",
        "Local model root": "Racine locale des modèles",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "Source + cible = résultat. La cible peut être une image ou une vidéo ; le workflow choisit automatiquement le mode de face swap adapté.",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "Le face swap peut nécessiter une autorisation commerciale distincte selon l’usage et la licence du modèle. Utilisez-le uniquement avec les droits et consentements appropriés.",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "Exécutez une évaluation locale de vérification 1:1 ou d’identification 1:N depuis des dossiers d’identité et exportez des rapports prêts pour les achats.",
    },
    "de": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "Importieren oder aktualisieren Sie lokale Albumordner, clustern Sie erkannte Gesichter und prüfen Sie die Fotos jeder Personengruppe.",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "Die gesamte Albumverarbeitung erfolgt lokal. Importieren / Aktualisieren scannt jeden ausgewählten Ordner, extrahiert Merkmale nur für neue Bilder und führt anschließend DBSCAN-Clustering über alle indizierten Gesichter mit dem gewählten Kosinusschwellenwert aus.",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "Laden Sie ein Abfragebild und ein Galeriebild, einen Bildsatz oder einen Ordner hoch. Ein Galeriebild startet einen 1:1-Vergleich; mehrere Galeriebilder starten eine 1:N-Galeriesuche.",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "Konfigurieren Sie Modellpakete, Ausführungsprovider, Face-Swap-Modelle und Laufzeitprüfungen.",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "Aktualisieren Sie GitHub-Release-Modell-URLs manuell und laden Sie ausgewählte Modellpakete lokal herunter.",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "Code- und Modelldateien können unterschiedliche Lizenzen haben. Kommerzielle Bereitstellung erfordert eine geeignete Modellautorisierung.",
        "Refresh source": "Aktualisierungsquelle",
        "Local model root": "Lokaler Modellstamm",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "Quelle + Ziel = Ergebnis. Das Ziel kann ein Bild oder Video sein; der Workflow wählt automatisch Bild- oder Video-Face-Swap.",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "Face Swap kann je nach Nutzung und Modelllizenz eine separate kommerzielle Genehmigung erfordern. Verwenden Sie es nur mit geeigneten Rechten und Einwilligungen.",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "Führen Sie lokale 1:1-Verifikation oder 1:N-Identifikation aus Identitätsordnern aus und exportieren Sie beschaffungsreife Berichte.",
    },
    "pt": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "Importe ou atualize pastas de álbum locais, agrupe os rostos detetados e reveja as fotos de cada grupo de pessoas.",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "Todo o processamento do álbum é local. Importar / Atualizar analisa cada pasta selecionada, extrai características apenas de imagens novas e depois executa DBSCAN sobre todos os rostos indexados usando o limiar de cosseno selecionado.",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "Carregue uma imagem de consulta e uma imagem de galeria, conjunto de imagens ou pasta. Uma imagem de galeria executa comparação 1:1; várias imagens executam pesquisa 1:N na galeria.",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "Configure pacotes de modelos, fornecedor de execução, modelos de troca de rostos e verificações de runtime.",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "Atualize manualmente os URLs de modelos do GitHub Releases e transfira localmente os pacotes selecionados.",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "O código e os ficheiros de modelo podem ter licenças diferentes. A implantação comercial requer autorização de modelo adequada.",
        "Refresh source": "Fonte de atualização",
        "Local model root": "Raiz local dos modelos",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "Origem + destino = resultado. O destino pode ser imagem ou vídeo; o fluxo escolhe automaticamente troca em imagem ou vídeo.",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "A troca de rostos pode exigir autorização comercial separada dependendo do uso e da licença do modelo. Use apenas com direitos e consentimento adequados.",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "Execute avaliação local de verificação 1:1 ou identificação 1:N a partir de pastas de identidade e exporte relatórios prontos para aquisição.",
    },
    "ru": {
        "Import or refresh local album folders, cluster detected faces, and review the photos in each person group.": "Импортируйте или обновляйте локальные папки альбомов, кластеризуйте обнаруженные лица и просматривайте фотографии в каждой группе людей.",
        "All album processing is local. Import / Refresh scans every selected folder, extracts features only for new images, then runs DBSCAN clustering over all indexed faces using the selected cosine threshold.": "Вся обработка альбомов выполняется локально. Import / Refresh сканирует каждую выбранную папку, извлекает признаки только для новых изображений, затем запускает DBSCAN по всем индексированным лицам с выбранным косинусным порогом.",
        "Upload one query image and a gallery image, image set, or folder. One gallery image runs 1:1 compare; multiple gallery images run 1:N gallery search.": "Загрузите одно изображение запроса и изображение галереи, набор изображений или папку. Одно изображение галереи запускает сравнение 1:1; несколько изображений запускают поиск 1:N по галерее.",
        "Configure model packs, execution provider, face swap models, and runtime checks.": "Настройте пакеты моделей, провайдер выполнения, модели замены лиц и проверки runtime.",
        "Manually refresh GitHub release model URLs and download selected model packages locally.": "Вручную обновляйте URL моделей из GitHub Releases и загружайте выбранные пакеты моделей локально.",
        "Code and model files may have different licenses. Commercial deployment requires appropriate model authorization.": "Код и файлы моделей могут иметь разные лицензии. Коммерческое развертывание требует соответствующей авторизации модели.",
        "Refresh source": "Источник обновления",
        "Local model root": "Локальный корень моделей",
        "Source + Target = Result. Target can be an image or a video; the workflow chooses image or video swap automatically.": "Источник + цель = результат. Целью может быть изображение или видео; рабочий процесс автоматически выбирает замену лиц для изображения или видео.",
        "Face swap may require separate commercial authorization depending on usage and model license. Use only with appropriate rights and consent.": "Замена лиц может требовать отдельного коммерческого разрешения в зависимости от использования и лицензии модели. Используйте только при наличии соответствующих прав и согласия.",
        "Run local 1:1 verification or 1:N identification evaluation from identity folders and export procurement-ready reports.": "Запускайте локальную оценку верификации 1:1 или идентификации 1:N из папок идентичностей и экспортируйте отчёты для закупочных решений.",
    },
}

for _lang, _values in _PAGE_COPY_TRANSLATIONS.items():
    _TRANSLATIONS.setdefault(_lang, {}).update(_values)


_REPORT_UI_TRANSLATIONS: dict[str, dict[str, str]] = {
    "zh": {
        "Evaluation complete. Report saved to:": "评测完成。报告已保存至：",
        "Evaluation report saved": "评测报告已保存",
        "Evaluation report saved to:": "评测报告已保存至：",
        "Scenario": "场景",
        "Dataset": "数据集",
        "Report PDF": "PDF 报告",
        "Report Markdown": "Markdown 报告",
        "Report HTML": "HTML 报告",
        "not exported": "未导出",
        "Metrics": "指标",
        "Errors": "错误",
        "First errors": "前几个错误",
        "Selected dataset:": "已选择数据集：",
        "No dataset selected.": "尚未选择数据集。",
    },
    "ja": {
        "Evaluation complete. Report saved to:": "評価が完了しました。レポートの保存先：",
        "Evaluation report saved": "評価レポートを保存しました",
        "Evaluation report saved to:": "評価レポートの保存先：",
        "Scenario": "シナリオ",
        "Dataset": "データセット",
        "Report PDF": "PDF レポート",
        "Report Markdown": "Markdown レポート",
        "Report HTML": "HTML レポート",
        "not exported": "未出力",
        "Metrics": "指標",
        "Errors": "エラー",
        "First errors": "最初のエラー",
        "Selected dataset:": "選択中のデータセット：",
        "No dataset selected.": "データセットが選択されていません。",
    },
    "ko": {
        "Evaluation complete. Report saved to:": "평가가 완료되었습니다. 보고서 저장 위치:",
        "Evaluation report saved": "평가 보고서 저장됨",
        "Evaluation report saved to:": "평가 보고서 저장 위치:",
        "Scenario": "시나리오",
        "Dataset": "데이터셋",
        "Report PDF": "PDF 보고서",
        "Report Markdown": "Markdown 보고서",
        "Report HTML": "HTML 보고서",
        "not exported": "내보내지 않음",
        "Metrics": "지표",
        "Errors": "오류",
        "First errors": "첫 번째 오류",
        "Selected dataset:": "선택한 데이터셋:",
        "No dataset selected.": "선택한 데이터셋이 없습니다.",
    },
    "es": {
        "Evaluation complete. Report saved to:": "Evaluación completa. Informe guardado en:",
        "Evaluation report saved": "Informe de evaluación guardado",
        "Evaluation report saved to:": "Informe de evaluación guardado en:",
        "Scenario": "Escenario",
        "Dataset": "Dataset",
        "Report PDF": "Informe PDF",
        "Report Markdown": "Informe Markdown",
        "Report HTML": "Informe HTML",
        "not exported": "no exportado",
        "Metrics": "Métricas",
        "Errors": "Errores",
        "First errors": "Primeros errores",
        "Selected dataset:": "Dataset seleccionado:",
        "No dataset selected.": "No se ha seleccionado ningún dataset.",
    },
    "fr": {
        "Evaluation complete. Report saved to:": "Évaluation terminée. Rapport enregistré dans :",
        "Evaluation report saved": "Rapport d’évaluation enregistré",
        "Evaluation report saved to:": "Rapport d’évaluation enregistré dans :",
        "Scenario": "Scénario",
        "Dataset": "Jeu de données",
        "Report PDF": "Rapport PDF",
        "Report Markdown": "Rapport Markdown",
        "Report HTML": "Rapport HTML",
        "not exported": "non exporté",
        "Metrics": "Métriques",
        "Errors": "Erreurs",
        "First errors": "Premières erreurs",
        "Selected dataset:": "Jeu de données sélectionné :",
        "No dataset selected.": "Aucun jeu de données sélectionné.",
    },
    "de": {
        "Evaluation complete. Report saved to:": "Evaluierung abgeschlossen. Bericht gespeichert unter:",
        "Evaluation report saved": "Evaluierungsbericht gespeichert",
        "Evaluation report saved to:": "Evaluierungsbericht gespeichert unter:",
        "Scenario": "Szenario",
        "Dataset": "Datensatz",
        "Report PDF": "PDF-Bericht",
        "Report Markdown": "Markdown-Bericht",
        "Report HTML": "HTML-Bericht",
        "not exported": "nicht exportiert",
        "Metrics": "Metriken",
        "Errors": "Fehler",
        "First errors": "Erste Fehler",
        "Selected dataset:": "Ausgewählter Datensatz:",
        "No dataset selected.": "Kein Datensatz ausgewählt.",
    },
    "pt": {
        "Evaluation complete. Report saved to:": "Avaliação concluída. Relatório guardado em:",
        "Evaluation report saved": "Relatório de avaliação guardado",
        "Evaluation report saved to:": "Relatório de avaliação guardado em:",
        "Scenario": "Cenário",
        "Dataset": "Dataset",
        "Report PDF": "Relatório PDF",
        "Report Markdown": "Relatório Markdown",
        "Report HTML": "Relatório HTML",
        "not exported": "não exportado",
        "Metrics": "Métricas",
        "Errors": "Erros",
        "First errors": "Primeiros erros",
        "Selected dataset:": "Dataset selecionado:",
        "No dataset selected.": "Nenhum dataset selecionado.",
    },
    "ru": {
        "Evaluation complete. Report saved to:": "Оценка завершена. Отчёт сохранён в:",
        "Evaluation report saved": "Отчёт оценки сохранён",
        "Evaluation report saved to:": "Отчёт оценки сохранён в:",
        "Scenario": "Сценарий",
        "Dataset": "Датасет",
        "Report PDF": "PDF-отчёт",
        "Report Markdown": "Markdown-отчёт",
        "Report HTML": "HTML-отчёт",
        "not exported": "не экспортировано",
        "Metrics": "Метрики",
        "Errors": "Ошибки",
        "First errors": "Первые ошибки",
        "Selected dataset:": "Выбранный датасет:",
        "No dataset selected.": "Датасет не выбран.",
    },
}

for _lang, _values in _REPORT_UI_TRANSLATIONS.items():
    _TRANSLATIONS.setdefault(_lang, {}).update(_values)
