{"id":31642473,"url":"https://github.com/tameronline/jinja-ui","last_synced_at":"2026-02-17T14:32:52.776Z","repository":{"id":300971116,"uuid":"1007747961","full_name":"TamerOnLine/jinja-ui","owner":"TamerOnLine","description":"Reusable UI components and macros for Jinja2 templates. Clean, customizable, and ready to use.","archived":false,"fork":false,"pushed_at":"2025-06-24T13:37:03.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T14:34:55.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TamerOnLine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-24T13:19:54.000Z","updated_at":"2025-06-24T13:37:06.000Z","dependencies_parsed_at":"2025-06-24T14:37:57.197Z","dependency_job_id":"02b0b99b-c6c2-4a3c-ad4c-ffa9784c9506","html_url":"https://github.com/TamerOnLine/jinja-ui","commit_stats":null,"previous_names":["tameronline/jinja-ui"],"tags_count":0,"template":false,"template_full_name":"TamerOnLine/jinja_components","purl":"pkg:github/TamerOnLine/jinja-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fjinja-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fjinja-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fjinja-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fjinja-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TamerOnLine","download_url":"https://codeload.github.com/TamerOnLine/jinja-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fjinja-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717434,"owners_count":26033542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T03:59:34.574Z","updated_at":"2025-10-07T03:59:41.046Z","avatar_url":"https://github.com/TamerOnLine.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧩 jinja-i18n-tools\n\nAutomated i18n tool for Jinja2-based projects using Babel and Google Translate.\n\n## 📦 Features\n\n- 🔍 Extract translatable strings from your Jinja2 templates.\n- 🌐 Initialize `.po` files for multiple languages.\n- 🤖 Auto-translate using Google Translate via `deep_translator`.\n- 🛠️ Compile `.po` files into `.mo`.\n- 🧹 Automatically cleans up temporary files like `messages.pot` and `babel.cfg`.\n\n---\n\n## ⚙️ Installation\n\n```bash\npip install jinja-i18n-tools\n```\n\n---\n\n## 🚀 Usage\n\nActivate your virtual environment, then run:\n\n```bash\njinja-i18n full\n```\n\nThis will:\n1. Copy `babel.cfg` to your project root.\n2. Extract translatable strings from your templates.\n3. Initialize translation files for each language.\n4. Auto-translate all strings.\n5. Compile `.po` files into `.mo`.\n6. Clean up temporary files.\n\n---\n\n## 🛠️ CLI Commands\n\n```bash\njinja-i18n extract\njinja-i18n init\njinja-i18n translate --lang ar\njinja-i18n translate-all\njinja-i18n compile\njinja-i18n full --lang all --force\n```\n\n---\n\n## 🌍 Languages\n\nBy default, the following languages are supported:\n\n- `ar` – Arabic\n- `de` – German\n\nYou can customize this in the source by editing the `LANGUAGES` list.\n\n---\n\n## 📁 Project Structure\n\nYour Jinja2 templates and Python files must be located where your `babel.cfg` expects them. Here's a recommended configuration:\n\n```\n[python: **.py]\n[jinja2: templates/**.html]\n[jinja2: templates/**.j2] \nextensions=jinja2.ext.i18n\n```\n\nThis configuration instructs `pybabel` to:\n\n- Extract translation strings from **all Python files** recursively.\n- Extract translatable content from **all `.html` templates** under the `templates/` folder.\n- Enable the `jinja2.ext.i18n` extension to support `{% trans %}` blocks.\n\nMake sure this file (`babel.cfg`) is located in your project root **temporarily**, or is copied automatically by the tool before running `pybabel extract`.\n\n---\n\n## 🧼 Cleanup\n\nTemporary files like `babel.cfg` and `messages.pot` are deleted automatically after the process finishes.\n\n---\n\n## 📜 License\n\nThis project is licensed under the [MIT License](LICENSE).  \nYou are free to use, modify, and distribute it with attribution.  \nFeel free to explore and build upon it!\n\n---\n\n## 👨‍💻 About the Author\n\n🎯 **Tamer OnLine – Developer \u0026 Architect**  \nA dedicated software engineer and educator with a focus on building multilingual, modular, and open-source applications using Python, Flask, and PostgreSQL.\n\n🔹 Founder of **Flask University** – an initiative to create real-world, open-source Flask projects  \n🔹 Creator of [@TamerOnPi](https://www.youtube.com/@mystrotamer) – a YouTube channel sharing tech, tutorials, and Pi Network insights  \n🔹 Passionate about helping developers learn by building, one milestone at a time\n\nConnect or contribute:\n\n[![GitHub](https://img.shields.io/badge/GitHub-TamerOnLine-181717?style=flat\u0026logo=github)](https://github.com/TamerOnLine)  \n[![LinkedIn](https://img.shields.io/badge/LinkedIn-Profile-blue?style=flat\u0026logo=linkedin)](https://www.linkedin.com/in/tameronline/)  \n[![YouTube](https://img.shields.io/badge/YouTube-TamerOnPi-red?style=flat\u0026logo=youtube)](https://www.youtube.com/@mystrotamer)\n\n---\n\u003e 💡 **Got feedback or want to collaborate?**  \n\u003e Open an issue, fork the repo, or just say hi on LinkedIn!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fjinja-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftameronline%2Fjinja-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fjinja-ui/lists"}