From 52081d4230272cdc64823c1791702864395da097 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Fri, 5 Jul 2024 23:56:55 +0530 Subject: [PATCH] Remove unneeded locales --- src/config.ts | 46 ++++++++++++++++++------------------- src/i18n/languages/en.ts | 2 +- src/i18n/languages/ja.ts | 38 ------------------------------ src/i18n/languages/zh_CN.ts | 38 ------------------------------ src/i18n/languages/zh_TW.ts | 38 ------------------------------ src/i18n/translation.ts | 7 ------ 6 files changed, 24 insertions(+), 145 deletions(-) delete mode 100644 src/i18n/languages/ja.ts delete mode 100644 src/i18n/languages/zh_CN.ts delete mode 100644 src/i18n/languages/zh_TW.ts diff --git a/src/config.ts b/src/config.ts index 91590c5..0d7853c 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,33 +3,33 @@ import type { NavBarConfig, ProfileConfig, SiteConfig, -} from './types/config'; -import { LinkPreset } from './types/config'; +} from "./types/config"; +import { LinkPreset } from "./types/config"; export const siteConfig: SiteConfig = { title: "compey's blog", subtitle: - 'A blog where I occassionally post about my development experiences :^)', - lang: 'en', + "A blog where I occassionally post about my development experiences :^)", + lang: "en", themeColor: { hue: 295, fixed: true, }, banner: { enable: false, - src: 'assets/images/demo-banner.png', - position: 'center', + src: "assets/images/demo-banner.png", + position: "center", }, favicon: [ { - src: '/favicon-dark.png', - theme: 'dark', - sizes: '32x32', + src: "/favicon-dark.png", + theme: "dark", + sizes: "32x32", }, { - src: '/favicon-light.png', - theme: 'light', - sizes: '32x32', + src: "/favicon-light.png", + theme: "light", + sizes: "32x32", }, ], }; @@ -39,25 +39,25 @@ export const navBarConfig: NavBarConfig = { }; export const profileConfig: ProfileConfig = { - avatar: 'assets/images/CompeyDev.png', // Relative to the /src directory. Relative to the /public directory if it starts with '/' - name: 'compey', - bio: 'ur local developer | 8 bit enthusiast | rust <3', + avatar: "assets/images/CompeyDev.png", // Relative to the /src directory. Relative to the /public directory if it starts with '/' + name: "compey", + bio: "ur local developer | 8 bit enthusiast | rust <3", links: [ { - name: 'GitHub', - icon: 'fa6-brands:github', - url: 'https://github.com/CompeyDeve', + name: "GitHub", + icon: "fa6-brands:github", + url: "https://github.com/CompeyDeve", }, { - name: 'Twitter', - icon: 'fa6-brands:twitter', - url: 'https://twitter.com/DevComp_', + name: "Twitter", + icon: "fa6-brands:twitter", + url: "https://twitter.com/DevComp_", }, ], }; export const licenseConfig: LicenseConfig = { enable: true, - name: 'CC BY-NC-SA 4.0', - url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/', + name: "CC BY-NC-SA 4.0", + url: "https://creativecommons.org/licenses/by-nc-sa/4.0/", }; diff --git a/src/i18n/languages/en.ts b/src/i18n/languages/en.ts index 28bf1a0..fb55a0e 100644 --- a/src/i18n/languages/en.ts +++ b/src/i18n/languages/en.ts @@ -4,7 +4,7 @@ import type { Translation } from "../translation"; export const en: Translation = { [Key.home]: "Home", [Key.about]: "About", - [Key.archive]: "Archive", + [Key.archive]: "Timeline", [Key.search]: "Search", [Key.tags]: "Tags", diff --git a/src/i18n/languages/ja.ts b/src/i18n/languages/ja.ts deleted file mode 100644 index 48de3f5..0000000 --- a/src/i18n/languages/ja.ts +++ /dev/null @@ -1,38 +0,0 @@ -import Key from "../i18nKey"; -import type { Translation } from "../translation"; - -export const ja: Translation = { - [Key.home]: "Home", - [Key.about]: "About", - [Key.archive]: "Archive", - [Key.search]: "検索", - - [Key.tags]: "タグ", - [Key.categories]: "カテゴリ", - [Key.recentPosts]: "最近の投稿", - - [Key.comments]: "コメント", - - [Key.untitled]: "タイトルなし", - [Key.uncategorized]: "カテゴリなし", - [Key.noTags]: "タグなし", - - [Key.wordCount]: "文字", - [Key.wordsCount]: "文字", - [Key.minuteCount]: "分", - [Key.minutesCount]: "分", - [Key.postCount]: "件の投稿", - [Key.postsCount]: "件の投稿", - - [Key.themeColor]: "テーマカラー", - - [Key.lightMode]: "ライト", - [Key.darkMode]: "ダーク", - [Key.systemMode]: "システム", - - [Key.more]: "もっと", - - [Key.author]: "作者", - [Key.publishedAt]: "公開日", - [Key.license]: "ライセンス", -}; diff --git a/src/i18n/languages/zh_CN.ts b/src/i18n/languages/zh_CN.ts deleted file mode 100644 index f95fd3c..0000000 --- a/src/i18n/languages/zh_CN.ts +++ /dev/null @@ -1,38 +0,0 @@ -import Key from "../i18nKey"; -import type { Translation } from "../translation"; - -export const zh_CN: Translation = { - [Key.home]: "主页", - [Key.about]: "关于", - [Key.archive]: "归档", - [Key.search]: "搜索", - - [Key.tags]: "标签", - [Key.categories]: "分类", - [Key.recentPosts]: "最新文章", - - [Key.comments]: "评论", - - [Key.untitled]: "无标题", - [Key.uncategorized]: "未分类", - [Key.noTags]: "无标签", - - [Key.wordCount]: "字", - [Key.wordsCount]: "字", - [Key.minuteCount]: "分钟", - [Key.minutesCount]: "分钟", - [Key.postCount]: "篇文章", - [Key.postsCount]: "篇文章", - - [Key.themeColor]: "主题色", - - [Key.lightMode]: "亮色", - [Key.darkMode]: "暗色", - [Key.systemMode]: "跟随系统", - - [Key.more]: "更多", - - [Key.author]: "作者", - [Key.publishedAt]: "发布于", - [Key.license]: "许可协议", -}; diff --git a/src/i18n/languages/zh_TW.ts b/src/i18n/languages/zh_TW.ts deleted file mode 100644 index 0c8a2e5..0000000 --- a/src/i18n/languages/zh_TW.ts +++ /dev/null @@ -1,38 +0,0 @@ -import Key from "../i18nKey"; -import type { Translation } from "../translation"; - -export const zh_TW: Translation = { - [Key.home]: "首頁", - [Key.about]: "關於", - [Key.archive]: "彙整", - [Key.search]: "搜尋", - - [Key.tags]: "標籤", - [Key.categories]: "分類", - [Key.recentPosts]: "最新文章", - - [Key.comments]: "評論", - - [Key.untitled]: "無標題", - [Key.uncategorized]: "未分類", - [Key.noTags]: "無標籤", - - [Key.wordCount]: "字", - [Key.wordsCount]: "字", - [Key.minuteCount]: "分鐘", - [Key.minutesCount]: "分鐘", - [Key.postCount]: "篇文章", - [Key.postsCount]: "篇文章", - - [Key.themeColor]: "主題色", - - [Key.lightMode]: "亮色", - [Key.darkMode]: "暗色", - [Key.systemMode]: "跟隨系統", - - [Key.more]: "更多", - - [Key.author]: "作者", - [Key.publishedAt]: "發佈於", - [Key.license]: "許可協議", -}; diff --git a/src/i18n/translation.ts b/src/i18n/translation.ts index 7f28340..9896252 100644 --- a/src/i18n/translation.ts +++ b/src/i18n/translation.ts @@ -1,9 +1,6 @@ import { siteConfig } from "../config"; import type I18nKey from "./i18nKey"; import { en } from "./languages/en"; -import { ja } from "./languages/ja"; -import { zh_CN } from "./languages/zh_CN"; -import { zh_TW } from "./languages/zh_TW"; export type Translation = { [K in I18nKey]: string; @@ -16,10 +13,6 @@ const map: { [key: string]: Translation } = { en_us: en, en_gb: en, en_au: en, - zh_cn: zh_CN, - zh_tw: zh_TW, - ja: ja, - ja_jp: ja, }; export function getTranslation(lang: string): Translation {