From a438ab6f3ef72dd82585db7f7bb0d55ef47e5fd4 Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 6 Sep 2022 14:57:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=ADlocale=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/contents/create_form.rb | 2 +- config/locales/forms/create_file_form.zh-CN.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 config/locales/forms/create_file_form.zh-CN.yml diff --git a/app/forms/contents/create_form.rb b/app/forms/contents/create_form.rb index 73341661c..ec60697d6 100644 --- a/app/forms/contents/create_form.rb +++ b/app/forms/contents/create_form.rb @@ -3,7 +3,7 @@ class Contents::CreateForm < BaseForm validates :filepath, presence: true - validates :new_branch, length: { maximum: 50, too_long: "分支名称过长,仅支持%{count}的长度"} + validates :new_branch, length: { maximum: 100, too_long: "过长,仅支持%{count}的长度"} validate :check_branch diff --git a/config/locales/forms/create_file_form.zh-CN.yml b/config/locales/forms/create_file_form.zh-CN.yml new file mode 100644 index 000000000..0f9ea86a7 --- /dev/null +++ b/config/locales/forms/create_file_form.zh-CN.yml @@ -0,0 +1,5 @@ +'zh-CN': + activemodel: + attributes: + contents/create_form: + new_branch: 分支名称 \ No newline at end of file