diff --git a/app/models/web_footer_company.rb b/app/models/web_footer_company.rb index 0743b6a9c..fa51a3a66 100644 --- a/app/models/web_footer_company.rb +++ b/app/models/web_footer_company.rb @@ -3,6 +3,6 @@ class WebFooterCompany < ActiveRecord::Base validates :name, presence: true, length: { maximum: 500 } validates :url, length: { maximum: 500 }, format: { with: /(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/, - message: l(:is_not_url_error) + message: :invalid } end diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 07541a3f3..3666d07bb 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -540,7 +540,7 @@ zh: label_url_prompt: 网址需以"http://"或"https://"开头,例:http://forge.trustie.net web_footer_company_create_fail: 合作单位创建失败 web_footer_company_update_fail: 合作单位更新失败 - is_not_url_error: 不是正确的url + is_not_url_error: 不是正确的网址 label_x_projects: zero: 无项目 one: 1 个项目 @@ -2192,4 +2192,4 @@ zh: label_anonymous: 匿名 label_submit_comments: 提交评论 field_evaluation_num: 匿评分配数量 - label_my_score: 我的评分 + label_my_score: 我的评分