diff --git a/assets/block.js b/assets/block.js index b1ec3ce..7aa720d 100644 --- a/assets/block.js +++ b/assets/block.js @@ -21,7 +21,7 @@ registerBlockType('git-embed-feicode/repository', { title: __('Git Repository', 'git-embed-feicode'), description: __('Embed a Git repository with information and stats', 'git-embed-feicode'), - icon: 'admin-links', + icon: 'embed-generic', category: 'embed', supports: { align: ['left', 'center', 'right', 'wide', 'full'] @@ -212,7 +212,7 @@ if (!repoData) { return el('div', { className: 'git-embed-placeholder' }, el('div', { className: 'git-embed-placeholder-content' }, - el('span', { className: 'dashicons dashicons-admin-links git-embed-placeholder-icon' }), + el('span', { className: 'dashicons dashicons-embed-generic git-embed-placeholder-icon' }), el('h3', null, __('Git Repository Embed', 'git-embed-feicode')), el('p', null, __('Configure your repository details in the sidebar', 'git-embed-feicode')) ) @@ -261,7 +261,7 @@ }), el('div', { className: 'git-embed-title-content' }, el('h3', { className: 'git-embed-title' }, - el('span', { className: 'dashicons dashicons-admin-links git-embed-repo-icon' }), + el('span', { className: 'dashicons dashicons-embed-generic git-embed-repo-icon' }), el('a', { href: repoData.html_url, target: '_blank', diff --git a/assets/style.css b/assets/style.css index b5b87fa..77adf7d 100644 --- a/assets/style.css +++ b/assets/style.css @@ -454,9 +454,8 @@ line-height: 1.25; .git-embed-placeholder-icon { font-size: 48px; - display: block; + display: contents; margin-bottom: 16px; - color: #0073aa; } .git-embed-placeholder h3 { diff --git a/git-embed-feicode.php b/git-embed-feicode.php index c768fff..f9c9b39 100644 --- a/git-embed-feicode.php +++ b/git-embed-feicode.php @@ -4,7 +4,7 @@ declare(strict_types=1); /** * Plugin Name: Git Embed for feiCode * Description: Embed Git repositories from GitHub/Gitlab/Gitea/Forgejo and Self-hosted Git service with beautiful cards - * Version: 1.0.2 + * Version: 1.1.0 * Author: feiCode * Author URI: https://feicode.com * Text Domain: git-embed-feicode @@ -22,7 +22,7 @@ if (!defined("ABSPATH")) { class GitEmbedFeiCode { - private const PLUGIN_VERSION = "1.0.2"; + private const PLUGIN_VERSION = "1.1.0"; private const BLOCK_NAME = "git-embed-feicode/repository"; private const TEXT_DOMAIN = "git-embed-feicode"; @@ -41,6 +41,7 @@ class GitEmbedFeiCode register_deactivation_hook(__FILE__, [$this, "clear_all_cache"]); add_action("plugins_loaded", [$this, "load_textdomain"]); + add_action("wp_enqueue_scripts", [$this, "dashicons_style_front_end"]); } public function init(): void @@ -57,6 +58,11 @@ class GitEmbedFeiCode ); } + public function dashicons_style_front_end(): void + { + wp_enqueue_style('dashicons'); + } + private function register_block(): void { register_block_type(self::BLOCK_NAME, [ @@ -521,7 +527,7 @@ class GitEmbedFeiCode "site_info" => [ "name" => "GitHub", "url" => "https://github.com", - "favicon" => "https://github.com/favicon.ico", + "favicon" => "https://cn.cravatar.com/favicon/api/index.php?url=github.com", "color" => "#24292f", ], ]; @@ -538,7 +544,7 @@ class GitEmbedFeiCode "site_info" => [ "name" => $site_name, "url" => "https://{$domain}", - "favicon" => "https://{$domain}/assets/img/favicon.png", + "favicon" => "https://cn.cravatar.com/favicon/api/index.php?url={$domain}", "color" => "#609926", ], ]; @@ -555,7 +561,7 @@ class GitEmbedFeiCode "site_info" => [ "name" => $site_name, "url" => "https://{$domain}", - "favicon" => "https://{$domain}/assets/img/favicon.png", + "favicon" => "https://cn.cravatar.com/favicon/api/index.php?url={$domain}", "color" => "#fb923c", ], ]; @@ -572,7 +578,7 @@ class GitEmbedFeiCode "site_info" => [ "name" => $site_name, "url" => "https://{$domain}", - "favicon" => "https://{$domain}/assets/favicon.ico", + "favicon" => "https://cn.cravatar.com/favicon/api/index.php?url={$domain}", "color" => "#fc6d26", ], ]; @@ -589,7 +595,7 @@ class GitEmbedFeiCode "site_info" => [ "name" => $site_name, "url" => "https://{$domain}", - "favicon" => "https://{$domain}/favicon.ico", + "favicon" => "https://cn.cravatar.com/favicon/api/index.php?url={$domain}", "color" => "#6366f1", ], ]; @@ -685,7 +691,7 @@ class GitEmbedFeiCode "login" => $data["owner"]["login"], "avatar_url" => $data["owner"]["avatar_url"], "html_url" => $data["owner"]["html_url"] ?? ($base_url . "/" . $data["owner"]["login"]), - "type" => $this->normalize_owner_type($data["owner"]["type"] ?? "user"), + "type" => $this->normalize_owner_type($this->detect_owner_type($data["owner"], $platform)), ], "site_info" => $api_config["site_info"], "platform" => $platform, @@ -699,14 +705,32 @@ class GitEmbedFeiCode case "organization": case "org": case "group": + case "team": return __("Organization", self::TEXT_DOMAIN); case "user": case "individual": + case "person": default: return __("User", self::TEXT_DOMAIN); } } + private function detect_owner_type(array $owner_data, string $platform = ""): string + { + // 如果有明确的 type 字段,直接使用 + if (isset($owner_data["type"]) && !empty($owner_data["type"])) { + return $owner_data["type"]; + } + + // 对于 Gitea/Forgejo 等平台,默认显示为组织 + if (in_array($platform, ["gitea", "forgejo", "custom"])) { + return "organization"; + } + + // 默认为用户 + return "user"; + } + private function cache_avatar(string $avatar_url): void { if (empty($avatar_url)) { diff --git a/languages/git-embed-feicode-zh_CN-2ae0e65a8f4b45bd3ce393d95bb4c31f.json b/languages/git-embed-feicode-zh_CN-2ae0e65a8f4b45bd3ce393d95bb4c31f.json index d5f2a05..f270c3c 100644 --- a/languages/git-embed-feicode-zh_CN-2ae0e65a8f4b45bd3ce393d95bb4c31f.json +++ b/languages/git-embed-feicode-zh_CN-2ae0e65a8f4b45bd3ce393d95bb4c31f.json @@ -1 +1 @@ -{"translation-revision-date": "2025-08-14 09:46+0800", "generator": "Poedit 3.6", "source": "assets/block.js", "domain": "messages", "locale_data": {"messages": {"": {"domain": "messages", "lang": "zh_CN", "plural-forms": "nplurals=2; plural=(n != 1);"}, "Git Repository": ["Git \u4ed3\u5e93"], "Embed a Git repository with information and stats": ["\u5d4c\u5165\u5305\u542b\u4fe1\u606f\u548c\u7edf\u8ba1\u6570\u636e\u7684 Git \u4ed3\u5e93"], "Please enter repository owner and name": ["\u8bf7\u8f93\u5165\u4ed3\u5e93\u6240\u6709\u8005\u548c\u540d\u79f0"], "Please enter custom domain for": ["\u8bf7\u8f93\u5165\u81ea\u5b9a\u4e49\u57df\u540d"], "Failed to fetch repository": ["\u83b7\u53d6\u4ed3\u5e93\u5931\u8d25"], "Network error occurred": ["\u7f51\u7edc\u9519\u8bef"], "Fetching repository data...": ["\u6b63\u5728\u83b7\u53d6\u4ed3\u5e93\u6570\u636e..."], "Git Repository Embed": ["Git \u4ed3\u5e93\u5d4c\u5165"], "Configure your repository details in the sidebar": ["\u5728\u4fa7\u8fb9\u680f\u914d\u7f6e\u60a8\u7684\u4ed3\u5e93\u8be6\u60c5"], "Download": ["\u4e0b\u8f7d"], "Download ZIP": ["\u4e0b\u8f7d ZIP"], "Repository Avatar": ["\u4ed3\u5e93\u5934\u50cf"], "Owner Avatar": ["\u6240\u6709\u8005\u5934\u50cf"], "Repository has custom avatar": ["\u4ed3\u5e93\u6709\u81ea\u5b9a\u4e49\u5934\u50cf"], "Stars:": ["\u661f\u6807\uff1a"], "Forks:": ["\u5206\u53c9\uff1a"], "Issues:": ["\u8bae\u9898\uff1a"], "View Repository": ["\u67e5\u770b\u4ed3\u5e93"], "Clone URL:": ["\u514b\u9686\u7f51\u5740\uff1a"], "Clone": ["\u514b\u9686"], "Issues": ["\u8bae\u9898"], "Forks": ["\u5206\u53c9"], "Repository Settings": ["\u4ed3\u5e93\u8bbe\u7f6e"], "Platform": ["\u5e73\u53f0"], "GitHub": ["GitHub"], "Gitea": ["Gitea"], "Forgejo": ["Forgejo"], "GitLab (Self-hosted)": ["GitLab\uff08\u81ea\u6258\u7ba1\uff09"], "Custom Git Service": ["\u81ea\u5b9a\u4e49 Git \u670d\u52a1"], "Self-hosted Git service requires custom domain": ["\u81ea\u6258\u7ba1 Git \u670d\u52a1\u9700\u8981\u81ea\u5b9a\u4e49\u57df\u540d"], "Custom Domain": ["\u81ea\u5b9a\u4e49\u57df\u540d"], "e.g. git.example.com": ["\u793a\u4f8b\uff1agit.example.com"], "Enter the domain of your": ["\u8f93\u5165\u60a8\u7684\u5b9e\u4f8b\u57df\u540d"], "instance": ["\u5b9e\u4f8b"], "Custom Site Name (Optional)": ["\u81ea\u5b9a\u4e49\u7ad9\u70b9\u540d\u79f0\uff08\u53ef\u9009\uff09"], "e.g. Company Git": ["\u793a\u4f8b\uff1aCompany Git"], "Override the automatically detected site name": ["\u8986\u76d6\u81ea\u52a8\u68c0\u6d4b\u7684\u7ad9\u70b9\u540d\u79f0"], "Repository Owner": ["\u4ed3\u5e93\u6240\u6709\u8005"], "e.g. facebook": ["\u793a\u4f8b\uff1afacebook"], "Repository Name": ["\u4ed3\u5e93\u540d\u79f0"], "e.g. react": ["e.g. react"], "Fetching...": ["\u6b63\u5728\u83b7\u53d6..."], "Fetch Repository": ["\u83b7\u53d6\u4ed3\u5e93"], "Display Options": ["\u663e\u793a\u9009\u9879"], "Show Site Information": ["\u663e\u793a\u7ad9\u70b9\u4fe1\u606f"], "Show Avatar": ["\u663e\u793a\u5934\u50cf"], "Shows repository avatar if available, otherwise owner avatar": ["\u5982\u679c\u53ef\u7528\uff0c\u663e\u793a\u4ed3\u5e93\u5934\u50cf\uff0c\u5426\u5219\u663e\u793a\u6240\u6709\u8005\u5934\u50cf"], "Avatar Size": ["\u5934\u50cf\u5927\u5c0f"], "Small": ["\u5c0f"], "Medium": ["\u4e2d"], "Large": ["\u5927"], "Show Description": ["\u663e\u793a\u63cf\u8ff0"], "Show Programming Language": ["\u663e\u793a\u7f16\u7a0b\u8bed\u8a00"], "Show Statistics": ["\u663e\u793a\u7edf\u8ba1\u6570\u636e"], "Show Action Buttons": ["\u663e\u793a\u64cd\u4f5c\u6309\u94ae"], "Button Options": ["\u6309\u94ae\u9009\u9879"], "Show View Repository Button": ["\u663e\u793a\u67e5\u770b\u4ed3\u5e93\u6309\u94ae"], "Show Clone Button": ["\u663e\u793a\u514b\u9686\u6309\u94ae"], "Show Download ZIP Button": ["\u663e\u793a\u4e0b\u8f7d ZIP \u6309\u94ae"], "Show Issues Button": ["\u663e\u793a\u8bae\u9898\u6309\u94ae"], "Show Forks Button": ["\u663e\u793a\u5206\u53c9\u6309\u94ae"], "Button Style": ["\u6309\u94ae\u6837\u5f0f"], "Default": ["\u9ed8\u8ba4"], "Primary (Green)": ["\u4e3b\u8981\uff08\u7eff\u8272\uff09"], "Secondary (Gray)": ["\u6b21\u8981\uff08\u7070\u8272\uff09"], "Outline": ["\u8f6e\u5ed3"], "Ghost": ["\u900f\u660e"], "Button Size": ["\u6309\u94ae\u5927\u5c0f"], "Style Options": ["\u6837\u5f0f\u9009\u9879"], "Card Style": ["\u5361\u7247\u6837\u5f0f"], "Minimal": ["\u7b80\u7ea6"], "Bordered": ["\u8fb9\u6846"], "Shadow": ["\u9634\u5f71"], "Gradient": ["\u6e10\u53d8"], "Glassmorphism": ["\u73bb\u7483\u6001"]}}} \ No newline at end of file +{"translation-revision-date": "2025-08-14 10:38+0800", "generator": "Poedit 3.6", "source": "assets/block.js", "domain": "messages", "locale_data": {"messages": {"": {"domain": "messages", "lang": "zh_CN", "plural-forms": "nplurals=2; plural=(n != 1);"}, "Git Repository": ["Git \u4ed3\u5e93"], "Embed a Git repository with information and stats": ["\u5d4c\u5165\u5305\u542b\u4fe1\u606f\u548c\u7edf\u8ba1\u6570\u636e\u7684 Git \u4ed3\u5e93"], "Please enter repository owner and name": ["\u8bf7\u8f93\u5165\u4ed3\u5e93\u6240\u6709\u8005\u548c\u540d\u79f0"], "Please enter custom domain for": ["\u8bf7\u8f93\u5165\u81ea\u5b9a\u4e49\u57df\u540d"], "Failed to fetch repository": ["\u83b7\u53d6\u4ed3\u5e93\u5931\u8d25"], "Network error occurred": ["\u7f51\u7edc\u9519\u8bef"], "Fetching repository data...": ["\u6b63\u5728\u83b7\u53d6\u4ed3\u5e93\u6570\u636e..."], "Git Repository Embed": ["Git \u4ed3\u5e93\u5d4c\u5165"], "Configure your repository details in the sidebar": ["\u5728\u4fa7\u8fb9\u680f\u914d\u7f6e\u60a8\u7684\u4ed3\u5e93\u8be6\u60c5"], "Download": ["\u4e0b\u8f7d"], "Download ZIP": ["\u4e0b\u8f7d ZIP"], "Repository Avatar": ["\u4ed3\u5e93\u5934\u50cf"], "Owner Avatar": ["\u6240\u6709\u8005\u5934\u50cf"], "Repository has custom avatar": ["\u4ed3\u5e93\u6709\u81ea\u5b9a\u4e49\u5934\u50cf"], "Stars:": ["\u661f\u6807\uff1a"], "Forks:": ["\u5206\u53c9\uff1a"], "Issues:": ["\u8bae\u9898\uff1a"], "View Repository": ["\u67e5\u770b\u4ed3\u5e93"], "Clone URL:": ["\u514b\u9686\u7f51\u5740\uff1a"], "Clone": ["\u514b\u9686"], "Issues": ["\u8bae\u9898"], "Forks": ["\u5206\u53c9"], "Repository Settings": ["\u4ed3\u5e93\u8bbe\u7f6e"], "Platform": ["\u5e73\u53f0"], "GitHub": ["GitHub"], "Gitea": ["Gitea"], "Forgejo": ["Forgejo"], "GitLab (Self-hosted)": ["GitLab\uff08\u81ea\u6258\u7ba1\uff09"], "Custom Git Service": ["\u81ea\u5b9a\u4e49 Git \u670d\u52a1"], "Self-hosted Git service requires custom domain": ["\u81ea\u6258\u7ba1 Git \u670d\u52a1\u9700\u8981\u81ea\u5b9a\u4e49\u57df\u540d"], "Custom Domain": ["\u81ea\u5b9a\u4e49\u57df\u540d"], "e.g. git.example.com": ["\u793a\u4f8b\uff1agit.example.com"], "Enter the domain of your": ["\u8f93\u5165\u60a8\u7684\u5b9e\u4f8b\u57df\u540d"], "instance": ["\u5b9e\u4f8b"], "Custom Site Name (Optional)": ["\u81ea\u5b9a\u4e49\u7ad9\u70b9\u540d\u79f0\uff08\u53ef\u9009\uff09"], "e.g. Company Git": ["\u793a\u4f8b\uff1aCompany Git"], "Override the automatically detected site name": ["\u8986\u76d6\u81ea\u52a8\u68c0\u6d4b\u7684\u7ad9\u70b9\u540d\u79f0"], "Repository Owner": ["\u4ed3\u5e93\u6240\u6709\u8005"], "e.g. facebook": ["\u793a\u4f8b\uff1afacebook"], "Repository Name": ["\u4ed3\u5e93\u540d\u79f0"], "e.g. react": ["e.g. react"], "Fetching...": ["\u6b63\u5728\u83b7\u53d6..."], "Fetch Repository": ["\u83b7\u53d6\u4ed3\u5e93"], "Display Options": ["\u663e\u793a\u9009\u9879"], "Show Site Information": ["\u663e\u793a\u7ad9\u70b9\u4fe1\u606f"], "Show Avatar": ["\u663e\u793a\u5934\u50cf"], "Shows repository avatar if available, otherwise owner avatar": ["\u5982\u679c\u53ef\u7528\uff0c\u663e\u793a\u4ed3\u5e93\u5934\u50cf\uff0c\u5426\u5219\u663e\u793a\u6240\u6709\u8005\u5934\u50cf"], "Avatar Size": ["\u5934\u50cf\u5927\u5c0f"], "Small": ["\u5c0f"], "Medium": ["\u4e2d"], "Large": ["\u5927"], "Show Description": ["\u663e\u793a\u63cf\u8ff0"], "Show Programming Language": ["\u663e\u793a\u7f16\u7a0b\u8bed\u8a00"], "Show Statistics": ["\u663e\u793a\u7edf\u8ba1\u6570\u636e"], "Show Action Buttons": ["\u663e\u793a\u64cd\u4f5c\u6309\u94ae"], "Button Options": ["\u6309\u94ae\u9009\u9879"], "Show View Repository Button": ["\u663e\u793a\u67e5\u770b\u4ed3\u5e93\u6309\u94ae"], "Show Clone Button": ["\u663e\u793a\u514b\u9686\u6309\u94ae"], "Show Download ZIP Button": ["\u663e\u793a\u4e0b\u8f7d ZIP \u6309\u94ae"], "Show Issues Button": ["\u663e\u793a\u8bae\u9898\u6309\u94ae"], "Show Forks Button": ["\u663e\u793a\u5206\u53c9\u6309\u94ae"], "Button Style": ["\u6309\u94ae\u6837\u5f0f"], "Default": ["\u9ed8\u8ba4"], "Primary (Green)": ["\u4e3b\u8981\uff08\u7eff\u8272\uff09"], "Secondary (Gray)": ["\u6b21\u8981\uff08\u7070\u8272\uff09"], "Outline": ["\u8f6e\u5ed3"], "Ghost": ["\u900f\u660e"], "Button Size": ["\u6309\u94ae\u5927\u5c0f"], "Style Options": ["\u6837\u5f0f\u9009\u9879"], "Card Style": ["\u5361\u7247\u6837\u5f0f"], "Minimal": ["\u7b80\u7ea6"], "Bordered": ["\u8fb9\u6846"], "Shadow": ["\u9634\u5f71"], "Gradient": ["\u6e10\u53d8"], "Glassmorphism": ["\u73bb\u7483\u6001"]}}} \ No newline at end of file diff --git a/languages/git-embed-feicode-zh_CN.json b/languages/git-embed-feicode-zh_CN.json index 76f2826..37780fc 100644 --- a/languages/git-embed-feicode-zh_CN.json +++ b/languages/git-embed-feicode-zh_CN.json @@ -92,7 +92,7 @@ "分叉:" ], "Ghost": [ - "幽灵" + "透明" ], "Git Repository": [ "Git 仓库" diff --git a/languages/git-embed-feicode-zh_CN.l10n.php b/languages/git-embed-feicode-zh_CN.l10n.php index 52e104f..e4abc8e 100644 --- a/languages/git-embed-feicode-zh_CN.l10n.php +++ b/languages/git-embed-feicode-zh_CN.l10n.php @@ -1,3 +1,3 @@ NULL,'plural-forms'=>'nplurals=2; plural=(n != 1);','language'=>'zh_CN','pot-creation-date'=>'2025-08-14 09:37+0800','po-revision-date'=>'2025-08-14 09:46+0800','translation-revision-date'=>'2025-08-14 09:46+0800','project-id-version'=>'Git Embed for feiCode','x-generator'=>'Poedit 3.6','messages'=>['Git Repository'=>'Git 仓库','Embed a Git repository with information and stats'=>'嵌入包含信息和统计数据的 Git 仓库','Please enter repository owner and name'=>'请输入仓库所有者和名称','Please enter custom domain for'=>'请输入自定义域名','Failed to fetch repository'=>'获取仓库失败','Network error occurred'=>'网络错误','Fetching repository data...'=>'正在获取仓库数据...','Git Repository Embed'=>'Git 仓库嵌入','Configure your repository details in the sidebar'=>'在侧边栏配置您的仓库详情','Download'=>'下载','Download ZIP'=>'下载 ZIP','Repository Avatar'=>'仓库头像','Owner Avatar'=>'所有者头像','Repository has custom avatar'=>'仓库有自定义头像','Stars:'=>'星标:','Forks:'=>'分叉:','Issues:'=>'议题:','View Repository'=>'查看仓库','Clone URL:'=>'克隆网址:','Clone'=>'克隆','Issues'=>'议题','Forks'=>'分叉','Repository Settings'=>'仓库设置','Platform'=>'平台','GitHub'=>'GitHub','Gitea'=>'Gitea','Forgejo'=>'Forgejo','GitLab (Self-hosted)'=>'GitLab(自托管)','Custom Git Service'=>'自定义 Git 服务','Self-hosted Git service requires custom domain'=>'自托管 Git 服务需要自定义域名','Custom Domain'=>'自定义域名','e.g. git.example.com'=>'示例:git.example.com','Enter the domain of your'=>'输入您的实例域名','instance'=>'实例','Custom Site Name (Optional)'=>'自定义站点名称(可选)','e.g. Company Git'=>'示例:Company Git','Override the automatically detected site name'=>'覆盖自动检测的站点名称','Repository Owner'=>'仓库所有者','e.g. facebook'=>'示例:facebook','Repository Name'=>'仓库名称','e.g. react'=>'e.g. react','Fetching...'=>'正在获取...','Fetch Repository'=>'获取仓库','Display Options'=>'显示选项','Show Site Information'=>'显示站点信息','Show Avatar'=>'显示头像','Shows repository avatar if available, otherwise owner avatar'=>'如果可用,显示仓库头像,否则显示所有者头像','Avatar Size'=>'头像大小','Small'=>'小','Medium'=>'中','Large'=>'大','Show Description'=>'显示描述','Show Programming Language'=>'显示编程语言','Show Statistics'=>'显示统计数据','Show Action Buttons'=>'显示操作按钮','Button Options'=>'按钮选项','Show View Repository Button'=>'显示查看仓库按钮','Show Clone Button'=>'显示克隆按钮','Show Download ZIP Button'=>'显示下载 ZIP 按钮','Show Issues Button'=>'显示议题按钮','Show Forks Button'=>'显示分叉按钮','Button Style'=>'按钮样式','Default'=>'默认','Primary (Green)'=>'主要(绿色)','Secondary (Gray)'=>'次要(灰色)','Outline'=>'轮廓','Ghost'=>'透明','Button Size'=>'按钮大小','Style Options'=>'样式选项','Card Style'=>'卡片样式','Minimal'=>'简约','Bordered'=>'边框','Shadow'=>'阴影','Gradient'=>'渐变','Glassmorphism'=>'玻璃态','Repository information required'=>'需要仓库信息','Custom domain required for %s'=>'%s需要自定义域名','Failed to fetch repository data'=>'获取仓库失败','Latest Code'=>'最新代码','Git Service'=>'Git 服务','Organization'=>'组织','User'=>'用户','Download %s (%s)'=>'下载 %s (%s)','Click to copy clone URL'=>'点击复制克隆URL','Download %s'=>'下载 %s','Issues (%s)'=>'议题(%s)','Forks (%s)'=>'分叉 (%s)','Copied!'=>'已复制!','Please enter custom domain for %s'=>'请输入自定义域名%s','Insufficient permissions'=>'权限不足','Cache cleared successfully'=>'缓存清除成功','Git Embed for feiCode'=>'Git 仓库嵌入','Embed Git repositories from GitHub/Gitlab/Gitea/Forgejo and Self-hosted Git service with beautiful cards'=>'使用精美卡片嵌入 Git 仓库','feiCode'=>'菲码源库','https://feicode.com'=>'https://feicode.com']]; +return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=(n != 1);','language'=>'zh_CN','pot-creation-date'=>'2025-08-14 10:36+0800','po-revision-date'=>'2025-08-14 10:38+0800','translation-revision-date'=>'2025-08-14 10:38+0800','project-id-version'=>'Git Embed for feiCode','x-generator'=>'Poedit 3.6','messages'=>['Git Repository'=>'Git 仓库','Embed a Git repository with information and stats'=>'嵌入包含信息和统计数据的 Git 仓库','Please enter repository owner and name'=>'请输入仓库所有者和名称','Please enter custom domain for'=>'请输入自定义域名','Failed to fetch repository'=>'获取仓库失败','Network error occurred'=>'网络错误','Fetching repository data...'=>'正在获取仓库数据...','Git Repository Embed'=>'Git 仓库嵌入','Configure your repository details in the sidebar'=>'在侧边栏配置您的仓库详情','Download'=>'下载','Download ZIP'=>'下载 ZIP','Repository Avatar'=>'仓库头像','Owner Avatar'=>'所有者头像','Repository has custom avatar'=>'仓库有自定义头像','Stars:'=>'星标:','Forks:'=>'分叉:','Issues:'=>'议题:','View Repository'=>'查看仓库','Clone URL:'=>'克隆网址:','Clone'=>'克隆','Issues'=>'议题','Forks'=>'分叉','Repository Settings'=>'仓库设置','Platform'=>'平台','GitHub'=>'GitHub','Gitea'=>'Gitea','Forgejo'=>'Forgejo','GitLab (Self-hosted)'=>'GitLab(自托管)','Custom Git Service'=>'自定义 Git 服务','Self-hosted Git service requires custom domain'=>'自托管 Git 服务需要自定义域名','Custom Domain'=>'自定义域名','e.g. git.example.com'=>'示例:git.example.com','Enter the domain of your'=>'输入您的实例域名','instance'=>'实例','Custom Site Name (Optional)'=>'自定义站点名称(可选)','e.g. Company Git'=>'示例:Company Git','Override the automatically detected site name'=>'覆盖自动检测的站点名称','Repository Owner'=>'仓库所有者','e.g. facebook'=>'示例:facebook','Repository Name'=>'仓库名称','e.g. react'=>'e.g. react','Fetching...'=>'正在获取...','Fetch Repository'=>'获取仓库','Display Options'=>'显示选项','Show Site Information'=>'显示站点信息','Show Avatar'=>'显示头像','Shows repository avatar if available, otherwise owner avatar'=>'如果可用,显示仓库头像,否则显示所有者头像','Avatar Size'=>'头像大小','Small'=>'小','Medium'=>'中','Large'=>'大','Show Description'=>'显示描述','Show Programming Language'=>'显示编程语言','Show Statistics'=>'显示统计数据','Show Action Buttons'=>'显示操作按钮','Button Options'=>'按钮选项','Show View Repository Button'=>'显示查看仓库按钮','Show Clone Button'=>'显示克隆按钮','Show Download ZIP Button'=>'显示下载 ZIP 按钮','Show Issues Button'=>'显示议题按钮','Show Forks Button'=>'显示分叉按钮','Button Style'=>'按钮样式','Default'=>'默认','Primary (Green)'=>'主要(绿色)','Secondary (Gray)'=>'次要(灰色)','Outline'=>'轮廓','Ghost'=>'透明','Button Size'=>'按钮大小','Style Options'=>'样式选项','Card Style'=>'卡片样式','Minimal'=>'简约','Bordered'=>'边框','Shadow'=>'阴影','Gradient'=>'渐变','Glassmorphism'=>'玻璃态','Repository information required'=>'需要仓库信息','Custom domain required for %s'=>'%s需要自定义域名','Failed to fetch repository data'=>'获取仓库失败','Latest Code'=>'最新代码','Git Service'=>'Git 服务','Organization'=>'组织','User'=>'个人','Download %s (%s)'=>'下载 %s (%s)','Click to copy clone URL'=>'点击复制克隆URL','Download %s'=>'下载 %s','Issues (%s)'=>'议题(%s)','Forks (%s)'=>'分叉 (%s)','Copied!'=>'已复制!','Please enter custom domain for %s'=>'请输入自定义域名%s','Insufficient permissions'=>'权限不足','Cache cleared successfully'=>'缓存清除成功','Git Embed for feiCode'=>'Git 仓库嵌入','Embed Git repositories from GitHub/Gitlab/Gitea/Forgejo and Self-hosted Git service with beautiful cards'=>'使用精美卡片嵌入 Git 仓库','feiCode'=>'菲码源库','https://feicode.com'=>'https://feicode.com']]; diff --git a/languages/git-embed-feicode-zh_CN.mo b/languages/git-embed-feicode-zh_CN.mo index c5763b9..6a699dd 100644 Binary files a/languages/git-embed-feicode-zh_CN.mo and b/languages/git-embed-feicode-zh_CN.mo differ diff --git a/languages/git-embed-feicode-zh_CN.po b/languages/git-embed-feicode-zh_CN.po index f521c22..ce8d177 100644 --- a/languages/git-embed-feicode-zh_CN.po +++ b/languages/git-embed-feicode-zh_CN.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Git Embed for feiCode\n" -"POT-Creation-Date: 2025-08-14 09:37+0800\n" -"PO-Revision-Date: 2025-08-14 09:46+0800\n" +"POT-Creation-Date: 2025-08-14 10:36+0800\n" +"PO-Revision-Date: 2025-08-14 10:38+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: zh_CN\n" @@ -347,7 +347,7 @@ msgstr "组织" #: git-embed-feicode.php:706 msgid "User" -msgstr "用户" +msgstr "个人" #: git-embed-feicode.php:785 #, php-format