-
Notifications
You must be signed in to change notification settings - Fork 66
Docs/translation plan #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
psychon7
wants to merge
57
commits into
UnicomAI:main
Choose a base branch
from
SAFVR:docs/translation-plan
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add TRANSLATION_PLAN.md: 8-phase translation strategy with timeline - Add TRANSLATION_AI_PROMPTS.md: Ready-to-use prompts for AI tools - Add TRANSLATION_QUICK_START.md: 30-minute quick start guide Scope: 1,212 UI keys, 100+ backend files, 35+ docs Estimated: 20-26 days solo, 2 weeks with team Tools: lingo.dev, Claude, ChatGPT, DeepL
Major changes: - Fix Docker configurations for all services (agent, backend, frontend, rag) - Update i18n setup for frontend (web/src/lang/en.js, index.js) - Fix backend Go services configuration and error handling - Update Python agent and RAG services - Fix proto definitions and gRPC configurations - Update build scripts and Makefiles - Configure development environment Services updated: - Agent service: MCP client, action server, logging - RAG service: Document processing, vector stores, ES integration - Backend services: All microservices proto files - Frontend: Language configuration and API setup This commit includes all fixes needed to run the application successfully.
i18n(agent): Remove Chinese comments and translate to English - Remove bilingual comment format `[EN]` markers throughout agent plugin files - Translate remaining Chinese comments to English in: - action.py: Function registration, query processing, batch configuration - config.py: Configuration items, file operations, settings descriptions - http_action_server.py: Authentication, logging, link processing, streaming output - log_config.py: Time conversion, logging setup, file handling
- Remove bilingual comment format `[EN]` markers from Dockerfiles and Makefiles - Translate Chinese comments to English in: - Dockerfile.frontend: Build and runtime stage comments - Makefile.develop: Service restart comments for bff, workflow, agentscope - README.md: Language links and example content - Proto files: gRPC service method comments for knowledge base operations - Backend configs: Assistant service interface
…proto files - Remove bilingual comment format `[EN]` markers from all proto files - Translate remaining Chinese comments to English in: - assistant-service: Model config, knowledge base, rerank, metadata filters - common: Application types, timestamps, tool schemas - iam-service: User auth, captcha, login, language settings - mcp-service: MCP priorities, avatars, square intros - model-service: Model suppliers, types, status
fix(docker,i18n): Optimize MySQL config and enforce English locale - Add MySQL resource limits (1G/512M) and custom config mount - Tune MySQL parameters: max-connections=50, buffer-pool=256M, skip-name-resolve - Adjust healthcheck: longer intervals (20s), more timeout (10s), fewer retries (5) - Force English locale on startup, override Chinese if previously set - Update locale initialization in both main.js and lang/index.js ```
refactor(prompts): Replace Chinese learning/media templates with EHS safety inspection system - Remove 49 Chinese prompt templates across categories: learn, media, role, work, emotion, legal, life - Add 15 EHS-focused prompt templates across 4 categories: - safety_inspection: Construction site checklists, chemical assessments, LOTO verification, confined space permits - incident_investigation: Root cause analysis, witness interviews, evidence correlation, corrective actions, near-miss analysis
fix(workflow): Mount English schema.sql to permanently fix Chinese node titles - Add volume mount for configs/microservice/workflow-wanwu/schema.sql to workflow-wanwu container - Update WORKFLOW_NODE_ENGLISH_FIX.md to reflect complete solution status - Document three-layer fix: database triggers, schema template override, existing data update - Mark all solution components as complete and working - Root cause: Chinese text in /app/configs/schema.sql inside container now overridden with English version
refactor(workflow-templates): Remove Chinese customer service templates and test docs - Remove TEST_WORKFLOW_FIX.md: Workflow node English fix verification guide - Remove Intelligent_customer_service template: Chinese customer service system with intent recognition, knowledge base queries, and LLM responses - Remove citizen_intent_classify template: Chinese citizen complaint classification workflow for government hotline - Remove city_weather_compare template: Chinese city weather comparison workflow
build(docker,deps): Update base images and fix build configurations - Switch agent base image from Aliyun registry to Docker Hub (safvr/agent-base:latest) - Switch RAG base image from Aliyun registry to Docker Hub (safvr/rag-base:latest) - Fix agent-base Dockerfile COPY path: remove leading slash - Add go mod tidy and vendor step to backend build - Add node-sass rebuild step to frontend build - Remove external network requirement in docker-compose (wanwu-net) - Update Go dependencies: DataDog trace
refactor(categories,ci,docs): Replace generic categories with EHS-specific categories and update deployment - Update .dockerignore: Switch from frontend to backend build context, keep .env files for Makefile - Update CI/CD: Switch from webhook to Dokploy API for compose deployment with proper error handling - Remove category fix documentation: Delete CATEGORY_FIX_COMPLETE.md and CATEGORY_UPDATE_SUMMARY.md (changes now integrated) - Frontend: Replace generic categories (Government, Industry, Education, Tourism,
feat(iam): sync user operations to workflow space_user table - Initialize workflow DB connection in IAM service main with fallback to warn-only mode - Sync user creation, org user addition/removal to workflow space_user table - Map IAM roles to workflow role types (owner=1, admin=2, member=3) - Non-blocking sync: log errors but don't fail IAM operations - Fix nginx workflow proxy path from /workflow/ to / for correct routing ```
feat(iam): sync users to workflow user table before space_user
- Add WorkflowUser model for opencoze.user table
- Sync user to opencoze.user before syncing to space_user
- Generate default email (user{id}@local.com) if email is empty
- Update migration script to sync both user and space_user tables
- Add user existence check in space_user sync query
- Non-blocking: log warnings but continue on user sync failures
```
… config - Add workflow frontend files extracted from original wanwu-frontend image - Update nginx config to serve workflow as static files instead of proxying - Update Dockerfile.frontend to include workflow frontend in build - Remove volume mount for single JS file (no longer needed) - Workflow frontend is now served at /workflow/ with proper SPA routing - API endpoints /api/ and /v1/ continue to proxy to workflow backend
- Translated all Chinese text in workflow-frontend/static/js/index~0.1aa44a47.js - Fixed Start/End nodes, publish dialog, and UI elements - 671 total translations applied (Start: 153, End: 39, Cancel: 252, etc.) - Updated Dockerfile.frontend comment - Added documentation in WORKFLOW_CHINESE_TO_ENGLISH_TRANSLATION.md This is a permanent fix similar to the database translation approach. The translated file is committed and will be included in all future builds.
- Updated commit message in deploy-nginx-fix.sh to mention trailing slash fix - Changed from "403 error" to "403 and 404 errors" - Added explanation about proxy_pass trailing slash removal - More accurately describes the nginx configuration fix
This ensures that changes to workflow-frontend files (including translations) trigger a new frontend build and deployment.
…ignore - Added functionality to detect changes in files before rebuilding services in rebuild-and-push.sh. - Updated .gitignore to include .env.remote, .ssh/ directory, and *.pem files for better security and cleanliness. - Improved user feedback in the script with additional debug and warning messages. - Adjusted GitHub Actions workflow to support change detection and trigger builds accordingly.
- Implemented a comprehensive translation of all JavaScript files containing Chinese text, not just the main bundle. - Created a new translation script (`scripts/translate_all_workflow_js.py`) for future use. - Translated 8 JavaScript files with over 40 occurrences of Chinese text, ensuring all critical UI elements are now in English. - Updated documentation in `WORKFLOW_CHINESE_TO_ENGLISH_TRANSLATION.md` to reflect changes and provide verification steps. - Adjusted Dockerfile.frontend comment to indicate that files are pre-translated.
- Modified Dockerfile.backend to copy entire configs directory - Ensures static files (icons, logos) are included in the image - Fixes 404 errors for /user/api/v1/static/* resources on Dokploy - Static files now work regardless of volume mount configuration This fix addresses the issue where static assets like user-default-icon.png and title_logo.png were returning 404 errors in production because the Docker image only copied configs/microservice, and the volume mount ./configs:/app/configs:ro was overriding with an incomplete directory. Related files: - STATIC_ASSETS_404_FIX.md - Detailed explanation - DEPLOY_STATIC_ASSETS_FIX.md - Deployment guide
- Added easyofd and ofdparser packages to requirements.txt - Made OFD imports optional in knowledge_base_utils.py to handle missing fonts gracefully - Added Chinese fonts (wqy-microhei, wqy-zenhei) to Dockerfile.rag-base for OFD support - Added fontconfig and fc-cache for proper font registration This fixes the 400 error when creating knowledge bases, which was caused by the RAG service failing to start on port 8681 due to missing Python packages and Chinese font dependencies required by the OFD document parser.
…onflicts The strict version pins were causing pip install to fail due to dependency conflicts with other packages like PyMuPDF. Let pip resolve compatible versions automatically.
- Add comprehensive documentation for fixing Chinese to English translations - Remove obsolete SQL scripts used during debugging - Update workflow-frontend/index.html with locale forcing script - Remove backup files and outdated documentation The main translation fixes are: 1. Start/End node titles: Fixed via database update 2. Publish dialog radio buttons: Fixed in index~0.1aa44a47.js See docs/WORKFLOW_ENGLISH_TRANSLATION_FIX.md for detailed instructions.
08c7279 to
1265bac
Compare
…ation - Added KnowledgeBaseInfo field to RagChatParams for grouping knowledge base info by user ID, required for Python RAG service. - Updated BuildChatConsultParams function to populate the new KnowledgeBaseInfo field. - Improved clarity in the exploreSquare component by renaming UI labels for better user experience.
- Added final finish=1 message after streaming loop completes to ensure frontend loading spinner stops - Updated prompt template to instruct LLM to respond in English only - Updated prompt template to prevent LLM from including unwanted image links in responses Fixes: 1. Loading spinner now stops when response completes 2. Citation links now clickable after response completes (sessionStatus properly updates) 3. No more random PNG images in responses 4. Responses are now in English
…static assets 404) The ./configs:/app/configs:ro volume mount was causing issues because: 1. It overrides configs baked into the Docker image 2. On Dokploy, the host directory isn't always synced properly 3. This caused static assets to return 404 after deployments Since configs are already included in the Docker image (commit 330930f), this volume mount is unnecessary and was causing the recurring issue.
- Introduced DefaultAnswer field in RagChatParams to provide a fallback response when no relevant documents are found. - Updated BuildChatConsultParams function to set a default English answer, enhancing the chat service's usability.
…est handling - Added proxy_set_header directives for Host, X-Real-IP, X-Forwarded-For, and X-Forwarded-Proto in multiple locations to ensure proper forwarding of client information. - This change improves the handling of requests and enhances the overall functionality of the Nginx middleware.
…y handling - Added WANWU_MINIO_PROXY_SCHEME environment variable to both docker-compose files for better configuration management. - Updated Nginx configuration to remove unnecessary proxy headers and implement sub_filter for fixing mixed content issues in API responses, enhancing security and functionality.
…ality and user experience - Modified Nginx configuration to enhance mixed content handling by expanding sub_filter types and ensuring proper URL replacements. - Updated placeholder text in EditableDivV3 components to provide clearer instructions for users on inserting new lines.
- tender_hse_analyzer: Extract HSE requirements from ITT/tender documents - tender_deliverable_generator: Generate project-specific HSE deliverables - tender_cost_impact_analyzer: Analyze cost implications of HSE requirements - kpi_data_processor: Process and validate site KPI reports - hse_statistics_generator: Calculate safety metrics and generate statistics - hse_management_report: Generate executive HSE management reports
- Changed .auth-box position from absolute to relative and updated background, border-radius, and box-shadow for a modern look. - Added a blur overlay to the authentication modal for enhanced visual appeal. - Simplified layout structure by introducing .auth-content for better content organization within the modal. - Updated safety page text for clarity and improved user understanding.
…ists - Updated doGetPublicMcpList and fetchList methods to return empty lists, effectively hiding MCP marketplace items and built-in tools. - Removed unnecessary parameters and API calls to streamline functionality.
- Add redirect rule to handle /aibase/workflow -> /workflow/ - This fixes the 'Failed to view the agent' error when clicking workflows - The workflow frontend is served at /workflow/, not /aibase/workflow
- The nginx/log directory was created by docker volume mounts - It had root permissions which prevented GitHub Actions from cleaning workspace - This caused build failures
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.