i18n
БесплатноЗапускает вложенные скриптыНе проверенAdd, improve, and manage MediaCMS translations across the React frontend and Django templates — the en.py master file, the process_translations management…
от greedychipmunk★ 24 звезды на GitHubОб этом скилле
MediaCMS Translations
Scope: targets mediacms-io/mediacms v9.6.1 (commit
99a1801, branchmain). Translation files:files/frontend_translations/; command:files/management/commands/process_translations.py.
The two translation surfaces
- React frontend — strings wrapped with
translateStringinfrontend/src; served from Python dicts infiles/frontend_translations/<lang>.py - Django templates —
{% trans %}/gettext blocks intemplates/(seetemplates/cms/about.htmlfor the pattern)
Each language file defines two dicts: translation_strings (English key → translation, "" = untranslated) and replacement_strings. en.py is the master key set (~315 keys, sorted).
The workflow (mandatory for upstream PRs)
- Mark the string translatable in code (React
translateStringor template{% trans %}) - Add the English string to
files/frontend_translations/en.pyfirst - Run:
python manage.py process_translations
This propagates the new key into every language file (as untranslated). Upstream will not accept a PR that skips this — it guarantees no language is missing a key.
- Translate the string in the language(s) you care about
- Rebuild rules: template-only changes need no rebuild; React string changes need
make build-frontendto appear on port 80
Language management
- Default language:
LANGUAGE_CODEinsettings.py - Limit the selector: remove entries from the
LANGUAGESlist insettings.py— only listed languages appear - Add a language: add it to
LANGUAGES, then copyen.pytofiles/frontend_translations/<code>.pyand translate - ~23 frontend translation files ship: ar, bn, da, de, el, es, fr, he, hi, id, it, ja, ko, nl, pt, ru, sl, tr, ur, zh_hans, zh_hant…
- Runtime switching:
/setlanguage(frontend) and Django's/i18n/URLs
Check translation files offline
python scripts/check_translations.py files/frontend_translations/en.py files/frontend_translations/de.py
python scripts/check_translations.py --dir /path/to/mediacms/files/frontend_translations # all languages vs en.py
Reports keys missing from a language (run process_translations to fix), stale keys not in en.py, and how many strings remain untranslated. Stdlib-only. Tests: tests/test_check_translations.py.
Additional resources
- references/translation-workflow.md
docs/admins_docs.md§10, §20- Skills:
dev-stack(frontend rebuild),portal-configuration(LANGUAGE settings)
Установить i18n в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл i18n?
Add, improve, and manage MediaCMS translations across the React frontend and Django templates — the en.py master file, the process_translations management command, adding new languages, and the rebuild rules that decide when changes become visible. Use when translating strings, adding languages, fixing missing-translation keys, or preparing a translation change for an upstream PR.
Как установить скилл i18n?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл i18n запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic