Initial import of weiyuan frontend
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
Copyright (C) 2025 QuantumNous
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
// 技能分类标签的展示名映射(技能超市 + 平台管理台共用)。
|
||||
//
|
||||
// 标签在数据层是版本 frontmatter 里的英文 slug(skill_versions.tags_json),
|
||||
// 是过滤与统计的稳定键,绝不能翻译后写回数据库——这里只做**展示层**映射:
|
||||
// 中文界面显示中文名,未收录的 slug(含本就是中文的标签)原样展示,
|
||||
// 过滤请求仍然携带原始 slug。
|
||||
//
|
||||
// 新导入技能包引入新 slug 时在此补充即可;漏补不会出错,只是该分类
|
||||
// 暂以英文 slug 展示。
|
||||
const SKILL_CATEGORY_ZH = {
|
||||
// ===== 来源/合集类 =====
|
||||
'awesome-skills': '社区精选',
|
||||
'super-code': '编码进阶',
|
||||
andruia: 'Andru.ia 系列',
|
||||
monopoly: 'Monopoly 系列',
|
||||
'workflow-bundle': '工作流套件',
|
||||
'granular-workflow-bundle': '工作流套件·细分',
|
||||
'agent-squad': '智能体编队',
|
||||
meta: '元技能',
|
||||
uncategorized: '未分类',
|
||||
general: '通用',
|
||||
|
||||
// ===== 办公与经营 =====
|
||||
office: '办公协同',
|
||||
business: '商业职能',
|
||||
'business-strategy': '商业战略',
|
||||
strategy: '战略规划',
|
||||
planning: '规划',
|
||||
reporting: '报告输出',
|
||||
documentation: '文档写作',
|
||||
collaboration: '协作',
|
||||
communication: '沟通表达',
|
||||
productivity: '效率提升',
|
||||
'project-management': '项目管理',
|
||||
operations: '运营',
|
||||
workflow: '工作流',
|
||||
automation: '自动化',
|
||||
|
||||
// ===== 市场与增长 =====
|
||||
marketing: '市场营销',
|
||||
copywriting: '文案创作',
|
||||
content: '内容创作',
|
||||
writing: '写作',
|
||||
growth: '增长',
|
||||
sales: '销售',
|
||||
pr: '公关传播',
|
||||
media: '媒体',
|
||||
ecommerce: '电商',
|
||||
trade: '外贸',
|
||||
'customer-service': '客户服务',
|
||||
|
||||
// ===== 行业 =====
|
||||
finance: '金融财务',
|
||||
legal: '法务',
|
||||
compliance: '合规',
|
||||
hr: '人力资源',
|
||||
recruiting: '招聘',
|
||||
healthcare: '医疗健康',
|
||||
health: '健康',
|
||||
education: '教育',
|
||||
training: '培训',
|
||||
government: '政务',
|
||||
manufacturing: '制造业',
|
||||
science: '科学研究',
|
||||
it: 'IT 支持',
|
||||
|
||||
// ===== 研发 =====
|
||||
development: '软件开发',
|
||||
'web-development': 'Web 开发',
|
||||
'game-development': '游戏开发',
|
||||
frontend: '前端',
|
||||
'front-end': '前端',
|
||||
backend: '后端',
|
||||
mobile: '移动端',
|
||||
code: '编码',
|
||||
'code-quality': '代码质量',
|
||||
engineering: '工程实践',
|
||||
architecture: '架构设计',
|
||||
framework: '框架',
|
||||
devops: 'DevOps',
|
||||
cloud: '云服务',
|
||||
testing: '测试',
|
||||
'test-automation': '自动化测试',
|
||||
quality: '质量保障',
|
||||
security: '安全',
|
||||
reliability: '可靠性',
|
||||
database: '数据库',
|
||||
'database-processing': '数据库处理',
|
||||
'app-builder': '应用搭建',
|
||||
'media-processing': '媒体处理',
|
||||
'graphics-processing': '图形处理',
|
||||
|
||||
// ===== 数据与 AI =====
|
||||
'ai-ml': 'AI 与机器学习',
|
||||
'ai-agents': 'AI 智能体',
|
||||
'agent-behavior': '智能体行为',
|
||||
'data-ai': '数据与 AI',
|
||||
data: '数据',
|
||||
'data-science': '数据科学',
|
||||
analytics: '数据分析',
|
||||
analysis: '分析研判',
|
||||
memory: '记忆管理',
|
||||
|
||||
// ===== 设计与产品 =====
|
||||
design: '设计',
|
||||
'design-it': '设计',
|
||||
product: '产品',
|
||||
'personal-development': '个人成长',
|
||||
};
|
||||
|
||||
// 返回标签在指定语言下的展示名。
|
||||
// language 取值 {zh, en}(与 NormalizeBrainLocale 同语义);en 界面直接
|
||||
// 展示原始 slug——slug 本身就是英文,强行再造一套英文标题反而增加维护面。
|
||||
export const skillTagLabel = (tag, language = 'zh') => {
|
||||
if (language !== 'zh') return tag;
|
||||
return SKILL_CATEGORY_ZH[tag] || tag;
|
||||
};
|
||||
|
||||
export default SKILL_CATEGORY_ZH;
|
||||
Reference in New Issue
Block a user