##// END OF EJS Templates
Allow underscores in project identifiers (#1363)....
Jean-Philippe Lang -
r8588:9d372ce6f5b1
parent child
Show More
@@ -76,7 +76,7 class Project < ActiveRecord::Base
76 validates_length_of :homepage, :maximum => 255
76 validates_length_of :homepage, :maximum => 255
77 validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH
77 validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH
78 # donwcase letters, digits, dashes but not digits only
78 # donwcase letters, digits, dashes but not digits only
79 validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-]*$/, :if => Proc.new { |p| p.identifier_changed? }
79 validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-_]*$/, :if => Proc.new { |p| p.identifier_changed? }
80 # reserved words
80 # reserved words
81 validates_exclusion_of :identifier, :in => %w( new )
81 validates_exclusion_of :identifier, :in => %w( new )
82
82
@@ -879,7 +879,7 en-GB:
879 text_tip_issue_begin_day: task beginning this day
879 text_tip_issue_begin_day: task beginning this day
880 text_tip_issue_end_day: task ending this day
880 text_tip_issue_end_day: task ending this day
881 text_tip_issue_begin_end_day: task beginning and ending this day
881 text_tip_issue_begin_end_day: task beginning and ending this day
882 text_project_identifier_info: 'Only lower case letters (a-z), numbers and dashes are allowed.<br />Once saved, the identifier cannot be changed.'
882 text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
883 text_caracters_maximum: "%{count} characters maximum."
883 text_caracters_maximum: "%{count} characters maximum."
884 text_caracters_minimum: "Must be at least %{count} characters long."
884 text_caracters_minimum: "Must be at least %{count} characters long."
885 text_length_between: "Length between %{min} and %{max} characters."
885 text_length_between: "Length between %{min} and %{max} characters."
@@ -915,7 +915,7 en:
915 text_tip_issue_begin_day: issue beginning this day
915 text_tip_issue_begin_day: issue beginning this day
916 text_tip_issue_end_day: issue ending this day
916 text_tip_issue_end_day: issue ending this day
917 text_tip_issue_begin_end_day: issue beginning and ending this day
917 text_tip_issue_begin_end_day: issue beginning and ending this day
918 text_project_identifier_info: 'Only lower case letters (a-z), numbers and dashes are allowed.<br />Once saved, the identifier cannot be changed.'
918 text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
919 text_caracters_maximum: "%{count} characters maximum."
919 text_caracters_maximum: "%{count} characters maximum."
920 text_caracters_minimum: "Must be at least %{count} characters long."
920 text_caracters_minimum: "Must be at least %{count} characters long."
921 text_length_between: "Length between %{min} and %{max} characters."
921 text_length_between: "Length between %{min} and %{max} characters."
@@ -882,7 +882,7 fr:
882 text_tip_issue_begin_day: tâche commençant ce jour
882 text_tip_issue_begin_day: tâche commençant ce jour
883 text_tip_issue_end_day: tâche finissant ce jour
883 text_tip_issue_end_day: tâche finissant ce jour
884 text_tip_issue_begin_end_day: tâche commençant et finissant ce jour
884 text_tip_issue_begin_end_day: tâche commençant et finissant ce jour
885 text_project_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres et tirets sont autorisés.<br />Un fois sauvegardé, l''identifiant ne pourra plus être modifié.'
885 text_project_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et underscore sont autorisés.<br />Un fois sauvegardé, l''identifiant ne pourra plus être modifié.'
886 text_caracters_maximum: "%{count} caractères maximum."
886 text_caracters_maximum: "%{count} caractères maximum."
887 text_caracters_minimum: "%{count} caractères minimum."
887 text_caracters_minimum: "%{count} caractères minimum."
888 text_length_between: "Longueur comprise entre %{min} et %{max} caractères."
888 text_length_between: "Longueur comprise entre %{min} et %{max} caractères."
@@ -119,6 +119,7 class ProjectTest < ActiveSupport::TestCase
119 to_test = {"abc" => true,
119 to_test = {"abc" => true,
120 "ab12" => true,
120 "ab12" => true,
121 "ab-12" => true,
121 "ab-12" => true,
122 "ab_12" => true,
122 "12" => false,
123 "12" => false,
123 "new" => false}
124 "new" => false}
124
125
General Comments 0
You need to be logged in to leave comments. Login now