diff --git a/README.en.md b/README.en.md index 7203d6e..7683db8 100644 --- a/README.en.md +++ b/README.en.md @@ -46,7 +46,7 @@ homepage ## Contribution Guide -See [CONTRIBUTING.md](docs/en-US/CONTRIBUTING.md) in the `docs` directory to learn how to participate in the project. +See [CONTRIBUTING.md](docs/en/CONTRIBUTING.md) in the `docs` directory to learn how to participate in the project. ## License diff --git a/README.md b/README.md index c20b6c9..373b908 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ homepage ## 贡献指南 -参见 `docs` 目录中的 [CONTRIBUTING.md](docs/zh-CN/CONTRIBUTING.md) 了解如何参与项目。 +参见 `docs` 目录中的 [CONTRIBUTING.md](docs/zh-Hans/CONTRIBUTING.md) 了解如何参与项目。 ## 许可 diff --git a/README.zh-Hant.md b/README.zh-Hant.md index b55b296..43f0500 100644 --- a/README.zh-Hant.md +++ b/README.zh-Hant.md @@ -46,7 +46,7 @@ homepage ## 貢獻指南 -參見 `docs` 目錄中的 [CONTRIBUTING.md](docs/zh-TW/CONTRIBUTING.md) 了解如何參與專案。 +參見 `docs` 目錄中的 [CONTRIBUTING.md](docs/zh-Hant/CONTRIBUTING.md) 了解如何參與專案。 ## 許可 diff --git a/data/en-US/about.json b/data/en/about.json similarity index 100% rename from data/en-US/about.json rename to data/en/about.json diff --git a/data/en-US/contributors.json b/data/en/contributors.json similarity index 100% rename from data/en-US/contributors.json rename to data/en/contributors.json diff --git a/data/en-US/index.json b/data/en/index.json similarity index 100% rename from data/en-US/index.json rename to data/en/index.json diff --git a/data/en-US/projects.json b/data/en/projects.json similarity index 100% rename from data/en-US/projects.json rename to data/en/projects.json diff --git a/data/en-US/sponsors.json b/data/en/sponsors.json similarity index 100% rename from data/en-US/sponsors.json rename to data/en/sponsors.json diff --git a/data/en-US/updates.json b/data/en/updates.json similarity index 100% rename from data/en-US/updates.json rename to data/en/updates.json diff --git a/data/en-US/updates/2023/starset-wiki-calls-for-contributions.md b/data/en/updates/2023/starset-wiki-calls-for-contributions.md similarity index 100% rename from data/en-US/updates/2023/starset-wiki-calls-for-contributions.md rename to data/en/updates/2023/starset-wiki-calls-for-contributions.md diff --git a/data/en-US/updates/2024/changes-about-our-social-profiles.md b/data/en/updates/2024/changes-about-our-social-profiles.md similarity index 100% rename from data/en-US/updates/2024/changes-about-our-social-profiles.md rename to data/en/updates/2024/changes-about-our-social-profiles.md diff --git a/data/en-US/updates/2024/starset-wiki-project-update-2024.md b/data/en/updates/2024/starset-wiki-project-update-2024.md similarity index 100% rename from data/en-US/updates/2024/starset-wiki-project-update-2024.md rename to data/en/updates/2024/starset-wiki-project-update-2024.md diff --git a/data/en-US/updates/2025/introducing-tss-rocks.md b/data/en/updates/2025/introducing-tss-rocks.md similarity index 100% rename from data/en-US/updates/2025/introducing-tss-rocks.md rename to data/en/updates/2025/introducing-tss-rocks.md diff --git a/data/en-US/updates/index/2023.json b/data/en/updates/index/2023.json similarity index 100% rename from data/en-US/updates/index/2023.json rename to data/en/updates/index/2023.json diff --git a/data/en-US/updates/index/2024.json b/data/en/updates/index/2024.json similarity index 100% rename from data/en-US/updates/index/2024.json rename to data/en/updates/index/2024.json diff --git a/data/en-US/updates/index/2025.json b/data/en/updates/index/2025.json similarity index 100% rename from data/en-US/updates/index/2025.json rename to data/en/updates/index/2025.json diff --git a/data/zh-CN/about.json b/data/zh-Hans/about.json similarity index 100% rename from data/zh-CN/about.json rename to data/zh-Hans/about.json diff --git a/data/zh-CN/contributors.json b/data/zh-Hans/contributors.json similarity index 100% rename from data/zh-CN/contributors.json rename to data/zh-Hans/contributors.json diff --git a/data/zh-CN/index.json b/data/zh-Hans/index.json similarity index 100% rename from data/zh-CN/index.json rename to data/zh-Hans/index.json diff --git a/data/zh-CN/projects.json b/data/zh-Hans/projects.json similarity index 100% rename from data/zh-CN/projects.json rename to data/zh-Hans/projects.json diff --git a/data/zh-CN/sponsors.json b/data/zh-Hans/sponsors.json similarity index 100% rename from data/zh-CN/sponsors.json rename to data/zh-Hans/sponsors.json diff --git a/data/zh-CN/updates.json b/data/zh-Hans/updates.json similarity index 100% rename from data/zh-CN/updates.json rename to data/zh-Hans/updates.json diff --git a/data/zh-CN/updates/2020/journal-2020q3.md b/data/zh-Hans/updates/2020/journal-2020q3.md similarity index 100% rename from data/zh-CN/updates/2020/journal-2020q3.md rename to data/zh-Hans/updates/2020/journal-2020q3.md diff --git a/data/zh-CN/updates/2021/disclaimer-about-bilibili-horizons-dmca.md b/data/zh-Hans/updates/2021/disclaimer-about-bilibili-horizons-dmca.md similarity index 100% rename from data/zh-CN/updates/2021/disclaimer-about-bilibili-horizons-dmca.md rename to data/zh-Hans/updates/2021/disclaimer-about-bilibili-horizons-dmca.md diff --git a/data/zh-CN/updates/2021/journal-2020q4.md b/data/zh-Hans/updates/2021/journal-2020q4.md similarity index 100% rename from data/zh-CN/updates/2021/journal-2020q4.md rename to data/zh-Hans/updates/2021/journal-2020q4.md diff --git a/data/zh-CN/updates/2021/one-year-anniversary.md b/data/zh-Hans/updates/2021/one-year-anniversary.md similarity index 100% rename from data/zh-CN/updates/2021/one-year-anniversary.md rename to data/zh-Hans/updates/2021/one-year-anniversary.md diff --git a/data/zh-CN/updates/2021/summary-202102.md b/data/zh-Hans/updates/2021/summary-202102.md similarity index 100% rename from data/zh-CN/updates/2021/summary-202102.md rename to data/zh-Hans/updates/2021/summary-202102.md diff --git a/data/zh-CN/updates/2021/summary-202108.md b/data/zh-Hans/updates/2021/summary-202108.md similarity index 100% rename from data/zh-CN/updates/2021/summary-202108.md rename to data/zh-Hans/updates/2021/summary-202108.md diff --git a/data/zh-CN/updates/2022/journal-2021h2.md b/data/zh-Hans/updates/2022/journal-2021h2.md similarity index 100% rename from data/zh-CN/updates/2022/journal-2021h2.md rename to data/zh-Hans/updates/2022/journal-2021h2.md diff --git a/data/zh-CN/updates/2023/10th-anniversary-special.md b/data/zh-Hans/updates/2023/10th-anniversary-special.md similarity index 100% rename from data/zh-CN/updates/2023/10th-anniversary-special.md rename to data/zh-Hans/updates/2023/10th-anniversary-special.md diff --git a/data/zh-CN/updates/2023/journal-2022.md b/data/zh-Hans/updates/2023/journal-2022.md similarity index 100% rename from data/zh-CN/updates/2023/journal-2022.md rename to data/zh-Hans/updates/2023/journal-2022.md diff --git a/data/zh-CN/updates/2023/lyrics-translation-completed.md b/data/zh-Hans/updates/2023/lyrics-translation-completed.md similarity index 100% rename from data/zh-CN/updates/2023/lyrics-translation-completed.md rename to data/zh-Hans/updates/2023/lyrics-translation-completed.md diff --git a/data/zh-CN/updates/2023/summary-202310.md b/data/zh-Hans/updates/2023/summary-202310.md similarity index 100% rename from data/zh-CN/updates/2023/summary-202310.md rename to data/zh-Hans/updates/2023/summary-202310.md diff --git a/data/zh-CN/updates/2024/journal-2023.md b/data/zh-Hans/updates/2024/journal-2023.md similarity index 100% rename from data/zh-CN/updates/2024/journal-2023.md rename to data/zh-Hans/updates/2024/journal-2023.md diff --git a/data/zh-CN/updates/2025/introducing-tss-rocks.md b/data/zh-Hans/updates/2025/introducing-tss-rocks.md similarity index 100% rename from data/zh-CN/updates/2025/introducing-tss-rocks.md rename to data/zh-Hans/updates/2025/introducing-tss-rocks.md diff --git a/data/zh-CN/updates/2025/journal-2024.md b/data/zh-Hans/updates/2025/journal-2024.md similarity index 100% rename from data/zh-CN/updates/2025/journal-2024.md rename to data/zh-Hans/updates/2025/journal-2024.md diff --git a/data/zh-CN/updates/2025/starset-mirror-now-part-of-wholetrans.md b/data/zh-Hans/updates/2025/starset-mirror-now-part-of-wholetrans.md similarity index 100% rename from data/zh-CN/updates/2025/starset-mirror-now-part-of-wholetrans.md rename to data/zh-Hans/updates/2025/starset-mirror-now-part-of-wholetrans.md diff --git a/data/zh-CN/updates/index/2020.json b/data/zh-Hans/updates/index/2020.json similarity index 100% rename from data/zh-CN/updates/index/2020.json rename to data/zh-Hans/updates/index/2020.json diff --git a/data/zh-CN/updates/index/2021.json b/data/zh-Hans/updates/index/2021.json similarity index 100% rename from data/zh-CN/updates/index/2021.json rename to data/zh-Hans/updates/index/2021.json diff --git a/data/zh-CN/updates/index/2022.json b/data/zh-Hans/updates/index/2022.json similarity index 100% rename from data/zh-CN/updates/index/2022.json rename to data/zh-Hans/updates/index/2022.json diff --git a/data/zh-CN/updates/index/2023.json b/data/zh-Hans/updates/index/2023.json similarity index 100% rename from data/zh-CN/updates/index/2023.json rename to data/zh-Hans/updates/index/2023.json diff --git a/data/zh-CN/updates/index/2024.json b/data/zh-Hans/updates/index/2024.json similarity index 100% rename from data/zh-CN/updates/index/2024.json rename to data/zh-Hans/updates/index/2024.json diff --git a/data/zh-CN/updates/index/2025.json b/data/zh-Hans/updates/index/2025.json similarity index 100% rename from data/zh-CN/updates/index/2025.json rename to data/zh-Hans/updates/index/2025.json diff --git a/data/zh-TW/about.json b/data/zh-Hant/about.json similarity index 100% rename from data/zh-TW/about.json rename to data/zh-Hant/about.json diff --git a/data/zh-TW/contributors.json b/data/zh-Hant/contributors.json similarity index 100% rename from data/zh-TW/contributors.json rename to data/zh-Hant/contributors.json diff --git a/data/zh-TW/index.json b/data/zh-Hant/index.json similarity index 100% rename from data/zh-TW/index.json rename to data/zh-Hant/index.json diff --git a/data/zh-TW/projects.json b/data/zh-Hant/projects.json similarity index 100% rename from data/zh-TW/projects.json rename to data/zh-Hant/projects.json diff --git a/data/zh-TW/sponsors.json b/data/zh-Hant/sponsors.json similarity index 100% rename from data/zh-TW/sponsors.json rename to data/zh-Hant/sponsors.json diff --git a/data/zh-TW/updates.json b/data/zh-Hant/updates.json similarity index 100% rename from data/zh-TW/updates.json rename to data/zh-Hant/updates.json diff --git a/data/zh-TW/updates/2020/journal-2020q3.md b/data/zh-Hant/updates/2020/journal-2020q3.md similarity index 100% rename from data/zh-TW/updates/2020/journal-2020q3.md rename to data/zh-Hant/updates/2020/journal-2020q3.md diff --git a/data/zh-TW/updates/2021/disclaimer-about-bilibili-horizons-dmca.md b/data/zh-Hant/updates/2021/disclaimer-about-bilibili-horizons-dmca.md similarity index 100% rename from data/zh-TW/updates/2021/disclaimer-about-bilibili-horizons-dmca.md rename to data/zh-Hant/updates/2021/disclaimer-about-bilibili-horizons-dmca.md diff --git a/data/zh-TW/updates/2021/journal-2020q4.md b/data/zh-Hant/updates/2021/journal-2020q4.md similarity index 100% rename from data/zh-TW/updates/2021/journal-2020q4.md rename to data/zh-Hant/updates/2021/journal-2020q4.md diff --git a/data/zh-TW/updates/2021/one-year-anniversary.md b/data/zh-Hant/updates/2021/one-year-anniversary.md similarity index 100% rename from data/zh-TW/updates/2021/one-year-anniversary.md rename to data/zh-Hant/updates/2021/one-year-anniversary.md diff --git a/data/zh-TW/updates/2021/summary-202102.md b/data/zh-Hant/updates/2021/summary-202102.md similarity index 100% rename from data/zh-TW/updates/2021/summary-202102.md rename to data/zh-Hant/updates/2021/summary-202102.md diff --git a/data/zh-TW/updates/2021/summary-202108.md b/data/zh-Hant/updates/2021/summary-202108.md similarity index 100% rename from data/zh-TW/updates/2021/summary-202108.md rename to data/zh-Hant/updates/2021/summary-202108.md diff --git a/data/zh-TW/updates/2022/journal-2021h2.md b/data/zh-Hant/updates/2022/journal-2021h2.md similarity index 100% rename from data/zh-TW/updates/2022/journal-2021h2.md rename to data/zh-Hant/updates/2022/journal-2021h2.md diff --git a/data/zh-TW/updates/2023/10th-anniversary-special.md b/data/zh-Hant/updates/2023/10th-anniversary-special.md similarity index 100% rename from data/zh-TW/updates/2023/10th-anniversary-special.md rename to data/zh-Hant/updates/2023/10th-anniversary-special.md diff --git a/data/zh-TW/updates/2023/journal-2022.md b/data/zh-Hant/updates/2023/journal-2022.md similarity index 100% rename from data/zh-TW/updates/2023/journal-2022.md rename to data/zh-Hant/updates/2023/journal-2022.md diff --git a/data/zh-TW/updates/2023/lyrics-translation-completed.md b/data/zh-Hant/updates/2023/lyrics-translation-completed.md similarity index 100% rename from data/zh-TW/updates/2023/lyrics-translation-completed.md rename to data/zh-Hant/updates/2023/lyrics-translation-completed.md diff --git a/data/zh-TW/updates/2023/summary-202310.md b/data/zh-Hant/updates/2023/summary-202310.md similarity index 100% rename from data/zh-TW/updates/2023/summary-202310.md rename to data/zh-Hant/updates/2023/summary-202310.md diff --git a/data/zh-TW/updates/2024/journal-2023.md b/data/zh-Hant/updates/2024/journal-2023.md similarity index 100% rename from data/zh-TW/updates/2024/journal-2023.md rename to data/zh-Hant/updates/2024/journal-2023.md diff --git a/data/zh-TW/updates/2025/introducing-tss-rocks.md b/data/zh-Hant/updates/2025/introducing-tss-rocks.md similarity index 100% rename from data/zh-TW/updates/2025/introducing-tss-rocks.md rename to data/zh-Hant/updates/2025/introducing-tss-rocks.md diff --git a/data/zh-TW/updates/2025/journal-2024.md b/data/zh-Hant/updates/2025/journal-2024.md similarity index 100% rename from data/zh-TW/updates/2025/journal-2024.md rename to data/zh-Hant/updates/2025/journal-2024.md diff --git a/data/zh-TW/updates/2025/starset-mirror-now-part-of-wholetrans.md b/data/zh-Hant/updates/2025/starset-mirror-now-part-of-wholetrans.md similarity index 100% rename from data/zh-TW/updates/2025/starset-mirror-now-part-of-wholetrans.md rename to data/zh-Hant/updates/2025/starset-mirror-now-part-of-wholetrans.md diff --git a/data/zh-TW/updates/index/2020.json b/data/zh-Hant/updates/index/2020.json similarity index 100% rename from data/zh-TW/updates/index/2020.json rename to data/zh-Hant/updates/index/2020.json diff --git a/data/zh-TW/updates/index/2021.json b/data/zh-Hant/updates/index/2021.json similarity index 100% rename from data/zh-TW/updates/index/2021.json rename to data/zh-Hant/updates/index/2021.json diff --git a/data/zh-TW/updates/index/2022.json b/data/zh-Hant/updates/index/2022.json similarity index 100% rename from data/zh-TW/updates/index/2022.json rename to data/zh-Hant/updates/index/2022.json diff --git a/data/zh-TW/updates/index/2023.json b/data/zh-Hant/updates/index/2023.json similarity index 100% rename from data/zh-TW/updates/index/2023.json rename to data/zh-Hant/updates/index/2023.json diff --git a/data/zh-TW/updates/index/2024.json b/data/zh-Hant/updates/index/2024.json similarity index 100% rename from data/zh-TW/updates/index/2024.json rename to data/zh-Hant/updates/index/2024.json diff --git a/data/zh-TW/updates/index/2025.json b/data/zh-Hant/updates/index/2025.json similarity index 100% rename from data/zh-TW/updates/index/2025.json rename to data/zh-Hant/updates/index/2025.json diff --git a/docs/README.md b/docs/README.md index 5c0e54e..df9788c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,3 +1,3 @@ -- [简体中文](./zh-CN/) -- [繁體中文](./zh-TW/) -- [English](./en-US/) +- [简体中文](./zh-Hans/) +- [繁體中文](./zh-Hant/) +- [English](./en/) diff --git a/docs/en-US/CONTRIBUTING.md b/docs/en/CONTRIBUTING.md similarity index 100% rename from docs/en-US/CONTRIBUTING.md rename to docs/en/CONTRIBUTING.md diff --git a/docs/zh-CN/CONTRIBUTING.md b/docs/zh-Hans/CONTRIBUTING.md similarity index 100% rename from docs/zh-CN/CONTRIBUTING.md rename to docs/zh-Hans/CONTRIBUTING.md diff --git a/docs/zh-TW/CONTRIBUTING.md b/docs/zh-Hant/CONTRIBUTING.md similarity index 100% rename from docs/zh-TW/CONTRIBUTING.md rename to docs/zh-Hant/CONTRIBUTING.md diff --git a/scripts/generate-rss.ts b/scripts/generate-rss.ts index 4c56dbd..81d9a8d 100644 --- a/scripts/generate-rss.ts +++ b/scripts/generate-rss.ts @@ -14,22 +14,22 @@ interface LanguageConfig { const LANGUAGES: LanguageConfig[] = [ { - code: 'en-US', - dataDir: 'en-US', - title: 'STARSET Mirror Site Updates', - description: 'Latest updates from STARSET Mirror Site' + code: 'en', + dataDir: 'en', + title: 'Starset Mirror - Updates', + description: 'Latest updates from Starset Mirror' }, { - code: 'zh-CN', - dataDir: 'zh-CN', - title: 'STARSET Mirror 项目动态', - description: 'STARSET Mirror 最新动态' + code: 'zh-Hans', + dataDir: 'zh-Hans', + title: 'Starset Mirror - 更新', + description: 'Starset Mirror 的最新更新' }, { code: 'zh-Hant', - dataDir: 'zh-TW', - title: 'STARSET Mirror 專案動态', - description: 'STARSET Mirror 最新動態' + dataDir: 'zh-Hant', + title: 'Starset Mirror - 更新', + description: 'Starset Mirror 的最新更新' } ]; diff --git a/scripts/generate-sitemap.ts b/scripts/generate-sitemap.ts index 0c1ce36..db8492e 100644 --- a/scripts/generate-sitemap.ts +++ b/scripts/generate-sitemap.ts @@ -6,7 +6,7 @@ import xml2js from 'xml2js'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); -const LANGUAGES = ['en-US', 'zh-CN', 'zh-TW']; +const LANGUAGES = ['en', 'zh-Hans', 'zh-Hant']; const BASE_URL = 'mirror.starset.fans'; interface Update { diff --git a/scripts/generate-update-sitemaps.js b/scripts/generate-update-sitemaps.js index bc4aeed..1126697 100644 --- a/scripts/generate-update-sitemaps.js +++ b/scripts/generate-update-sitemaps.js @@ -6,7 +6,7 @@ import xml2js from 'xml2js'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); -const LANGUAGES = ['en-US', 'zh-CN', 'zh-TW']; +const LANGUAGES = ['en', 'zh-Hans', 'zh-Hant']; const BASE_URL = 'starset.wiki'; // Replace with your actual domain async function getYearlyIndices(lang) { diff --git a/src/components/About.tsx b/src/components/About.tsx index ca5d26b..1472682 100644 --- a/src/components/About.tsx +++ b/src/components/About.tsx @@ -4,22 +4,24 @@ import iconMap from '../utils/iconMap'; const About = () => { const { t } = useTranslation(); - const aboutData = t('data.about', { returnObjects: true }); - const socialLinks = t('social.links', { returnObjects: true }); + const aboutData = t('data.about', { returnObjects: true }) || {}; + const socialLinks = t('social.links', { returnObjects: true }) || []; + + if (!aboutData) return null; return (
{paragraph}
))}{stat.label}
@@ -27,7 +29,7 @@ const About = () => { ))}- {aboutData.content.contact.description} + {aboutData.content?.contact?.description}