apps-language-rules
Skill18 starsChanged 6 months agoMITView on GitHub
Define i18n and internalization rules for forum (React/i18next) and docs (VitePress locales) apps. Use when adding new UI strings, translating docs, adding new locales, checking language consistency, or setting up hreflang SEO for multilingual pages.
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-cost-manager-reducerSkill
- api-contract-reviewerSkill
- cli-developerSkill
- contract-dto-consistency-reviewerSkill
- database-schema-reviewerSkill
- deep-code-reviewerSkill
- docs-managerSkill
- docs-publication-managerSkill
- feature-slice-designerSkill
- github-issue-solverSkill
- grasp-ooad-reviewSkill
- language-integratorSkill
- link-workspace-packagesSkill
- mcp-managerSkill
- migration-risk-reviewerSkill
- mobile-app-designerSkill
- mobile-app-integratorSkill
- mobile-app-product-ownerSkill
- mobile-app-reviewerSkill
- mobile-language-checkerSkill
- mobile-rulesetSkill
- mobil-ui-ux-rulesetSkill
- monitor-ciSkill
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- product-owner-deciderSkill
- react-native-performance-reviewerSkill
- react-vite-performance-reviewerSkill
- release-readiness-reviewerSkill
- repo-architecture-auditorSkill
- repo-performance-guardSkill
- repository-pattern-reviewerSkill
- security-reviewerSkill
- smart-commitSkill
- supabase-api-rpc-reviewerSkill
- supabase-index-trigger-reviewerSkill
- supabase-rls-security-reviewerSkill
- supabase-schema-reviewerSkill
- tailwind-ui-ux-reviewerSkill
- ui-contract-guardSkill
- test-managerSkill
- unit-test-plannerSkill
- vite-performance-engineerSkill
- link-workspace-packagesSkill
- monitor-ciSkill
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 0 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
All codes are registered in supabase/seeds/01_core_languages.sql and configured as VitePress locales in apps/docs/.vitepress/config.ts.
- Very specific: line 45
Add key to en.json (English, authoritative).
- Very specific: line 46
Add same key to tr.json with Turkish translation or "" placeholder.
- Very specific: line 47
Use useTranslation() hook in React components: const { t } = useTranslation().
- Very specific: line 48
Never hardcode user-facing strings in JSX — always use t('namespace.key').
- Very specific: line 49
Use interpolation for dynamic values: t('prompts.usedTimes', { count: n }).
- Very specific: line 83
Create English page at docs/<section>/<slug>.md.
- Very specific: line 84
Add it to themeConfig.sidebar in config.ts (English section).
- Very specific: line 85
Create Turkish stub at docs/tr/<section>/<slug>.md with frontmatter lang: tr and translation-pending notice.
- Very specific: line 86
Add Turkish sidebar entry to locales.tr.themeConfig.sidebar in config.ts.
- Very specific: line 112
Seed: Add ('code', 'Name', 'NativeName', 'ltr', true) to supabase/seeds/01_core_languages.sql.
- Very specific: line 113
Arena: Add apps/landing/src/locales/<code>.json mirroring en.json.
- Very specific: line 114
Web: Add apps/web/src/locales/<code>.json mirroring en.json.
- Very specific: line 115
Docs: Add <code> entry to locales{} in config.ts.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Apps Language Rules
Use when
- Adding new UI strings to
apps/web(must add toen.json+tr.jsonstubs) - Writing new documentation pages (English first; Turkish stub in
docs/tr/recommended) - Adding a new locale beyond
en/tr - Checking consistency of translations across JSON catalogs
- Setting up
hreflangSEO for multilingual pages - Reviewing React components for hardcoded strings that bypass i18next
Supported languages
| Code | Name | Default? | App locale files | Docs status |
en | English | ✅ Yes | en.json | Complete |
tr | Türkçe | No | tr.json | WIP |
es | Español | No | not yet | Stub |
fr | Français | No | not yet | Stub |
de | Deutsch | No | not yet | Stub |
zh | 中文 | No | not yet | Stub |
ja | 日本語 | No | not yet | Stub |
ko | 한국어 | No | not yet | Stub |
ru | Русский | No | not yet | Stub |
pt | Português | No | not yet | Stub |
it | Italiano | No | not yet | Stub |
All codes are registered in supabase/seeds/01_core_languages.sql and configured as VitePress locales in apps/docs/.vitepress/config.ts. Adding app locale JSON files is the primary contribution needed.
Forum i18n (apps/web — React + i18next)
Setup
- i18next initialised in
apps/web/src/i18n.ts - Locale files:
apps/web/src/locales/en.jsonandapps/web/src/locales/tr.json - Imported at app entry (
apps/web/src/index.tsx) before<App /> - Language detection order:
localStorage(lf-languagekey) → browser navigator → html tag - Fallback: English
Rules for adding strings
- Add key to
en.json(English, authoritative). - Add same key to
tr.jsonwith Turkish translation or""placeholder. - Use
useTranslation()hook in React components:const { t } = useTranslation(). - Never hardcode user-facing strings in JSX — always use
t('namespace.key'). - Use interpolation for dynamic values:
t('prompts.usedTimes', { count: n }).
Key naming convention
<feature>.<subkey>
nav.home → "Home" / "Ana Sayfa"
actions.copy → "Copy" / "Kopyala"
prompts.title → "Prompts" / "Promptlar"
errors.generic → "Something went wrong." / "Bir hata oluştu."Language switcher
- Component:
libs/features/shell/src/lib/LanguageSwitcher.tsx - Placed in the forum
Header(top-right action area) - Calls
i18n.changeLanguage(code)and updatesdocument.documentElement.lang - Language is persisted in
localStorageunder keylf-language
SEO for forum (multilingual)
SEOHead.tsxrenders<link rel="canonical">,og:locale, and JSON-LD automaticallyhreflangalternates: include?lang=trquery param in alternates (no URL-prefix routing)<html lang="">is updated on language change byLanguageSwitcherapps/web/public/sitemap.xmlincludesxhtml:linkhreflang alternates for static routes
Docs i18n (apps/docs — VitePress locales)
Setup
- VitePress
localesconfig inapps/docs/.vitepress/config.ts - Root locale:
en(English) at/ - Turkish locale:
trat/tr/ - Language switcher is rendered automatically by VitePress in the top nav
Rules for adding doc pages
- Create English page at
docs/<section>/<slug>.md. - Add it to
themeConfig.sidebarinconfig.ts(English section). - Create Turkish stub at
docs/tr/<section>/<slug>.mdwith frontmatterlang: trand translation-pending notice. - Add Turkish sidebar entry to
locales.tr.themeConfig.sidebarinconfig.ts.
Turkish stub template
---
lang: tr
title: <Turkish Title>
---
# <Turkish Title>
> Bu sayfa henüz tam olarak Türkçeye çevrilmemiştir. [İngilizce sürümünü görüntüle.](/<english-path>)
Bu belge yakında Türkçe olarak tam içerikle güncellenecektir.SEO for docs (multilingual)
hreflangalternates are in the globalheadarray inconfig.ts- VitePress
cleanUrls: trueensures canonical URLs without.html - VitePress
sitemapconfig auto-generatessitemap.xmlat build time robots.txtatapps/docs/public/robots.txtreferences the sitemap
Adding a new locale (beyond existing 11)
- Seed: Add
('code', 'Name', 'NativeName', 'ltr', true)tosupabase/seeds/01_core_languages.sql. - Arena: Add
apps/landing/src/locales/<code>.jsonmirroringen.json. Register inapps/landing/src/i18n.ts. - Web: Add
apps/web/src/locales/<code>.jsonmirroringen.json. Register inapps/web/src/i18n.ts. - Docs: Add
<code>entry tolocales{}inconfig.ts. Createdocs/<code>/index.mdanddocs/<code>/tutorials/getting-started/overview.md. Addhreflangtohead[]. UpdateinLanguagein JSON-LD. - Full step-by-step: see
docs/how-to/contributors/i18n-guide.mdand.claude/skills/language-integrator/SKILL.md.
Load only when needed
- i18n and hreflang reference
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.

