Commit Graph

132 Commits

Author SHA1 Message Date
e1f9f3db04 feat: add Alembic migration for template_id column on glossaries
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m37s
2026-06-01 23:44:04 +02:00
818eac5490 feat: prevent duplicate glossary presets + fix i18n source warning bug
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m5s
- Add template_id column to Glossary model (nullable, indexed)
- Backend: return 409 Conflict if user already imported a template
- Frontend: disable preset cards already imported, show 'Imported' badge
- Fix duplicated text in GlossarySelector source warning (hardcoded FR text removed)
- Complete i18n migration for glossaries page and GlossarySelector
- Add glossaries.presets.alreadyImported key in all 13 locales
2026-06-01 23:39:53 +02:00
ce53f0df16 fix(admin): resolve hydration layout crash by removing layout-level return null and using mount-conditional text
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m5s
2026-06-01 23:24:03 +02:00
6da8a85b1d fix(admin): secure routes, add real IP detection, SMTP header validation, and fix Next.js layout hydration mismatch
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m5s
2026-06-01 23:16:03 +02:00
6d27dc4cda feat(i18n): Phase 1 — migrate 5 critical files from hardcoded text to i18n
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m51s
47 new i18n keys added across all 13 locales (en, fr, es, de, pt, it,
nl, ru, ja, ko, zh, ar, fa). English and French are fully translated,
remaining locales use French as placeholder.

Files migrated:
- EditGlossaryDialog.tsx (18 strings)
- DeleteGlossaryDialog.tsx (7 strings)
- ProUpgradePrompt.tsx (10 strings)
- WebhookSnippet.tsx (4 strings)
- TranslationModeToggle.tsx (8 strings)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 00:28:24 +02:00
c82e70681f fix: edit dialog remaps terms when target language changes
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m20s
When the user changes the target language dropdown in the edit dialog,
terms now remap to show the language-specific translation from the
translations dict. E.g. changing to Spanish shows 'servidor' instead
of 'server'. Falls back to default English if no translation exists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 00:08:27 +02:00
0efdf6a3f4 feat: add source/target language selectors to edit glossary dialog
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m24s
Users can now change the language pair when editing a glossary:
- EditGlossaryDialog has source/target language dropdowns
- Default target_language changed from 'en' to 'multi' in create dialog
- onSave passes source_language and target_language to the backend
- Backend PATCH endpoint already supports updating these fields

Also fixes:
- CreateGlossaryDialog defaults to 'multi' instead of 'en'
- SUPPORTED_LANGUAGES now includes 'multi' option for target

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 00:03:22 +02:00
8fa1ab9ceb fix: delete all old FR→EN glossaries and deduplicate multilingual ones
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m13s
18 glossaries accumulated from multiple imports. This migration:
1. Deletes ALL glossaries with target_language='en' (old stale imports)
2. Deduplicates multilingual glossaries keeping only the newest per name

Result: 8 clean glossaries (one per template), all marked as multilingual.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 23:56:18 +02:00
9ab166c31e fix: glossaries page support for multilingual (target_language='multi')
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m58s
The /dashboard/glossaries page had two issues:
1. SUPPORTED_LANGUAGES had no 'multi' code, so multilingual glossaries
   showed '🌐 undefined' instead of '🌐 Multilingue'
2. The Compatible/Autre cible badge compared target_language directly
   with currentTargetLang, so 'multi' never matched → always showed
   'Autre cible'. Now 'multi' is treated as compatible with any target.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 23:48:48 +02:00
e9ac30ed1d style: use same serif/typography font styles on profile page as translate page
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m47s
2026-05-31 23:33:32 +02:00
32d75f8a84 fix: delete stale FR→EN glossaries + convert all remaining to multilingual
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
Old glossaries imported before enrichment have target_language='en' and no
translations dict — they're stale duplicates. This migration:

1. Deletes old FR→EN glossaries with empty/null translations (no Persian, etc.)
2. Renames multilingual glossaries from 'Anglais' to 'Multilingue'
3. Sets ALL remaining FR glossaries to target_language='multi'
4. Users re-import from enriched templates to get Persian/Arabic/etc. terms

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 23:31:24 +02:00
744a97f58d fix: import datetime in email_service.py to fix NameError, add Stripe emails unit tests
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m30s
2026-05-31 23:25:20 +02:00
b4096fd2ca fix: show target-language-specific translations in preview + rename migration
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
Two issues found in screenshot review:
1. Glossary preview always showed English 'target' field (foie → liver)
   instead of the language-specific translation. Now looks up
   term.translations[targetLang] first, falls back to term.target.
   When target is Persian, preview shows 'foie → کبد' (Persian).

2. Previous migration b7c8d9e0f1a2 was already applied on server before
   the rename was added. New migration c8d9e0f1a2b3 handles the rename
   separately: glossaries with target_language='multi' get their name
   changed from 'Anglais' to 'Multilingue'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 23:22:50 +02:00
a79ce0fc9b fix: comprehensive glossary system audit — 6 critical fixes
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m27s
Full audit found 18 issues across backend, frontend, and data files.
Root cause: target_language had no single source of truth — 'en' was
hardcoded as default in 6+ places while templates are actually multilingual.

Fixes applied:
- routes/glossary_routes.py: list_glossaries() fallback 'en' → 'multi'
- routes/glossary_routes.py: import reads target_lang from index.json
  (source of truth) instead of template file
- data/glossaries/*.json: all 8 template files target_lang 'en' → 'multi'
- services/glossary_service.py: get_glossary_terms() now returns
  target_language field (was missing entirely)
- schemas/glossary_schemas.py: all defaults 'en' → 'multi'
  (GlossaryCreate, GlossaryResponse, GlossaryListItem)
- useTranslationConfig.ts: only reset glossary on sourceLang change,
  not targetLang (multilingual glossaries work with any target)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 23:14:41 +02:00
2386e94c6d fix: page /checkout/success qui auto-sync le plan apres paiement Stripe (success_url corrige)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 3m5s
2026-05-31 23:05:01 +02:00
ebfa784b0a fix: also rename multilingual glossaries from 'Anglais' to 'Multilingue' in migration
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m4s
The migration already sets target_language='multi' but the glossary name
in the DB still said 'Français → Anglais'. Now it renames them to
'Français → Multilingue' so users aren't confused when translating to
Persian, Arabic, etc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:48:29 +02:00
ab296ea259 fix: Stripe billing portal auto-config programmatique, separation changer-forfait vs gerer-facturation
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
2026-05-31 22:45:45 +02:00
00c54997bf fix: sync plan+tier after checkout, portal same-tab nav, cancel button always visible for paid plans, portal return URL to profile tab
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m44s
2026-05-31 22:37:51 +02:00
277589aea3 fix: resolve alembic migration cycle — unique revision ID, correct chain
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
The previous migration used revision 'a1b2c3d4e5f6' which was already
taken by 005_add_reset_token_to_users.py, causing a cycle. Also both
f6a7b8c9d0e1 and the new migration pointed to the same down_revision.

Fixed:
- New unique revision ID: b7c8d9e0f1a2
- down_revision points to f6a7b8c9d0e1 (current head)
- Chain: e5b2c9d1f4a8 → f6a7b8c9d0e1 → b7c8d9e0f1a2

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:36:26 +02:00
c66252bed4 feat: mark glossary templates as multilingual — support 11 target languages
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m30s
Templates enriched by enrich_glossary_templates.py already contain
translations for de, es, it, pt, nl, ru, ja, ko, zh, ar, fa (including
Persian). But they were labeled FR→EN, causing incorrect filtering and
warnings when translating to other languages.

Changes:
- index.json: set target_lang='multi' for all 8 templates
- GlossarySelector: treat target_language='multi' as compatible with
  any target language (no false warnings, auto-select works)
- GlossarySelector: display '🌐 MULTILINGUE' badge instead of EN flag
- glossary_routes: default target_language to 'multi' instead of 'en'
- Migration: detect existing multilingual glossaries in DB (5+ keys in
  translations JSON) and set their target_language to 'multi'

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:32:27 +02:00
ad8ac089a4 fix: don't auto-select glossary when no target language match
When activating the glossary toggle, only auto-select a glossary if it
matches BOTH source and target language. If no matching glossary exists
(e.g. translating to Persian but only have FR→EN glossaries), leave the
selector empty so the user picks manually instead of forcing an
incompatible glossary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:22:05 +02:00
67b41b2c24 chore: re-trigger deploy after password fix
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m44s
2026-05-31 22:12:54 +02:00
5122bfdf99 fix: glossary selection respects target language — sort by source+target, reset on lang change, fix template import
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
- GlossarySelector: filteredGlossaries now sorts matching target_language
  first so FR→FA appears before FR→EN when translating to Persian
- GlossarySelector: toggle auto-select prefers glossary matching
  targetLang, falls back to first available
- useTranslationConfig: reset glossaryId when targetLang changes (was
  only resetting on sourceLang change)
- glossary_routes: set target_language from template data on import
  (was missing, defaulted to None/en)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:00:40 +02:00
89c31f8298 fix: safe JSON parse in checkout handlers, show proper error on 500
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m32s
2026-05-31 21:59:18 +02:00
fbe39d81e1 fix: align landing page prices with backend, pass billing mode in URL to /pricing
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m50s
2026-05-31 21:54:15 +02:00
b067be2ff7 fix: deploy.sh auto-selects compose file, docker-compose.yml uses correct Stripe var names
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m16s
2026-05-31 21:51:38 +02:00
c7c1fd8436 fix: deploy.sh migrate works without .env.docker on production
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m59s
2026-05-31 21:45:55 +02:00
374c605027 feat: Stripe integration complete - products created, DB migration, payment_failed handler, credit buttons wired
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m5s
- Create Stripe products/prices (Starter/Pro/Business monthly+yearly)
- Fix CRITICAL bug: add subscription_ends_at + cancel_at_period_end columns to users table
- Alembic migration: f6a7b8c9d0e1_add_subscription_ends_at_cancel_at_period_end
- Fix: implement handle_payment_failed() to set subscription_status=PAST_DUE
- Fix: harmonize .env.production Stripe variable names to match pricing_config.py
- Fix: add missing FRONTEND_URL and STRIPE_PUBLISHABLE_KEY to .env.production
- Add all Stripe Price IDs (test mode) to .env.production
- Wire credit purchase buttons to /api/v1/auth/create-credits-checkout
- Dashboard sync post-checkout was already implemented (no change needed)

Stripe test keys: configured in .env.production
Webhook: must be configured on server via stripe CLI or Stripe Dashboard
Webhook URL: https://wordly.art/api/v1/auth/webhook/stripe
2026-05-31 21:40:31 +02:00
3a9de12f26 fix: glossary cards UX - boutons clairs, badge compatible/incompatible, alerte cible dans sidebar
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m39s
2026-05-31 13:46:13 +02:00
d657b65adb fix: FORMAT NATIF hors cadre, apercu glossaire toujours FR/IR, prompt juridique par defaut
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m32s
2026-05-31 13:29:12 +02:00
85cd5456f8 feat(glossaries): add target_language support - DB migration, API, and UI language pair display
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m52s
2026-05-31 13:25:12 +02:00
fecb3f7abb ux(glossaries): add how-it-works guide, status badges and activation hints
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m41s
2026-05-31 13:02:19 +02:00
6d800b1077 design(frontend): align glossaries page typography with translation page editorial style
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m44s
2026-05-31 11:36:55 +02:00
f33da82c29 fix(frontend): improve glossary selector responsiveness and add contextual warning logic
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 3m10s
2026-05-31 11:24:52 +02:00
58d9d8a74c fix(frontend): increase translation config legibility and integrate templates in glossary selector
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m31s
2026-05-31 11:18:57 +02:00
3f635e809e feat(translate): implement intelligent language filtering and creation links for glossaries
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m34s
2026-05-31 11:09:56 +02:00
8ab45f1b6e style(translate): make LLM cards compact in a 3-column grid, remove glossary language filtering, and add contextual help under engine selection
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m58s
2026-05-31 11:05:34 +02:00
cd8a57324d style(translate): redesign glossary and translate images card layout to match mockup compact styling
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m31s
2026-05-31 10:58:22 +02:00
a5b18b5a24 fix(pdf): add support for translate_images to PDFTranslator to fix API mismatch
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m36s
2026-05-31 10:36:30 +02:00
78eca6d453 feat(translate): refonte complete du composant GlossarySelector (Etape 4)
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
2026-05-31 10:33:57 +02:00
a0de00a4e7 fix(translate): ajout des cles de traduction manquantes et re-positionnement intelligent du bouton de traduction
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m41s
2026-05-31 10:28:12 +02:00
c1ea65f10f feat(translate): refonte du design de la page de traduction et du sélecteur de moteurs (Etapes 1-3)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m12s
2026-05-31 10:14:23 +02:00
9532fef2cd 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
- 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>
2026-05-31 08:24:33 +02:00
b472dcd4b7 style: apply Inter + Playfair Display fonts matching reference landing page
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m16s
- Add Playfair Display as serif font via next/font/google
- Hero headings: font-serif font-medium tracking-tight (was font-extrabold uppercase)
- Body text: font-light (was font-medium)
- Section headings: font-serif tracking-tight (was heavy sans-serif)
- Pricing titles: font-serif font-medium (was font-black uppercase)
- CTA button: rounded-[32px] larger pill style
- Overall softer, more editorial feel matching architectural-grid reference

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 13:45:44 +02:00
03cf4cd276 fix: show current language flag instead of next language in landing page button
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m24s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 13:36:58 +02:00
4b52f4d9df fix: fallback to free Google Translate when Cloud API key is invalid/blocked
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m5s
Google Cloud Translation API was returning "Requests to this API are
blocked" which got wrapped as a misleading "Erreur lors de la lecture
du fichier PowerPoint". Now probes the key once (cached 10min) and
falls back to deep_translator (free) when the Cloud key is invalid.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 00:02:29 +02:00
bacbf6cce8 fix: compact glossary dropdown, sticky translate button, and mode badge
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m10s
- Restructure right sidebar as flex-col with scrollable config and
  fixed translate button (never scrolls away)
- Replace expanded GlossarySelector list with compact dropdown (~80px
  instead of ~400px), collapsible templates section, click-outside close
- Add visible Classic/IA mode badge after provider selector with hint
  about glossary availability for Pro users in classic mode

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 21:41:16 +02:00
f1dc4c0b0b fix: remove garbage esenaw api key
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m17s
2026-05-17 20:28:52 +02:00
e41dca6fe3 fix: cache headers and frontend pro tier resolution
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m34s
2026-05-17 20:06:26 +02:00
590d4347f7 fix: ignore stale pro features (glossary/prompt) from frontend localstorage for free users instead of blocking translations
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m17s
2026-05-17 19:09:00 +02:00