multi-language-error-handling
Skill1 starsChanged 45 days agoMITView on GitHub
Hướng dẫn quản lý từ điển đa ngôn ngữ (VI/EN) lưu trong cơ sở dữ liệu tbl_lang, nạp vào bộ nhớ qua LangService và đồng bộ sự kiện qua Redis Pub/Sub.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adopt-repoSkill
- agent-strict-guardSkill
- analyze-featureSkill
- backend-api-design-flowSkill
- clean-code-naming-conventionsSkill
- code-review-gateSkill
- dangerous-action-blockerSkill
- database-transaction-managementSkill
- db-interface-procedure-flowSkill
- db-migrationSkill
- defensive-troubleshooting-guideSkill
- git-workflowSkill
- human-authority-overrideSkill
- human-master-mapSkill
- implement-featureSkill
- jpa-n-plus-one-optimizationSkill
- knowledge-graphSkill
- post-code-verificationSkill
- project-doctorSkill
- project-governance-dashboardSkill
- redis-cache-patternsSkill
- release-notesSkill
- safe-git-rebaseSkill
- security-secret-scannerSkill
- speckit-analyzeSkill
- speckit-auditSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-helpSkill
- speckit-implementSkill
- speckit-ingestSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- spec-writerSkill
- spring-middleware-pipelineSkill
- sql-repository-patternSkill
- system-dna-managerSkill
- test-featureSkill
- adopt-repoSkill
- agent-strict-guardSkill
- analyze-featureSkill
- backend-api-design-flowSkill
- clean-code-naming-conventionsSkill
- code-review-gateSkill
- dangerous-action-blockerSkill
- database-transaction-managementSkill
- db-interface-procedure-flowSkill
- db-migrationSkill
- defensive-troubleshooting-guideSkill
- git-workflowSkill
- human-authority-overrideSkill
- human-master-mapSkill
- implement-featureSkill
- jpa-n-plus-one-optimizationSkill
- knowledge-graphSkill
- multi-language-error-handlingSkill
- The first 60 shown.
The file
Files
<!-- GENERATED FROM registry/skills/multi-language-error-handling/SKILL.md — DO NOT EDIT DIRECTLY --><!-- GENERATED FROM .shared/skills/02-codestyle/multi-language-error-handling/SKILL.md — DO NOT EDIT DIRECTLY -->Quy Trình Quản Lý & Xử Lý Lỗi Đa Ngôn Ngữ (i18n LangService)
1. Mục Đích
Hướng dẫn cơ chế hỗ trợ đa ngôn ngữ động cho mã lỗi và thông báo hệ thống, cho phép cập nhật từ Admin / Backoffice mà không cần redeploy code.
2. Kiến Trúc Hoạt Động
sequenceDiagram
autonumber
actor Admin as Admin System
participant DB as Database (tbl_lang)
participant Redis as Redis (system_channel)
participant LangSvc as LangService (In-Memory Cache)
participant API as Backend Service
Admin->>DB: Cập nhật thông điệp lỗi (message_vi, message_en)
Admin->>Redis: PUBLISH system_channel '{"event":"RELOAD_LANG"}'
Redis->>LangSvc: Kích hoạt reload()
LangSvc->>DB: SELECT * FROM tbl_lang
LangSvc->>LangSvc: Cập nhật ConcurrentHashMap trong RAM
API->>LangSvc: getMessage("400010", "vi")
LangSvc-->>API: "Khách hàng đã có tài khoản chứng khoán"3. Quy Ước Viết Code
- Mọi Exception ném ra từ Service phải dùng Enum
ErrorCodeDetail(ví dụ:ErrorCodeDetail.CUSTOMER_ALREADY_EXISTS). APIExceptionHandlersẽ gọilangService.getMessage(error.code, locale)để dịch ra ngôn ngữ của client theo headerAccept-Language.- Fallback: Nếu không tìm thấy key trong database,
LangServicesẽ sử dụng message mặc định khai báo sẵn trong enumErrorCodeDetail.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

