From e140fb536c12f44cd9389e8e1040efe0bc996fc9 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 17 Apr 2023 18:38:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh-CN.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index d5c68d448..b9000c1ee 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -18,7 +18,7 @@ zh-CN: Issue: 疑修(Issue) PullRequest: 合并请求(PR) VersionRelease: 版本发布 - CommitLog: 代码(Commit) + CommitLog: 代码提交(Commit) create: 创建了 journal: 回复了 close: 关闭了 From f078c59cf4e2067695d9f609a30f752415c7f0c5 Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 18 Apr 2023 09:44:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E8=AE=B0=E5=B7=B2=E5=AD=98=E5=9C=A8validate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/issue_tag.rb | 2 ++ config/locales/zh-CN.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/models/issue_tag.rb b/app/models/issue_tag.rb index 0da4ca730..98e0f9072 100644 --- a/app/models/issue_tag.rb +++ b/app/models/issue_tag.rb @@ -28,6 +28,8 @@ class IssueTag < ApplicationRecord belongs_to :project, optional: true, counter_cache: true belongs_to :user, optional: true + validates :name, uniqueness: { message: "已存在" } + def self.init_data(project_id) data = [ ["缺陷", "表示存在意外问题或错误", "#d92d4c"], diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index e7c586417..b09b55f45 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -233,6 +233,8 @@ zh-CN: content: 'git忽略文件内容' feedback_message_history: title: '' + issue_tag: + name: '项目标记' close_pr: 合并请求 roles: Developer: 开发者