Commit fa21868
authored
feat: add chinese & hindi translations (#771)
* feat: add i18n infrastructure with Chinese language support
- Add languages.ts registry for supported languages (en, zh)
- Add ui-strings.ts with multilingual UI labels and messages
- Create English baseline documentation in src/i18n/en/
- Add i18n validation script to ensure translation completeness
- Add Chinese i18n rules for translation guidelines
* docs: add Simplified Chinese documentation translations
Complete Mandarin translations for all documentation:
- README.md with full API documentation and examples
- GFM spec (GitHub Flavored Markdown specification)
- CommonMark spec (Markdown specification)
- Interactive demo template
All natural language content translated to Simplified Chinese (普通话)
with technical terms including English equivalents on first use.
* docs: add Simplified Chinese JSDoc documentation to public APIs
Add @lang zh JSDoc tags with Simplified Chinese translations to all exported:
- Functions (parser, compilers, utilities)
- Types and interfaces (Options, RenderOptions, AST nodes)
- React, HTML, Markdown, Native, Solid, and Vue components
Improves developer experience for Chinese-speaking developers with
bilingual inline documentation visible in IDEs and editors.
* feat: add Hindi language support for internationalization
Add Modern Standard Hindi (हिन्दी) as third supported language:
- Complete translations of all documentation (README, specs, template)
- Hindi UI strings for interactive components
- Hindi i18n translation guidelines
- Update language registry and UI strings to include Hindi
Follows global speaker rankings (Ethnologue 2025) for language prioritization.
Improves accessibility for Hindi-speaking developers worldwide.
* docs: add Hindi JSDoc documentation to public APIs
Add @lang hi JSDoc tags with Modern Standard Hindi translations to all exported:
- Core parser and compiler functions
- Type definitions and interfaces
- All renderer adapters (React, HTML, Markdown, Native, Solid, Vue)
Completes trilingual documentation (English, Chinese, Hindi) for all
public APIs, making the library more accessible to developers globally.
* feat: add language selector to interactive demo
Add multilingual support to the demo site:
- Language dropdown in navigation for English, Chinese, Hindi
- Dynamic content loading based on selected language
- Internationalized UI strings for all controls and labels
- Responsive design with language-specific typography
Users can now view documentation and try the parser in their preferred
language, improving accessibility and user experience.
* chore: rebuild site with i18n support
* docs: update repository documentation for i18n support
- Update AGENTS.md with i18n workflow and translation guidelines
- Add i18n contribution guidelines to CONTRIBUTING.md
- Update README.md with language support information
- Add i18n command documentation for cursor workflow
- Add parse.spec.ts test for i18n validation
* test: fix inline snapshot formatting for HTML block test1 parent 4068d42 commit fa21868
File tree
61 files changed
+57932
-2778
lines changed- .changeset
- .cursor
- commands
- rules
- docs
- assets
- scripts
- src
- i18n
- en
- hi
- zh
- site
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
61 files changed
+57932
-2778
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
383 | | - | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| |||
0 commit comments