Skip to content

fix: Backend fails silently when GEMINI_API_KEY is missing - #1881

Merged
omroy07 merged 1 commit into
omroy07:mainfrom
Aditya8369:fix/Backend-fails-silently-when-GEMINI_API_KEY-is-missing
Sep 25, 2026
Merged

omroy07 merged 1 commit into
omroy07:mainfrom
Aditya8369:fix/Backend-fails-silently-when-GEMINI_API_KEY-is-missing

Conversation

@Aditya8369

Copy link
Copy Markdown
Contributor

closes #549

  1. Multilingual Support (Google Cloud Translation API & Clean Language Toggle)
    Backend Service (translation_service.py): Integrated Google Cloud Translation API with multi-tier fallback (deep-translator and pre-cached dictionaries) and in-memory LRU caching.
    Dynamic Content & Translation Endpoints (translations.py): Added /api/v1/translate/translate, /api/v1/translate/languages, /api/v1/content/blogs, /api/v1/content/crops, and /api/v1/content/resources.
    Frontend Toggle & Persistence:
    Enhanced scripts/i18n.js with localStorage persistence (agritech-lang) and async server translation bridge.
    Added clean language toggle (English / Hindi / Kannada) to navbar.html and index.html with zero Google Translate branding/widgets.
    Connected blog.js for live dynamic content re-rendering upon language changes.
  2. GEMINI_API_KEY Startup Validation Fix
    Fail-Fast Validation: Added startup checks in app.py and backend/config/init.py that detect missing or empty GEMINI_API_KEY

@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

@Aditya8369 is attempting to deploy a commit to the Om Roy's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@Aditya8369

Copy link
Copy Markdown
Contributor Author

@omroy07 please check

@omroy07
omroy07 merged commit d89bc43 into omroy07:main Sep 25, 2026
1 of 4 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congrats @Aditya8369 on getting your PR merged! 🙌
Thanks for the contribution — looking forward to more from you 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Backend fails silently when GEMINI_API_KEY is missing - 60

2 participants