Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
const path = require('path');

const buildTextLintCommand = (filenames) => `textlint ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(' ')}`
const buildTextLintCommand = (filenames) => {
// Filter out files that should be ignored
const filtered = filenames.filter(f => {
const relative = path.relative(process.cwd(), f);
// Exclude translation-related English docs and English translations
return !relative.includes('TRANSLATION_GUIDE.md') &&
!relative.includes('TRANSLATION_STATUS.md') &&
!relative.includes('i18n/en/');
});

if (filtered.length === 0) return 'echo "No files to lint"';

return `textlint ${filtered
.map((f) => path.relative(process.cwd(), f))
.join(' ')}`;
};

module.exports = {
"docs/**/*.md": [buildTextLintCommand]
Expand Down
3 changes: 3 additions & 0 deletions .textlintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
public
README.md
docs/TRANSLATION_GUIDE.md
docs/TRANSLATION_STATUS.md
i18n/en/**
209 changes: 209 additions & 0 deletions docs/TRANSLATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# Translation Guide for UNCHAIN Projects

This guide explains how to translate UNCHAIN learning content from Japanese to English.

## Overview

UNCHAIN projects use Docusaurus for documentation with built-in i18n (internationalization) support. English translations are stored in a separate directory structure that mirrors the original Japanese content.

## Directory Structure

### Japanese (Original)
```
docs/
└── [Chain]/
└── [Project-Name]/
├── index.md
├── section-1/
│ ├── lesson-0.md
│ ├── lesson-1.md
│ └── ...
└── section-2/
└── ...
```

### English (Translation)
```
i18n/en/docusaurus-plugin-content-docs/current/
└── [Chain]/
└── [Project-Name]/
├── index.md
├── section-1/
│ ├── lesson-0.md
│ ├── lesson-1.md
│ └── ...
└── section-2/
└── ...
```

## Translation Process

### 1. Choose a Project

See [issue #3526](https://github.com/unchain-tech/UNCHAIN-projects/issues/3526) for the list of projects needing translation. Comment on the issue to claim a project before starting.

### 2. Create Directory Structure

Create the corresponding directory structure in the English translation folder:

```bash
mkdir -p i18n/en/docusaurus-plugin-content-docs/current/[Chain]/[Project-Name]
```

### 3. Translate Files

For each markdown file:

#### Elements to Translate:
- ✅ Title in YAML frontmatter
- ✅ All Japanese text content
- ✅ Image alt text (in `![alt text](url)`)
- ✅ Link text (in `[link text](url)`)

#### Elements to Keep Unchanged:
- ❌ Code blocks (```)
- ❌ Image URLs
- ❌ Link URLs
- ❌ Emojis (👋, 🎉, etc.)
- ❌ File/folder names in paths

### 4. Translation Tips

#### Standard Sections

Many documents have standard sections that should be translated consistently:

**"プロジェクトをアップグレードする"** → **"Upgrading this Project"**

**"質問する"** → **"Asking Questions"**

#### Common Terms

| Japanese | English |
|----------|---------|
| スマートコントラクト | Smart Contract |
| ブロックチェーン | Blockchain |
| ウォレット | Wallet |
| デプロイ | Deploy |
| ミント | Mint |
| トークン | Token |
| ガス代 | Gas Fee |

#### Link Translations

For GitHub documentation links, change `ja` to `en` in URLs:
- `https://docs.github.com/ja/...` → `https://docs.github.com/en/...`

### 5. Quality Checks

Before submitting:

- [ ] All markdown files have corresponding English versions
- [ ] YAML frontmatter is properly formatted
- [ ] Code blocks are intact
- [ ] Images display correctly
- [ ] Links work properly
- [ ] Build succeeds: `yarn build`
- [ ] Content makes sense in English

## Using AI Translation Tools

While AI translation (ChatGPT, Claude, DeepL, etc.) can speed up the process, **always review and edit the output**:

1. **Preserve Markdown Structure**: Ensure code blocks, links, and images remain intact
2. **Natural English**: Fix awkward phrasings, make it sound natural
3. **Technical Accuracy**: Verify technical terms are correct
4. **Consistency**: Use the same terms throughout the project

### Example Prompt for AI Translation:

```
Translate the following Japanese markdown document to English.

Requirements:
- Keep all markdown formatting intact
- Do NOT translate code blocks (enclosed in ```)
- Do NOT translate image URLs
- Do NOT translate link URLs (but DO translate link text)
- Keep all emojis unchanged
- Translate the YAML frontmatter title
- Use natural English suitable for technical documentation

[Paste Japanese markdown here]
```

## Testing Translations

### Local Development

1. Install dependencies:
```bash
yarn install
```

2. Start development server:
```bash
yarn start
```

3. View English version:
```bash
yarn start --locale en
```

4. Build to check for errors:
```bash
yarn build
```

### Viewing Translations

Once deployed, English translations will be available at:
`https://buidl.unchain.tech/[Project-Name]/en/`

## Examples

Refer to these existing translations for examples:

- **Polygon-Whitelist-NFT**: [Japanese docs](https://buidl.unchain.tech/Polygon-Whitelist-NFT/) → [English](https://buidl.unchain.tech/Polygon-Whitelist-NFT/en/)
- **TheGraph-ScaffoldEth2**: [Japanese docs](https://buidl.unchain.tech/TheGraph-ScaffoldEth2/) → [English](https://buidl.unchain.tech/TheGraph-ScaffoldEth2/en/)
- **AVAX-AMM**: [Japanese docs](https://buidl.unchain.tech/AVAX-AMM/) → [English](https://buidl.unchain.tech/AVAX-AMM/en/)

## Submitting Your Translation

1. Create a new branch:
```bash
git checkout -b translate/[project-name]
```

2. Commit your changes:
```bash
git add i18n/en/docusaurus-plugin-content-docs/current/[Chain]/[Project-Name]
git commit -m "Add English translation for [Project-Name]"
```

3. Push to your fork:
```bash
git push origin translate/[project-name]
```

4. Create a Pull Request on GitHub

5. In the PR description:
- Mention which project you translated
- Reference issue #3526
- Note if you used AI translation tools (for transparency)

## Getting Help

- **Discord**: Join the UNCHAIN Discord community
- **GitHub Issues**: Comment on [issue #3526](https://github.com/unchain-tech/UNCHAIN-projects/issues/3526)
- **Examples**: Review existing translations for guidance

## Project Status

Track translation progress on [issue #3526](https://github.com/unchain-tech/UNCHAIN-projects/issues/3526).

---

Thank you for contributing to make UNCHAIN learning content accessible to English speakers! 🌍✨
130 changes: 130 additions & 0 deletions docs/TRANSLATION_STATUS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Translation Status

This document tracks the progress of translating UNCHAIN learning content from Japanese to English.

**Last Updated**: 2025-11-08

## Overview

- **Total Projects**: 25
- **Completed**: 3 (12%)
- **In Progress**: 1 (4%)
- **Pending**: 21 (84%)

## Translation Infrastructure

✅ **Translation Guide**: [`docs/TRANSLATION_GUIDE.md`](./TRANSLATION_GUIDE.md)
- Comprehensive step-by-step guide for contributors
- Common terms glossary
- AI translation tool tips
- Quality checklist

✅ **Helper Script**: [`scripts/prepare-translation.sh`](../scripts/prepare-translation.sh)
- Automates directory structure creation
- Shows translation progress
- Provides next steps guidance

✅ **Linting Configuration**: Updated for English content
- `.textlintignore` excludes English files
- `.lintstagedrc.js` skips Japanese rules for English content

## Project Status

### ✅ Completed (3)

| ID | Project | Chain | Files | Link |
|----|---------|-------|-------|------|
| 204 | Polygon-Whitelist-NFT | Polygon | All | [View](https://buidl.unchain.tech/Polygon-Whitelist-NFT/en/) |
| 502 | AVAX-AMM | Avalanche | All | [View](https://buidl.unchain.tech/AVAX-AMM/en/) |
| 901 | TheGraph-ScaffoldEth2 | TheGraph | All | [View](https://buidl.unchain.tech/TheGraph-ScaffoldEth2/en/) |

### 🔄 In Progress (1)

| ID | Project | Chain | Progress | Notes |
|----|---------|-------|----------|-------|
| 101 | ETH-dApp | Ethereum | 3/14 files | Sample translations as examples |

### 📋 Pending (21)

#### Ethereum (5)
- [ ] 102 - ETH-NFT-Collection
- [ ] 103 - ETH-NFT-Maker
- [ ] 104 - ETH-NFT-Game
- [ ] 105 - ETH-Yield-Farm
- [ ] 106 - ETH-DAO

#### Polygon (3)
- [ ] 201 - Polygon-Generative-NFT
- [ ] 202 - Polygon-ENS-Domain
- [ ] 203 - Polygon-Mobile-dApp

#### Solana (4)
- [ ] 301 - Solana-dApp
- [ ] 302 - Solana-NFT-Drop
- [ ] 303 - Solana-Online-Store
- [ ] 304 - Solana-Wallet

#### NEAR (4)
- [ ] 401 - NEAR-Election-dApp
- [ ] 402 - NEAR-Hotel-Booking-dApp
- [ ] 403 - NEAR-BikeShare
- [ ] 404 - NEAR-MulPay

#### Avalanche (3)
- [ ] 501 - AVAX-Messenger
- [ ] 503 - AVAX-Asset-Tokenization
- [ ] 504 - AVAX-Subnet

#### Other Chains (2)
- [ ] 601 - ICP-Static-Site (ICP)
- [ ] 701 - ASTAR-SocialFi (Astar)
- [ ] 801 - XRPL-NFT-Maker (XRPL)

## How to Contribute

1. **Choose a project** from the pending list above
2. **Comment on [issue #3526](https://github.com/unchain-tech/UNCHAIN-projects/issues/3526)** to claim it
3. **Follow the guide** in [`docs/TRANSLATION_GUIDE.md`](./TRANSLATION_GUIDE.md)
4. **Use the helper script**: `./scripts/prepare-translation.sh docs/[Chain]/[Project]`
5. **Translate** the markdown files
6. **Test**: `yarn build`
7. **Submit a PR**

## Translation Workflow

```
1. Select Project → 2. Claim in Issue → 3. Prepare Structure
4. Translate Files → 5. Review & Test → 6. Submit PR
```

## Quality Standards

All translations should:
- ✅ Maintain markdown structure and formatting
- ✅ Keep code blocks unchanged
- ✅ Preserve image URLs and link URLs
- ✅ Translate link text and alt text
- ✅ Use consistent technical terminology
- ✅ Pass build without errors
- ✅ Follow existing translation examples

## Resources

- **Translation Guide**: [`docs/TRANSLATION_GUIDE.md`](./TRANSLATION_GUIDE.md)
- **Issue Tracker**: [#3526](https://github.com/unchain-tech/UNCHAIN-projects/issues/3526)
- **Example Translations**:
- [Polygon-Whitelist-NFT](https://github.com/unchain-tech/UNCHAIN-projects/tree/main/i18n/en/docusaurus-plugin-content-docs/current/Polygon/Polygon-Whitelist-NFT)
- [TheGraph-ScaffoldEth2](https://github.com/unchain-tech/UNCHAIN-projects/tree/main/i18n/en/docusaurus-plugin-content-docs/current/TheGraph/TheGraph-ScaffoldEth2)
- [AVAX-AMM](https://github.com/unchain-tech/UNCHAIN-projects/tree/main/i18n/en/docusaurus-plugin-content-docs/current/Avalanche/AVAX-AMM)
- **Discord**: UNCHAIN Community

## Notes for Translators

- **AI Translation Tools**: You can use ChatGPT, Claude, DeepL, etc. to speed up translation, but **always review and edit** the output for accuracy and natural English.
- **Technical Terms**: Refer to the glossary in the Translation Guide for consistency.
- **Questions**: Ask in Discord or comment on the issue.

---

Let's make UNCHAIN learning content accessible to English speakers worldwide! 🌍✨
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ETH-dApp

![](/metadata/ETH-dApp/learn-banner.png)
Loading