Commit Graph

357 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 7dffdc0554 fix(system-reset): address code review feedback
- Add path traversal guard in reimport file copy loop
- Improve error log message context for table wipe failures
- Use conditional role=alert/status on result banner for accessibility
- Make test assertions more specific (exact status codes)
- Rename ambiguous view test

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 22:38:24 +00:00
copilot-swe-agent[bot] a88d790445 feat(system-reset): add system reset and factory reset feature
- Add FACTORY_RESET_ON_STARTUP and ENABLE_FACTORY_RESET config settings
- Create app/utils/system_reset.py with core reset logic (wipe DB + files, reimport)
- Create app/api/system_reset.py with admin-only API endpoints
- Create app/views/system_reset.py with admin-only UI view
- Create frontend/templates/system_reset.html with confirmation dialogs
- Auto-reset on startup when FACTORY_RESET_ON_STARTUP=true
- Re-import uses watch folder mechanism for re-ingestion
- Register routers in API and views init files
- Add i18n keys and SETTING_METADATA entries
- Add nav links in base.html (desktop + mobile)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 22:26:17 +00:00
copilot-swe-agent[bot] afb168d3e8 feat(i18n): localize remaining image zoom controls in files view
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 18:15:35 +00:00
copilot-swe-agent[bot] 45c2cd7c6e feat(i18n): localize files view - replace all hardcoded strings with translation keys
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 18:05:59 +00:00
Christian Krakau-Louis 3cd895d57c chore(i18n): auto-update translations via LLM 2026-03-16 17:47:16 +00:00
Christian Krakau-Louis 872ff6c53b chore(i18n): auto-update translations via LLM 2026-03-16 17:47:16 +00:00
copilot-swe-agent[bot] 036210dd45 feat(ui): add View Document link from file detail page back to file view page
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 15:36:37 +00:00
copilot-swe-agent[bot] 4619e6b8a6 fix(ui): replace emoji flags with cross-platform flag-icons CSS library
Windows does not render regional indicator emoji as graphical flags,
showing raw text (DE, GB) instead. Replace all emoji flag values in
SUPPORTED_LANGUAGES with lowercase ISO 3166-1 alpha-2 country codes,
add the flag-icons@7.3.2 CSS library via CDN, and update templates to
render <span class="fi fi-{code}"> instead of emoji text.

Special cases:
- Welsh (cy): uses flag-icons region code "gb-wls"
- Catalan (ca): falls back to "es" (no dedicated ISO flag)
- Esperanto (eo): uses "un" (UN flag for international language)

<option> elements in profile.html no longer display flags since CSS
icon classes cannot be applied inside native <option> tags.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 14:25:28 +00:00
copilot-swe-agent[bot] 075a505085 feat(profile): expose default_document_language in profile API and UI
- Add default_document_language to ProfileResponse and ProfileUpdateRequest
- Handle validation in PATCH /api/profile endpoint
- Add dropdown in profile.html template with Alpine.js binding
- Add translation keys for profile UI labels
- Add comprehensive tests for profile default language feature

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 12:13:54 +00:00
copilot-swe-agent[bot] 3a221a62cd feat(translation): add model, config, task, API, and UI for default document language translation
- Add detected_language, default_language_text, default_language_code columns to FileRecord
- Add default_document_language column to UserProfile
- Add DEFAULT_DOCUMENT_LANGUAGE config setting (defaults to "en")
- Create translate_to_default_language Celery task
- Integrate translation trigger into embed_metadata_into_pdf pipeline
- Add /api/files/{id}/translate and /api/files/{id}/translation/default API endpoints
- Add /files/{id}/text/default-language view endpoint
- Update file_view.html with translation sections (default language, on-the-fly)
- Add translation keys to en.json
- Create Alembic migration 036
- Update .env.demo

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 11:54:13 +00:00
copilot-swe-agent[bot] 2bb47e7631 feat(i18n): localize admin files page (filemanager.html)
Replace all hardcoded English strings in the admin file manager
template with _() translation calls and add 47 new admin_files.*
keys to en.json.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 18:06:27 +00:00
copilot-swe-agent[bot] de8922bb8e fix(i18n): fix overage buffer sentence spacing in admin_plans template
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 17:53:13 +00:00
copilot-swe-agent[bot] 36aef73969 feat(i18n): localize admin plans page
Add 108 admin_plans.* translation keys to en.json and update
admin_plans.html to use _() for all static text and window.__i18nAdminPlans
for dynamic Alpine.js / JavaScript strings.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 17:51:10 +00:00
copilot-swe-agent[bot] 3fc0d52126 feat(i18n): localize admin users page
Add 119 new admin_users.* translation keys to en.json and update
admin_users.html to use _() for all static HTML strings, inline
Alpine.js x-text translations, and a window.__i18nAdminUsers block
for JavaScript alert/status messages."

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 17:34:47 +00:00
copilot-swe-agent[bot] 8c18f0da17 feat(i18n): localize terms and conditions page
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 16:08:59 +00:00
copilot-swe-agent[bot] e46dadbf45 feat(ui): localize status page with i18n translations
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 15:56:55 +00:00
copilot-swe-agent[bot] 246ef70245 feat(i18n): localize attribution page
Add 13 attribution.* keys to en.json and replace all hardcoded
English strings in attribution.html with _() helper calls.
Also adds aria-hidden to the decorative warning SVG icon.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 15:37:47 +00:00
copilot-swe-agent[bot] 9c73ab8e59 feat(ui): localize license page with i18n translation keys
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 14:11:42 +00:00
copilot-swe-agent[bot] 182868c0d7 feat(i18n): localize cookies policy page
Replace all hardcoded English strings in cookies.html with _() i18n
helper calls and add 35 new cookie_policy.* translation keys to
frontend/translations/en.json. Also improve table accessibility with
aria-label and scope attributes."

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 13:52:03 +00:00
copilot-swe-agent[bot] 1f6a3a5803 feat(ui): localize imprint page
Add 25 imprint.* translation keys to en.json and update imprint.html
to use _() helpers for all user-visible strings. Static business data
(company name, address, contact details, VAT number) remain hardcoded
as proper nouns that must not be altered by translation.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 10:23:33 +00:00
copilot-swe-agent[bot] e1941adfc9 feat(ui): add i18n support to privacy page
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-14 14:49:41 +00:00
Christian Krakau-Louis c6642203c0 chore(i18n): auto-update translations via LLM 2026-03-14 14:15:13 +00:00
Christian Krakau-Louis 31218c8860 chore(i18n): auto-update translations via LLM 2026-03-14 14:15:13 +00:00
copilot-swe-agent[bot] eaa533760d fix(i18n): replace fragment translation keys with placeholder-based complete sentences
- Use {gravatar} placeholder in profile.avatar_upload_hint for proper i18n
- Use {settings_link} placeholder in subscription.single_user_body
- Use {api_tokens_link} placeholder in integrations.webhook_step1
- Add optional chaining in common.js for window.__i18n safety

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-14 12:45:47 +00:00
copilot-swe-agent[bot] 08853e823c fix(ui): restore missing template x-if tag and fix Nextcloud URL label key
- Restore missing '<template x-if="quota.max_sources !== null && quota.max_sources > 0">' wrapping the sources mini usage bar
- Add dedicated 'integrations.nextcloud_url_label' key instead of misusing 'integrations.nextcloud_settings' as a prefix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-14 12:32:24 +00:00
copilot-swe-agent[bot] 5a025576c4 feat(ui): internationalize profile, subscription, integrations templates and user menu JS
- Add 155 new translation keys to en.json (common, nav, integrations, profile, subscription sections)
- Add window.__i18n script block to base.html for user menu strings
- Replace all hardcoded English strings in common.js with window.__i18n lookups using safe fallback pattern
- Internationalize profile.html (page title, headings, labels, hints, placeholders, theme options)
- Internationalize subscription.html (page title, plan cards, usage stats, plan actions, badges)
- Internationalize integrations_dashboard.html (header, quota bars, modal, all form fields, action buttons, webhook section, delete modal)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-14 12:30:27 +00:00
copilot-swe-agent[bot] 48a93036ca fix(ui): add 22 missing help page translation keys to en.json
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-14 11:16:06 +00:00
Christian Krakau-Louis 8487dcd13d Merge pull request #645 from christianlouis/copilot/fix-language-selection-bug
fix(i18n): persist language preference server-side, fix dropdown rendering and avatar 404
2026-03-14 11:35:43 +01:00
copilot-swe-agent[bot] 1416d901d0 fix(i18n): persist language preference server-side, fix dropdown rendering and avatar 404
- Fix language dropdown in base.html by moving tojson data out of HTML
  attribute into a script tag (prevents quote conflicts breaking Alpine.js)
- Fix avatar placeholder 404 by correcting filename reference from
  avatar-placeholder.svg to default-avatar.svg
- Add session hydration from DB in _inject_global_context() so
  detect_language() uses the stored preference on every request
- Sync session and cookie in PATCH /api/profile when language changes
- Reload page after language change in profile to reflect new locale
- Add tests for session/cookie sync and DB hydration

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-14 10:30:50 +00:00
Christian Krakau-Louis d09227b61c chore(i18n): auto-update translations via LLM 2026-03-14 10:24:41 +00:00
copilot-swe-agent[bot] 1f24b1b95b fix(i18n): add missing index page translation keys to en.json
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-14 10:14:43 +00:00
Christian Krakau-Louis 0cb6017b50 chore(i18n): auto-update translations via LLM 2026-03-14 08:38:11 +00:00
Christian Krakau-Louis 3bfa5ad266 Resolve translations: keep main for all except en.json 2026-03-14 08:32:00 +00:00
Christian Krakau-Louis 8e865180a5 chore(i18n): auto-update translations via LLM 2026-03-14 08:24:11 +00:00
Christian Krakau-Louis 9a480e3d68 chore(i18n): auto-update translations via LLM 2026-03-14 01:34:50 +00:00
copilot-swe-agent[bot] 3557590679 feat(ui): smart compact language selector with search and flags
- Add get_suggested_languages() to i18n.py returning ≤6 ranked
  suggestions (current locale → Accept-Language header → popular
  language fallbacks); refactor _parse_accept_language to share
  a common _parse_accept_language_entries() helper
- Inject suggested_languages into every template context (base.py)
- Redesign nav-bar language dropdown (base.html): button shows
  current-language flag emoji; dropdown lists 5-7 suggestions with
  flags and native names; Alpine.js search input filters all 77
  languages live; footer shows count and Search shortcut
- Add language.search_placeholder and language.no_results keys to
  all 77 translation JSON files (en values; external script
  propagates translations to other locales)
- Remove test_all_languages_have_same_keys (external sync script
  owns key completeness); add TestGetSuggestedLanguages (7 unit
  tests); update test_language_selector_in_nav for new HTML
- Update InternationalizationGuide.md: single-step en.json-only
  workflow for adding new translation keys
- Update .github/copilot-instructions.md: add i18n/l10n section
  documenting the en.json-only rule for future agents

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-13 21:31:16 +00:00
Christian Krakau-Louis f4515aaaca added bg translation 2026-03-13 21:27:13 +00:00
copilot-swe-agent[bot] 59d851272d feat(i18n): update language support to 77 languages
- Remove Russian (ru) per requirement
- Keep Esperanto (eo) per user feedback
- Add 29 new languages: am, az, bn, gu, ha, hi, hy, id, ig, jv, ka,
  kk, km, ml, mn, mr, ms, ne, si, sw, ta, te, th, tl, ur, uz, yo,
  zh-TW, zu
- Create 29 new translation JSON files seeded from en.json
- Remove frontend/translations/ru.json
- Update SUPPORTED_LANGUAGES list and docstring (49 → 77)
- Update tests: count 49→77, code set updated
- Update docs/InternationalizationGuide.md: count and table

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-13 18:36:07 +00:00
copilot-swe-agent[bot] 217217dd01 feat(i18n): add complete Catalan (ca) translation
Translate all 927 keys from English to Catalan in frontend/translations/ca.json.
Previously the file contained only English placeholder values. All strings
have been translated to proper Catalan, preserving technical terms, product
names, and placeholder variables (e.g. {size}, {year}, {count}).

- 872 out of 927 keys now have Catalan translations
- 55 values intentionally kept unchanged (proper names, product names,
  technical acronyms like IP/ID/ENV, language names in their native form,
  numeric error codes, and words identical in Catalan and English)"

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-13 11:37:29 +00:00
Christian Krakau-Louis 3c7f0888de Merge pull request #610 from christianlouis/copilot/ensure-fr-json-translations
fix(i18n): complete French translations and resolve merge conflicts with main
2026-03-13 09:33:37 +01:00
Christian Krakau-Louis 008b356dd0 Merge pull request #612 from christianlouis/copilot/ensure-pl-json-translations
feat(i18n): complete Polish translations in pl.json
2026-03-13 09:32:36 +01:00
copilot-swe-agent[bot] c9a650b863 fix(i18n): resolve merge conflicts from main - keep Spanish translations, restore zh translations 2026-03-13 08:05:20 +00:00
GitHub Copilot cd47cf2adf Merge branch 'main' of https://github.com/christianlouis/DocuElevate into copilot/ensure-fr-json-translations
# Conflicts:
#	frontend/translations/fr.json
2026-03-13 08:03:41 +00:00
copilot-swe-agent[bot] 19b9cd8163 fix(i18n): resolve merge conflicts - merge main into branch
Merged main (v0.126.0) into branch. Main added 26 new translation keys
via Crowdin l10n PR. Resolved conflict in pl.json by:
- Keeping all 280 Polish translations from our branch
- Adding Polish translations for 26 new keys from main
2026-03-13 08:01:19 +00:00
Christian Krakau-Louis d631756345 New translations en.json (Portuguese, Brazilian) 2026-03-12 23:45:05 +01:00
Christian Krakau-Louis 3bc57827d9 New translations en.json (Ukrainian) 2026-03-12 23:45:03 +01:00
Christian Krakau-Louis da77f906a5 New translations en.json (Swedish) 2026-03-12 23:45:02 +01:00
Christian Krakau-Louis cfa7fdc68a New translations en.json (Polish) 2026-03-12 23:44:59 +01:00
Christian Krakau-Louis 805e67c622 New translations en.json (Dutch) 2026-03-12 23:44:58 +01:00
Christian Krakau-Louis 564b6872c9 New translations en.json (Italian) 2026-03-12 23:44:56 +01:00