fix(translate): preserve anchors and localize dify.ai URLs

This commit is contained in:
Alter-xyz
2025-12-25 23:08:31 -08:00
parent aace19176c
commit 0358f58613
3 changed files with 24 additions and 10 deletions

View File

@@ -91,9 +91,13 @@ For plugin-dev paths:
- `plugin-dev-en/setup``plugin-dev-zh/setup`
- `[Guide](/en/docs/guide)``[指南](/zh/docs/guide)`
**Dify website URLs** (`https://dify.ai/...`): Apply same localization
- `https://dify.ai/pricing``https://dify.ai/zh/pricing` (Chinese)
- `https://dify.ai/pricing``https://dify.ai/jp/pricing` (Japanese)
**Do NOT change:**
- External URLs (https://...)
- Anchor links (#section)
- Other external URLs (non-dify.ai)
- Anchor links (#section) - translate to match translated headings
- Asset paths without language codes
### Rule 4: Professional Translation Quality

View File

@@ -119,10 +119,15 @@ For plugin-dev paths:
- `plugin-dev-en/setup``plugin-dev-zh/setup`
- `[Guide](/en/docs/guide)``[指南](/zh/docs/guide)`
**Do NOT change:**
- External URLs (https://...)
- Anchor links (#section)
- Asset paths without language codes
**Also localize Dify website URLs** (`https://dify.ai/...`):
- `https://dify.ai/pricing``https://dify.ai/zh/pricing` (Chinese)
- `https://dify.ai/pricing``https://dify.ai/jp/pricing` (Japanese)
**Do NOT localize (preserve as-is):**
1. **In-document anchors** (`#section`): Match translated headings, not English
- Keep `#指定检索设置`, do NOT replace with `#configure-the-retrieval-settings`
2. **Other external URLs**: Non-dify.ai URLs stay unchanged
3. **Asset paths**: Images, files without language codes
## Rule 4: Translation Priority
1. **Termbase** (highest): Use exact glossary translations

View File

@@ -126,10 +126,15 @@ For plugin-dev paths:
- `plugin-dev-en/setup``plugin-dev-zh/setup`
- `[Guide](/en/docs/guide)``[指南](/zh/docs/guide)`
**Do NOT change:**
- External URLs (https://...)
- Anchor links (#section)
- Asset paths without language codes
**Also localize Dify website URLs** (`https://dify.ai/...`):
- `https://dify.ai/pricing``https://dify.ai/zh/pricing` (Chinese)
- `https://dify.ai/pricing``https://dify.ai/jp/pricing` (Japanese)
**Do NOT localize (preserve as-is):**
1. **In-document anchors** (`#section`): Match translated headings, not English
- Keep `#指定检索设置`, do NOT replace with `#configure-the-retrieval-settings`
2. **Other external URLs**: Non-dify.ai URLs stay unchanged
3. **Asset paths**: Images, files without language codes
## Rule 4: Translation Priority
1. **Termbase** (highest): Use exact glossary translations