fix: remove DeepSeek/MiniMax branding, fix glossary visibility, improve translate page UX
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m7s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m7s
- US1: Replace exposed provider names (DeepSeek V3 → IA Express, MiniMax → IA Avancée) in legacy_routes.py, remove 52 DeepSeek references from i18n pricing/landing keys, add generic modelName key across all 13 languages - US2: Fix glossary selector filtering (fallback to all glossaries when source lang filter returns empty), show templates by default, fix 3 broken presets (hvac/construction/automotive → hr/scientific/ecommerce) - US3: Replace 15 hardcoded French strings with i18n t() calls, increase font sizes from 8-9px to 11px, improve text contrast (opacity /20→/40, /25→/45, /30→/50) - US4: Add missing provider labels in admin ProviderStatus (deepseek, minimax, zai, google_cloud, openrouter, openrouter_premium) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ export function GlossarySelector({ sourceLang, targetLang, isPro, glossaryId, on
|
||||
const [importingId, setImportingId] = useState<string | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [showTemplates, setShowTemplates] = useState(false);
|
||||
const [showTemplates, setShowTemplates] = useState(true);
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const fetchData = useCallback(async () => {
|
||||
@@ -125,17 +125,20 @@ export function GlossarySelector({ sourceLang, targetLang, isPro, glossaryId, on
|
||||
const sourceFlag = SUPPORTED_LANGUAGES.find(l => l.code === sourceLang)?.flag ?? '';
|
||||
const targetFlag = SUPPORTED_LANGUAGES.find(l => l.code === targetLang)?.flag ?? '';
|
||||
|
||||
const filteredGlossaries = sourceLang === 'auto'
|
||||
const langFiltered = sourceLang === 'auto'
|
||||
? glossaries
|
||||
: glossaries.filter(g => g.source_language === sourceLang);
|
||||
|
||||
// If filtering by source language yields nothing, show all glossaries
|
||||
const filteredGlossaries = langFiltered.length > 0 ? langFiltered : glossaries;
|
||||
|
||||
const selected = glossaries.find(g => g.id === glossaryId);
|
||||
|
||||
return (
|
||||
<div className="space-y-2 relative" ref={containerRef}>
|
||||
<label className="text-[9px] font-black text-brand-dark/40 dark:text-white/40 uppercase tracking-[0.2em] block">
|
||||
<BookText size={10} className="inline mr-1.5 text-brand-accent" />
|
||||
{t('translate.glossary.title')} <span className="normal-case tracking-normal font-normal text-brand-dark/25 dark:text-white/25">({sourceFlag}→{targetFlag})</span>
|
||||
<label className="text-[11px] font-black text-brand-dark/50 dark:text-white/50 uppercase tracking-[0.15em] block">
|
||||
<BookText size={12} className="inline mr-1.5 text-brand-accent" />
|
||||
{t('translate.glossary.title')} <span className="normal-case tracking-normal font-normal text-brand-dark/40 dark:text-white/40">({sourceFlag}→{targetFlag})</span>
|
||||
</label>
|
||||
|
||||
{/* Dropdown trigger */}
|
||||
@@ -158,12 +161,12 @@ export function GlossarySelector({ sourceLang, targetLang, isPro, glossaryId, on
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-[11px] font-bold truncate text-brand-accent">{selected.name}</div>
|
||||
<div className="text-[9px] text-brand-dark/30 dark:text-white/30">{selected.terms_count} {t('translate.glossary.terms')}</div>
|
||||
<div className="text-[11px] text-brand-dark/50 dark:text-white/50">{selected.terms_count} {t('translate.glossary.terms')}</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => { e.stopPropagation(); onChange(null); }}
|
||||
className="shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-brand-dark/20 hover:text-brand-dark hover:bg-brand-muted dark:text-white/20 dark:hover:text-white dark:hover:bg-white/10 transition-colors"
|
||||
className="shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-brand-dark/40 hover:text-brand-dark hover:bg-brand-muted dark:text-white/40 dark:hover:text-white dark:hover:bg-white/10 transition-colors"
|
||||
>
|
||||
<X size={11} />
|
||||
</button>
|
||||
@@ -182,12 +185,12 @@ export function GlossarySelector({ sourceLang, targetLang, isPro, glossaryId, on
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
<ChevronDown size={14} className={cn("shrink-0 text-brand-dark/20 dark:text-white/20 transition-transform", isOpen && "rotate-180")} />
|
||||
<ChevronDown size={14} className={cn("shrink-0 text-brand-dark/40 dark:text-white/40 transition-transform", isOpen && "rotate-180")} />
|
||||
</button>
|
||||
|
||||
{/* Error */}
|
||||
{error && (
|
||||
<p className="text-[10px] text-red-500 pl-1">{error}</p>
|
||||
<p className="text-[11px] text-red-500 pl-1">{error}</p>
|
||||
)}
|
||||
|
||||
{/* Dropdown panel */}
|
||||
@@ -221,7 +224,7 @@ export function GlossarySelector({ sourceLang, targetLang, isPro, glossaryId, on
|
||||
{g.name}
|
||||
</div>
|
||||
</div>
|
||||
<span className="text-[9px] text-brand-dark/25 dark:text-white/25">{g.terms_count} {t('translate.glossary.terms')}</span>
|
||||
<span className="text-[10px] text-brand-dark/45 dark:text-white/45">{g.terms_count} {t('translate.glossary.terms')}</span>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user