Thank you for your interest in contributing! This guide will help you add terms, types, tags, or translations.
- Fork and clone the repository
- Install dependencies:
pnpm install - Create a new branch:
git checkout -b feat/add-vue-term - Make your changes (see sections below)
- Validate:
pnpm build - Commit and push (follow commit guidelines)
- Open a pull request
Create src/data/terms/{term_id}.ts (lowercase with underscores only):
import type { TTerm } from '@/types'
import { LOCALES } from '@/data/locales'
import { SOURCES } from '@/data/sources'
import { TAGS } from '@/data/tags'
import { TYPES } from '@/data/types'
export default {
id: 'vue',
name: {
[LOCALES.EN_US]: 'Vue',
},
label: {
[LOCALES.EN_US]: 'Progressive Framework',
[LOCALES.EN_GB]: LOCALES.EN_US, // Alias to en-US
[LOCALES.DE_DE]: 'Progressives Framework',
},
definition: {
[LOCALES.EN_US]: 'A progressive JavaScript framework for building user interfaces.',
[LOCALES.EN_GB]: LOCALES.EN_US,
[LOCALES.DE_DE]: 'Ein progressives JavaScript-Framework...',
},
type: [TYPES.framework],
tags: [TAGS.frontend, TAGS.open_source],
links: {
official_website: 'https://vuejs.org',
github: 'https://github.com/vuejs/core',
npm: 'https://www.npmjs.com/package/vue',
},
sources: {
label: SOURCES.community,
definition: SOURCES.official_website,
},
} as const satisfies TTermAdd to src/data/terms/index.ts:
import vue from './vue'
export const RAW_TERMS = {
// ... existing terms
[vue.id]: vue,
} as constpnpm build- Labels: Keep short (e.g., "UI Library", "Frontend Framework"), not full sentences
- Definitions: Explain what it is and why it matters
- IDs: Use lowercase with underscores (e.g.,
node_js,react_native), never dashes - Filenames: Must match ID exactly (
node_js.tsforid: 'node_js') - Locales: Provide at least
en-US, useLOCALES.EN_USfor aliasing - Sources: Only add if content comes from a verifiable source (omit for AI-generated)
Create src/data/types/{type_id}.ts or src/data/tags/{tag_id}.ts:
import type { TType } from '@/types'
import { LOCALES } from '@/data/locales'
export default {
id: 'database',
name: {
[LOCALES.EN_US]: 'Database',
[LOCALES.DE_DE]: 'Datenbank',
},
} as const satisfies TTypeAdd to src/data/types/index.ts or src/data/tags/index.ts:
import database from './database'
export const TYPE = {
// ... existing
database: database.id,
} as const
export const RAW_TYPE = {
// ... existing
[database.id]: database,
} as constFind the term file in src/data/terms/, src/data/types/, or src/data/tags/ and add translations:
label: {
[LOCALES.EN_US]: 'JavaScript Library',
[LOCALES.EN_GB]: LOCALES.EN_US, // Same as en-US
[LOCALES.DE_DE]: 'JavaScript-Bibliothek',
},Supported locales: en-US (required), en-GB, de-DE
- Add locale to
src/data/locales/index.ts:
export const LOCALES = {
EN_US: 'en-US',
EN_GB: 'en-GB',
DE_DE: 'de-DE',
FR_FR: 'fr-FR', // New locale
} as const- Update
TLocaleRecordinsrc/types/index.ts:
export type TLocaleRecord = {
'en-US': string
} & Partial<Record<'en-GB' | 'de-DE' | 'fr-FR', string>>-
Add translations to term/type/tag files using
[LOCALES.FR_FR]: '...' -
Validate:
pnpm build
- Markdown files: British English (e.g., "localised", "behaviour")
- Code: American English (e.g.,
localized,behavior) - TypeScript: Use
as const satisfies TTerm/TType/TTag - Imports: Use path aliases (
@/types,@/utils,@/data) - Constants: Use
LOCALES.EN_US,TYPES.framework,TAGS.frontend
This project uses Conventional Commits for automated versioning:
feat:- New feature (minor version bump)fix:- Bug fix (patch version bump)docs:- Documentation (no version bump)chore:- Maintenance (no version bump)
git commit -m "feat: add Vue term with translations"
git commit -m "fix: correct German translation for React"
git commit -m "feat: add French (fr-FR) locale support"Add BREAKING CHANGE: in footer for major version bump:
feat: change term ID format to kebab-case
BREAKING CHANGE: All term IDs now use kebab-case instead of snake_case
- Build:
pnpm build(validates types) - Demo:
pnpm demo:dev(test at http://localhost:5173) - Lint:
npx eslint . - Format:
npx prettier --write .
- Questions: GitHub Discussions
- Bugs: GitHub Issues
- Proposals: Open an Issue first
Thank you for contributing!