Skip to content

Commit b274a15

Browse files
committed
Update download and i18n
1 parent 54f5d6c commit b274a15

26 files changed

Lines changed: 1772 additions & 130 deletions

‎README.md‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DiffScope website
22

3-
The bilingual DiffScope website at [diffscope.org](https://diffscope.org), built with Astro, AstroWind, Tailwind CSS, and Tabler icons. It is generated as a static site and deployed to GitHub Pages.
3+
The multilingual DiffScope website at [diffscope.org](https://diffscope.org), built with Astro, AstroWind, Tailwind CSS, and Tabler icons. It is generated as a static site and deployed to GitHub Pages.
44

55
## Development
66

@@ -37,13 +37,22 @@ npm run preview
3737
| `src/assets/` | Styles and source images |
3838
| `vendor/integration/` | Site configuration integration |
3939

40-
English uses the root path; Simplified Chinese uses `/zh-Hans/`. Each locale has home, downloads, features, contribute, and community routes. The downloads page has no body content, and the other secondary pages display a title and a placeholder until their content is published. Documentation is hosted separately at [docs.diffscope.org](https://docs.diffscope.org/).
40+
Each locale has home, downloads, features, contribute, and community routes. Features, contribute, and community display a title and a placeholder until their content is published. Documentation is hosted separately at [docs.diffscope.org](https://docs.diffscope.org/).
4141

4242
## Content and localization
4343

44-
Edit `public/i18n/en.json` and `public/i18n/zh-Hans.json` to update copy. Keep the same keys and section structure in every locale. These resources contain data only; components handle presentation and behavior.
44+
### Supported languages
4545

46-
Visitors to unprefixed URLs are directed to the first supported language in their browser preferences. Chinese language tags resolve to Simplified Chinese, and unsupported languages fall back to English. Explicit `/zh-Hans/` URLs retain their language. A manual selection in the language menu is saved and takes priority over browser preferences on subsequent visits. Language changes preserve query parameters and section anchors. If local storage is unavailable, manual selections use a `lang` query parameter instead.
46+
| Language | Locale | URL |
47+
| ---------------------------- | --------- | ----------- |
48+
| English | `en` | `/` |
49+
| Simplified Chinese | `zh-Hans` | `/zh-Hans/` |
50+
| Traditional Chinese (Taiwan) | `zh-Hant` | `/zh-Hant/` |
51+
| Japanese | `ja` | `/ja/` |
52+
53+
Edit the locale resources in `public/i18n/` to update copy. Keep the same keys and section structure in every locale. These resources contain data only; components handle presentation and behavior.
54+
55+
Visitors to unprefixed URLs are directed to a supported language based on their browser preferences. Explicit locale-prefixed URLs retain their language. A manual selection in the language menu is saved and takes priority over browser preferences on subsequent visits. Language changes preserve query parameters and section anchors. If local storage is unavailable, manual selections use a `lang` query parameter instead.
4756

4857
To add a language, create its JSON resource, register it in `src/i18n/index.ts`, and add its identifier to `src/i18n/routing.mjs`. Astro and sitemap configuration share this locale list. Add the localized text for every existing key, including accessibility labels and metadata. Language names come from each resource's `languageName` field.
4958

@@ -55,9 +64,15 @@ Announcements are rendered during the build. The browser also fetches the announ
5564

5665
## Downloads
5766

58-
The release catalog in `src/utils/downloads.mjs` is currently empty. Populate it when releases become available. The download controls distinguish unavailable channels from channels that do not support the visitor's system.
67+
Configure the catalog URL, enabled products, their display names and icons, and the default product in `src/data/downloads.json`. Products not in this list are never fetched or displayed. The production catalog is `https://catalogs.diffscope.org/v1`.
68+
69+
Each product provides `index.json` for Stable and Beta and `nightly.json` for Nightly. Each channel's first version entry is its latest release. Manifest paths are resolved relative to their index URL. Manifests supply release notes and download URLs, platforms, architectures, variants, sizes, and SHA-256 checksums.
70+
71+
The home page awaits both indexes and their latest manifests before displaying download details. All download controls share request caches. The primary button prefers a compatible latest release in Stable, then Beta, then Nightly. If none supports the visitor's system, it offers the first available release and links to the downloads page instead of downloading a file. No releases results in a disabled Coming Soon button; request failures offer a retry.
72+
73+
On the downloads page, selecting a product loads its indexes and latest manifests to choose a compatible default tab and display platform warnings. Other manifests load only when their version cards are opened. The header download menu on this page loads only when opened. A hash of `#diffscope` selects the product; `#diffscope/1.0.0` also selects its channel and opens that version. Product and version identifiers are URL-encoded. Explicit version routes take priority over automatic channel selection.
5974

60-
For a supported system, the primary button selects Stable, then Beta, then Nightly. Platform detection supports Windows, macOS, and Linux. Mobile and unknown systems are treated as unsupported. Keep release selection independent of the interface and update its tests when changing this behavior.
75+
Windows, macOS, and Linux use their standard display names from locale resources; other platform labels and all architecture labels preserve manifest values. The `installer`, `portable`, and `debug_symbols` variants are translated; unknown variants are displayed unchanged. Automatic download selection uses browser platform and architecture hints where available, prefers installers, and excludes source archives and debug symbols. When the architecture cannot be determined unambiguously, visitors choose a file on the downloads page. Keep release selection independent of the interface and update its tests when changing this behavior.
6176

6277
## Deployment
6378

‎REUSE.toml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
version = 1
22

3+
[[annotations]]
4+
path = "src/data/downloads.json"
5+
SPDX-FileCopyrightText = "Team OpenVPI"
6+
SPDX-License-Identifier = "MIT"
7+
38
[[annotations]]
49
path = ".gitignore"
510
SPDX-FileCopyrightText = "Team OpenVPI"
@@ -61,12 +66,7 @@ SPDX-FileCopyrightText = "Team OpenVPI"
6166
SPDX-License-Identifier = "CC-BY-SA-4.0"
6267

6368
[[annotations]]
64-
path = "public/i18n/en.json"
65-
SPDX-FileCopyrightText = "Team OpenVPI"
66-
SPDX-License-Identifier = "CC-BY-SA-4.0"
67-
68-
[[annotations]]
69-
path = "public/i18n/zh-Hans.json"
69+
path = "public/i18n/*.json"
7070
SPDX-FileCopyrightText = "Team OpenVPI"
7171
SPDX-License-Identifier = "CC-BY-SA-4.0"
7272

‎public/i18n/en.json‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"getInvolved": "Get Involved",
2222
"otherVersions": "Download other versions",
2323
"channels": "Choose a release channel",
24-
"comingSoon": "Coming soon",
24+
"comingSoon": "Coming Soon",
2525
"unsupported": "Not supported on your system",
2626
"download": "Download",
2727
"betaDownload": "Download (Beta)",
@@ -86,6 +86,32 @@
8686
"announcement": {
8787
"text": "This project is currently under development. Downloads will be available soon."
8888
},
89+
"downloads": {
90+
"title": "Downloads",
91+
"products": "Choose a product",
92+
"productDescriptions": {
93+
"diffscope": "A free, professional singing-voice synthesis editor"
94+
},
95+
"loading": "Loading releases…",
96+
"loadingVersion": "Loading download details…",
97+
"loadError": "Releases could not be loaded. Please try again.",
98+
"versionError": "Download details could not be loaded. Please try again.",
99+
"retry": "Retry",
100+
"downloadVersion": "Download v{version}{channel}",
101+
"channelSuffix": { "stable": "", "beta": " (Beta)", "nightly": " (Nightly)" },
102+
"unsupportedHint": "Not supported on your system · View all downloads",
103+
"viewVersions": "View all versions",
104+
"noReleases": "No releases are available in this channel yet.",
105+
"unsupportedWarning": "The latest release in this channel does not support your system. Downloads for other systems are listed below.",
106+
"releaseNotes": "Release notes",
107+
"noReleaseNotes": "Release notes are not available for this version.",
108+
"downloadFile": "Download {name}",
109+
"fileDetails": "{size} · SHA-256: {checksum}",
110+
"invalidRoute": "The requested product or version is not available.",
111+
"requiresJavaScript": "Enable JavaScript to load releases and download files.",
112+
"variants": { "installer": "Installer", "portable": "Portable", "debug_symbols": "Debug Symbols" },
113+
"platforms": { "windows": "Windows", "macos": "macOS", "linux": "Linux" }
114+
},
89115
"placeholder": {
90116
"body": "TODO"
91117
}

‎public/i18n/ja.json‎

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"nav": {
3+
"downloads": "ダウンロード",
4+
"features": "機能",
5+
"contribute": "コントリビュート",
6+
"community": "コミュニティ",
7+
"docs": "ドキュメント"
8+
},
9+
"meta": {
10+
"title": "DiffScope",
11+
"description": "DiffSinger を搭載した、自由でプロフェッショナルな歌声合成エディター。"
12+
},
13+
"ui": {
14+
"skip": "本文へスキップ",
15+
"home": "DiffScope ホーム",
16+
"theme": "ダークモードを切り替え",
17+
"language": "言語を選択",
18+
"menu": "ナビゲーションを開閉",
19+
"github": "GitHub で DiffScope を見る",
20+
"learnMore": "詳しく見る",
21+
"getInvolved": "開発に参加",
22+
"otherVersions": "ほかのバージョンをダウンロード",
23+
"channels": "リリースチャンネルを選択",
24+
"comingSoon": "近日公開",
25+
"unsupported": "お使いのシステムには対応していません",
26+
"download": "ダウンロード",
27+
"betaDownload": "ダウンロード(Beta)",
28+
"nightlyDownload": "ダウンロード(Nightly)",
29+
"stable": "安定版",
30+
"beta": "Beta 版",
31+
"nightly": "Nightly 版"
32+
},
33+
"hero": {
34+
"slogan": "自由でプロフェッショナルな\n歌声合成エディター",
35+
"powered": "DiffSinger 搭載",
36+
"imageAlt": "ノートパソコン上の DiffScope。トラック、音符、音素、ピッチカーブ、合成パラメーターの編集画面を表示"
37+
},
38+
"features": {
39+
"title": "DiffScope を選ぶ理由",
40+
"items": [
41+
{
42+
"title": "歌声合成のために設計",
43+
"description": "トラック、音符、音素、パラメーターの編集をひとつのワークスペースに集約。歌声合成のための、プロフェッショナルで充実した制作環境を提供します。"
44+
},
45+
{
46+
"title": "オープンな合成エコシステム",
47+
"description": "プラグインを使って、さまざまな歌声合成エンジン、エフェクト、ツールを組み合わせ、制作スタイルに合ったワークフローを構築できます。"
48+
},
49+
{
50+
"title": "AI とともに創作",
51+
"description": "MCP を通じてエディターのすべての機能を AI に公開。AI がプロジェクトを理解し、歌声を編集して DiffScope を操作することで、創作に参加するパートナーになります。"
52+
}
53+
]
54+
},
55+
"contribute": {
56+
"title": "みんなのための創作ツール",
57+
"paragraphs": [
58+
"DiffScope は自由ソフトウェアです。誰でも自由に利用、研究、改良できるほか、自分だけのプラグイン、ツール、ワークフローを作ることもできます。",
59+
"創作ツールは制限のあるライセンスや閉じたエコシステムに縛られるべきではなく、その進む方向はクリエイターと開発者がともに決めるべきだと私たちは考えています。",
60+
"優れた創作ツールは、クリエイターと開発者がともに形作るものです。アイデアの共有、問題の報告、デザインの改善、コードの作成など、あらゆる参加が DiffScope を私たちの目指すツールへと近づけます。"
61+
]
62+
},
63+
"community": {
64+
"title": "DiffSinger コミュニティとともに",
65+
"paragraphs": [
66+
"DiffScope は、歌声合成の技術、ツール、制作ワークフローを長年探求してきた DiffSinger コミュニティから生まれました。",
67+
"DiffSinger の継続的な進化から、データセット制作、ボコーダー、推論・デプロイ用ツール、オープンなプロジェクト形式やエディターまで、コミュニティの取り組みが DiffScope を形作っています。DiffSinger を使うためのエディターにとどまらず、経験と技術が集結して生まれた創作プラットフォームです。",
68+
"コミュニティの新しいモデル、技術、アイデアを実際の音楽制作に取り入れやすくし、クリエイターのニーズによって DiffSinger エコシステム全体が発展し続けることを目指しています。"
69+
]
70+
},
71+
"cta": {
72+
"title": "DiffScope を今すぐ試す"
73+
},
74+
"footer": {
75+
"rights": "© Team OpenVPI",
76+
"licenseBefore": "特に記載がない限り、ウェブサイトのコンテンツは ",
77+
"licenseAfter": " ライセンスで提供されています。",
78+
"licenseName": "CC BY-SA 4.0"
79+
},
80+
"notFound": {
81+
"title": "ページが見つかりません",
82+
"description": "お探しのページは存在しません。",
83+
"back": "ホームに戻る"
84+
},
85+
"languageName": "日本語",
86+
"announcement": {
87+
"text": "このプロジェクトは現在開発中です。ダウンロードは近日中に利用可能になります。"
88+
},
89+
"downloads": {
90+
"title": "ダウンロード",
91+
"products": "製品を選択",
92+
"productDescriptions": {
93+
"diffscope": "自由でプロフェッショナルな歌声合成エディター"
94+
},
95+
"loading": "リリースを読み込み中…",
96+
"loadingVersion": "ダウンロード情報を読み込み中…",
97+
"loadError": "リリースを読み込めませんでした。もう一度お試しください。",
98+
"versionError": "ダウンロード情報を読み込めませんでした。もう一度お試しください。",
99+
"retry": "再試行",
100+
"downloadVersion": "v{version}{channel} をダウンロード",
101+
"channelSuffix": { "stable": "", "beta": " (Beta)", "nightly": " (Nightly)" },
102+
"unsupportedHint": "お使いのシステムには未対応 · すべてのダウンロードを見る",
103+
"viewVersions": "すべてのバージョンを見る",
104+
"noReleases": "このチャンネルには、まだダウンロードできるリリースがありません。",
105+
"unsupportedWarning": "このチャンネルの最新リリースはお使いのシステムに対応していません。下記からほかのシステム向けのリリースを確認してダウンロードできます。",
106+
"releaseNotes": "リリースノート",
107+
"noReleaseNotes": "このバージョンのリリースノートはありません。",
108+
"downloadFile": "{name} をダウンロード",
109+
"fileDetails": "{size} · SHA-256: {checksum}",
110+
"invalidRoute": "指定された製品またはバージョンは利用できません。",
111+
"requiresJavaScript": "リリースの読み込みとファイルのダウンロードには JavaScript を有効にしてください。",
112+
"variants": { "installer": "インストーラー", "portable": "ポータブル版", "debug_symbols": "デバッグシンボル" },
113+
"platforms": { "windows": "Windows", "macos": "macOS", "linux": "Linux" }
114+
},
115+
"placeholder": {
116+
"body": "準備中"
117+
}
118+
}

‎public/i18n/zh-Hans.json‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"nav": {
33
"downloads": "下载",
44
"features": "功能",
5-
"contribute": "参与贡献",
5+
"contribute": "贡献",
66
"community": "社区",
77
"docs": "文档"
88
},
@@ -86,6 +86,32 @@
8686
"announcement": {
8787
"text": "本项目当前正在开发中。下载将在不久后可用。"
8888
},
89+
"downloads": {
90+
"title": "下载",
91+
"products": "选择产品",
92+
"productDescriptions": {
93+
"diffscope": "自由且专业的歌声合成编辑器"
94+
},
95+
"loading": "正在加载发布版本…",
96+
"loadingVersion": "正在加载下载详情…",
97+
"loadError": "无法加载发布版本,请重试。",
98+
"versionError": "无法加载下载详情,请重试。",
99+
"retry": "重试",
100+
"downloadVersion": "下载 v{version}{channel}",
101+
"channelSuffix": { "stable": "", "beta": " (Beta)", "nightly": " (Nightly)" },
102+
"unsupportedHint": "不支持当前系统 · 查看全部下载",
103+
"viewVersions": "查看全部版本",
104+
"noReleases": "此通道暂时没有可下载的版本。",
105+
"unsupportedWarning": "此通道的最新版本不支持当前系统。你仍可在下方查看并下载其他系统的版本。",
106+
"releaseNotes": "发行说明",
107+
"noReleaseNotes": "此版本暂无发行说明。",
108+
"downloadFile": "下载 {name}",
109+
"fileDetails": "{size} · SHA-256:{checksum}",
110+
"invalidRoute": "指定的产品或版本不可用。",
111+
"requiresJavaScript": "请启用 JavaScript 以加载发布版本并下载文件。",
112+
"variants": { "installer": "安装程序", "portable": "便携版", "debug_symbols": "调试符号" },
113+
"platforms": { "windows": "Windows", "macos": "macOS", "linux": "Linux" }
114+
},
89115
"placeholder": {
90116
"body": "TODO"
91117
}

0 commit comments

Comments
 (0)