frozen_repository_identifiers.patch

Jan from Planio www.plan.io, 2012-06-21 19:15

Download (47.9 KB)

View differences:

app/models/repository.rb
20 20
class Repository < ActiveRecord::Base
21 21
  include Redmine::Ciphering
22 22
  include Redmine::SafeAttributes
23
  
24
  # Maximum length for repository identifiers
25
  IDENTIFIER_MAX_LENGTH = 255
23 26

  
24 27
  belongs_to :project
25 28
  has_many :changesets, :order => "#{Changeset.table_name}.committed_on DESC, #{Changeset.table_name}.id DESC"
......
34 37
  before_destroy :clear_changesets
35 38

  
36 39
  validates_length_of :password, :maximum => 255, :allow_nil => true
37
  validates_length_of :identifier, :maximum => 255, :allow_blank => true
40
  validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH, :allow_blank => true
38 41
  validates_presence_of :identifier, :unless => Proc.new { |r| r.is_default? || r.set_as_default? }
39 42
  validates_uniqueness_of :identifier, :scope => :project_id, :allow_blank => true
40 43
  validates_exclusion_of :identifier, :in => %w(show entry raw changes annotate diff show stats graph)
......
114 117
    end
115 118
  end
116 119

  
120
  def identifier=(identifier)
121
    super unless identifier_frozen?
122
  end
123

  
124
  def identifier_frozen?
125
    errors[:identifier].blank? && !(new_record? || identifier.blank?)
126
  end
127

  
117 128
  def identifier_param
118 129
    if is_default?
119 130
      nil
app/views/projects/_form.html.erb
11 11
<p><%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %></p>
12 12
<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen? %>
13 13
<% unless @project.identifier_frozen? %>
14
  <em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
14
  <em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_identifier_info).html_safe %></em>
15 15
<% end %></p>
16 16
<p><%= f.text_field :homepage, :size => 60 %></p>
17 17
<p><%= f.check_box :is_public %></p>
app/views/repositories/_form.html.erb
9 9
</p>
10 10

  
11 11
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></p>
12
<p><%= f.text_field :identifier %></p>
12
<p><%= f.text_field :identifier, :disabled => @repository.identifier_frozen?  %>
13
<% unless @repository.identifier_frozen? %>
14
  <em class="info"><%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_identifier_info).html_safe %></em>
15
<% end %></p>
13 16

  
14 17
<% button_disabled = true %>
15 18
<% if @repository %>
config/locales/ar.yml
1018 1018
  label_copy_attachments: Copy attachments
1019 1019
  label_item_position: "%{position}/%{count}"
1020 1020
  label_completed_versions: Completed versions
1021
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1021
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022 1022
  field_multiple: Multiple values
1023 1023
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1024 1024
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/bg.yml
932 932
  text_tip_issue_begin_day: задача, започваща този ден
933 933
  text_tip_issue_end_day: задача, завършваща този ден
934 934
  text_tip_issue_begin_end_day: задача, започваща и завършваща този ден
935
  text_project_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
935
  text_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
936 936
  text_caracters_maximum: "До %{count} символа."
937 937
  text_caracters_minimum: "Минимум %{count} символа."
938 938
  text_length_between: "От %{min} до %{max} символа."
config/locales/bs.yml
1032 1032
  label_copy_attachments: Copy attachments
1033 1033
  label_item_position: "%{position}/%{count}"
1034 1034
  label_completed_versions: Completed versions
1035
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1035
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1036 1036
  field_multiple: Multiple values
1037 1037
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1038 1038
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/ca.yml
1020 1020
  label_copy_attachments: Copy attachments
1021 1021
  label_item_position: "%{position}/%{count}"
1022 1022
  label_completed_versions: Completed versions
1023
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1023
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1024 1024
  field_multiple: Multiple values
1025 1025
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1026 1026
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/cs.yml
1021 1021
  label_copy_attachments: Copy attachments
1022 1022
  label_item_position: "%{position}/%{count}"
1023 1023
  label_completed_versions: Completed versions
1024
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1024
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1025 1025
  field_multiple: Multiple values
1026 1026
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1027 1027
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/da.yml
1035 1035
  label_copy_attachments: Copy attachments
1036 1036
  label_item_position: "%{position}/%{count}"
1037 1037
  label_completed_versions: Completed versions
1038
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1038
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1039 1039
  field_multiple: Multiple values
1040 1040
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1041 1041
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/de.yml
870 870
  text_tip_issue_begin_day: Aufgabe, die an diesem Tag beginnt
871 871
  text_tip_issue_end_day: Aufgabe, die an diesem Tag endet
872 872
  text_tip_issue_begin_end_day: Aufgabe, die an diesem Tag beginnt und endet
873
  text_project_identifier_info: 'Kleinbuchstaben (a-z), Ziffern, Binde- und Unterstriche erlaubt.<br />Einmal gespeichert, kann die Kennung nicht mehr geändert werden.'
873
  text_identifier_info: 'Kleinbuchstaben (a-z), Ziffern, Binde- und Unterstriche erlaubt.<br />Einmal gespeichert, kann die Kennung nicht mehr geändert werden.'
874 874
  text_caracters_maximum: "Max. %{count} Zeichen."
875 875
  text_caracters_minimum: "Muss mindestens %{count} Zeichen lang sein."
876 876
  text_length_between: "Länge zwischen %{min} und %{max} Zeichen."
config/locales/el.yml
1018 1018
  label_copy_attachments: Copy attachments
1019 1019
  label_item_position: "%{position}/%{count}"
1020 1020
  label_completed_versions: Completed versions
1021
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1021
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022 1022
  field_multiple: Multiple values
1023 1023
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1024 1024
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/en-GB.yml
882 882
  text_tip_issue_begin_day: task beginning this day
883 883
  text_tip_issue_end_day: task ending this day
884 884
  text_tip_issue_begin_end_day: task beginning and ending this day
885
  text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
885
  text_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
886 886
  text_caracters_maximum: "%{count} characters maximum."
887 887
  text_caracters_minimum: "Must be at least %{count} characters long."
888 888
  text_length_between: "Length between %{min} and %{max} characters."
config/locales/en.yml
931 931
  text_tip_issue_begin_day: issue beginning this day
932 932
  text_tip_issue_end_day: issue ending this day
933 933
  text_tip_issue_begin_end_day: issue beginning and ending this day
934
  text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
934
  text_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
935 935
  text_caracters_maximum: "%{count} characters maximum."
936 936
  text_caracters_minimum: "Must be at least %{count} characters long."
937 937
  text_length_between: "Length between %{min} and %{max} characters."
config/locales/es.yml
1055 1055
  label_copy_attachments: Copy attachments
1056 1056
  label_item_position: "%{position}/%{count}"
1057 1057
  label_completed_versions: Completed versions
1058
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1058
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1059 1059
  field_multiple: Multiple values
1060 1060
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1061 1061
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/et.yml
944 944
  text_tip_issue_begin_day: "teema avamise päev"
945 945
  text_tip_issue_end_day: "teema sulgemise päev"
946 946
  text_tip_issue_begin_end_day: "teema avati ja sulgeti samal päeval"
947
  text_project_identifier_info: "Lubatud on ainult väikesed tähed (a-z), numbrid ja kriipsud.<br />Peale salvestamist ei saa tunnust enam muuta."
947
  text_identifier_info: "Lubatud on ainult väikesed tähed (a-z), numbrid ja kriipsud.<br />Peale salvestamist ei saa tunnust enam muuta."
948 948
  text_caracters_maximum: "%{count} märki kõige rohkem."
949 949
  text_caracters_minimum: "Peab olema vähemalt %{count} märki pikk."
950 950
  text_length_between: "Pikkus %{min} kuni %{max} märki."
config/locales/eu.yml
1021 1021
  label_copy_attachments: Copy attachments
1022 1022
  label_item_position: "%{position}/%{count}"
1023 1023
  label_completed_versions: Completed versions
1024
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1024
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1025 1025
  field_multiple: Multiple values
1026 1026
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1027 1027
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/fa.yml
1020 1020
  label_copy_attachments: Copy attachments
1021 1021
  label_item_position: "%{position}/%{count}"
1022 1022
  label_completed_versions: Completed versions
1023
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1023
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1024 1024
  field_multiple: Multiple values
1025 1025
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1026 1026
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/fi.yml
1039 1039
  label_copy_attachments: Copy attachments
1040 1040
  label_item_position: "%{position}/%{count}"
1041 1041
  label_completed_versions: Completed versions
1042
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1042
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1043 1043
  field_multiple: Multiple values
1044 1044
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1045 1045
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/fr.yml
897 897
  text_tip_issue_begin_day: tâche commençant ce jour
898 898
  text_tip_issue_end_day: tâche finissant ce jour
899 899
  text_tip_issue_begin_end_day: tâche commençant et finissant ce jour
900
  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é.'
900
  text_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é.'
901 901
  text_caracters_maximum: "%{count} caractères maximum."
902 902
  text_caracters_minimum: "%{count} caractères minimum."
903 903
  text_length_between: "Longueur comprise entre %{min} et %{max} caractères."
config/locales/gl.yml
1029 1029
  label_copy_attachments: Copy attachments
1030 1030
  label_item_position: "%{position}/%{count}"
1031 1031
  label_completed_versions: Completed versions
1032
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1032
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1033 1033
  field_multiple: Multiple values
1034 1034
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1035 1035
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/he.yml
1023 1023
  label_copy_attachments: Copy attachments
1024 1024
  label_item_position: "%{position}/%{count}"
1025 1025
  label_completed_versions: Completed versions
1026
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1026
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1027 1027
  field_multiple: Multiple values
1028 1028
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1029 1029
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/hr.yml
1021 1021
  label_copy_attachments: Copy attachments
1022 1022
  label_item_position: "%{position}/%{count}"
1023 1023
  label_completed_versions: Completed versions
1024
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1024
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1025 1025
  field_multiple: Multiple values
1026 1026
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1027 1027
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/hu.yml
1037 1037
  label_copy_attachments: Copy attachments
1038 1038
  label_item_position: "%{position}/%{count}"
1039 1039
  label_completed_versions: Completed versions
1040
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1040
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1041 1041
  field_multiple: Multiple values
1042 1042
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1043 1043
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/id.yml
1024 1024
  label_copy_attachments: Copy attachments
1025 1025
  label_item_position: "%{position}/%{count}"
1026 1026
  label_completed_versions: Completed versions
1027
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1027
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1028 1028
  field_multiple: Multiple values
1029 1029
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1030 1030
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/it.yml
1019 1019
  label_copy_attachments: Copy attachments
1020 1020
  label_item_position: "%{position}/%{count}"
1021 1021
  label_completed_versions: Completed versions
1022
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1023 1023
  field_multiple: Multiple values
1024 1024
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1025 1025
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/ja.yml
1048 1048
  label_copy_attachments: 添付ファイルをコピー
1049 1049
  label_item_position: "%{position}/%{count}"
1050 1050
  label_completed_versions: 完了したバージョン
1051
  text_project_identifier_info: アルファベット小文字(a-z)・数字・ハイフン・アンダースコアが使えます。<br />識別子は後で変更することはできません。
1051
  text_identifier_info: アルファベット小文字(a-z)・数字・ハイフン・アンダースコアが使えます。<br />識別子は後で変更することはできません。
1052 1052
  field_multiple: 複数選択可
1053 1053
  setting_commit_cross_project_ref: 異なるプロジェクトのチケットの参照/修正を許可
1054 1054
  text_issue_conflict_resolution_add_notes: 自分の編集内容を破棄し注記のみ追加
config/locales/ko.yml
1068 1068
  label_copy_attachments: 첨부파일 복사
1069 1069
  label_item_position: "%{position}/%{count}"
1070 1070
  label_completed_versions: 완료 버전
1071
  text_project_identifier_info: "소문자(a-z),숫자,대쉬(-)와 밑줄(_)만 가능합니다.<br />식별자는 저장후에는 수정할 수 없습니다."
1071
  text_identifier_info: "소문자(a-z),숫자,대쉬(-)와 밑줄(_)만 가능합니다.<br />식별자는 저장후에는 수정할 수 없습니다."
1072 1072
  field_multiple: 복수선택가능
1073 1073
  setting_commit_cross_project_ref: 다른 프로젝트의 일감 참조 및 수정 허용
1074 1074
  text_issue_conflict_resolution_add_notes: 변경내용은 취소하고 덧글만 추가
config/locales/lt.yml
1078 1078
  label_copy_attachments: Copy attachments
1079 1079
  label_item_position: "%{position}/%{count}"
1080 1080
  label_completed_versions: Completed versions
1081
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1081
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1082 1082
  field_multiple: Multiple values
1083 1083
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1084 1084
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/lv.yml
1012 1012
  label_copy_attachments: Copy attachments
1013 1013
  label_item_position: "%{position}/%{count}"
1014 1014
  label_completed_versions: Completed versions
1015
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1015
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1016 1016
  field_multiple: Multiple values
1017 1017
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1018 1018
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/mk.yml
1018 1018
  label_copy_attachments: Copy attachments
1019 1019
  label_item_position: "%{position}/%{count}"
1020 1020
  label_completed_versions: Completed versions
1021
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1021
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022 1022
  field_multiple: Multiple values
1023 1023
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1024 1024
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/mn.yml
1018 1018
  label_copy_attachments: Copy attachments
1019 1019
  label_item_position: "%{position}/%{count}"
1020 1020
  label_completed_versions: Completed versions
1021
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1021
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022 1022
  field_multiple: Multiple values
1023 1023
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1024 1024
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/nl.yml
763 763
  text_no_configuration_data: "Rollen, trackers, issue statussen en workflows zijn nog niet geconfigureerd.\nHet is ten zeerste aangeraden om de standaard configuratie in te laden. U kunt deze aanpassen nadat deze is ingeladen."
764 764
  text_plugin_assets_writable: Plugin assets directory beschrijfbaar
765 765
  text_project_destroy_confirmation: Weet u zeker dat u dit project en alle gerelateerde gegevens wilt verwijderen?
766
  text_project_identifier_info: 'Alleen kleine letter (a-z), cijfers, streepjes en liggende streepjes zijn toegestaan.<br />Eenmaal opgeslagen kan de identifier niet worden gewijzigd.'
766
  text_identifier_info: 'Alleen kleine letter (a-z), cijfers, streepjes en liggende streepjes zijn toegestaan.<br />Eenmaal opgeslagen kan de identifier niet worden gewijzigd.'
767 767
  text_reassign_time_entries: 'Gerapporteerde uren opnieuw toewijzen:'
768 768
  text_regexp_info: bv. ^[A-Z0-9]+$
769 769
  text_repository_usernames_mapping: "Koppel de Redminegebruikers aan gebruikers in de repository log.\nGebruikers met dezelfde Redmine en repository gebruikersnaam of email worden automatisch gekoppeld."
config/locales/no.yml
1008 1008
  label_copy_attachments: Copy attachments
1009 1009
  label_item_position: "%{position}/%{count}"
1010 1010
  label_completed_versions: Completed versions
1011
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1011
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1012 1012
  field_multiple: Multiple values
1013 1013
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1014 1014
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/pl.yml
1035 1035
  label_copy_attachments: Copy attachments
1036 1036
  label_item_position: "%{position}/%{count}"
1037 1037
  label_completed_versions: Completed versions
1038
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1038
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1039 1039
  field_multiple: Multiple values
1040 1040
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1041 1041
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/pt-BR.yml
1040 1040
  label_copy_attachments: Copy attachments
1041 1041
  label_item_position: "%{position}/%{count}"
1042 1042
  label_completed_versions: Completed versions
1043
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1043
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1044 1044
  field_multiple: Multiple values
1045 1045
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1046 1046
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/pt.yml
1023 1023
  label_copy_attachments: Copy attachments
1024 1024
  label_item_position: "%{position}/%{count}"
1025 1025
  label_completed_versions: Completed versions
1026
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1026
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1027 1027
  field_multiple: Multiple values
1028 1028
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1029 1029
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/ro.yml
1015 1015
  label_copy_attachments: Copy attachments
1016 1016
  label_item_position: "%{position}/%{count}"
1017 1017
  label_completed_versions: Completed versions
1018
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1018
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1019 1019
  field_multiple: Multiple values
1020 1020
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1021 1021
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/ru.yml
1133 1133
  label_copy_attachments: Copy attachments
1134 1134
  label_item_position: "%{position}/%{count}"
1135 1135
  label_completed_versions: Completed versions
1136
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1136
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1137 1137
  field_multiple: Multiple values
1138 1138
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1139 1139
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/sk.yml
1018 1018
  label_copy_attachments: Copy attachments
1019 1019
  label_item_position: "%{position}/%{count}"
1020 1020
  label_completed_versions: Completed versions
1021
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1021
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022 1022
  field_multiple: Multiple values
1023 1023
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1024 1024
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/sl.yml
1018 1018
  label_copy_attachments: Copy attachments
1019 1019
  label_item_position: "%{position}/%{count}"
1020 1020
  label_completed_versions: Completed versions
1021
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1021
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022 1022
  field_multiple: Multiple values
1023 1023
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1024 1024
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/sq.yml
927 927
  text_tip_issue_begin_day: issue beginning this day
928 928
  text_tip_issue_end_day: issue ending this day
929 929
  text_tip_issue_begin_end_day: issue beginning and ending this day
930
  text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
930
  text_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
931 931
  text_caracters_maximum: "%{count} characters maximum."
932 932
  text_caracters_minimum: "Must be at least %{count} characters long."
933 933
  text_length_between: "Length between %{min} and %{max} characters."
config/locales/sr-YU.yml
1018 1018
  label_copy_attachments: Copy attachments
1019 1019
  label_item_position: "%{position}/%{count}"
1020 1020
  label_completed_versions: Completed versions
1021
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1021
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022 1022
  field_multiple: Multiple values
1023 1023
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1024 1024
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/sr.yml
1019 1019
  label_copy_attachments: Copy attachments
1020 1020
  label_item_position: "%{position}/%{count}"
1021 1021
  label_completed_versions: Completed versions
1022
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1022
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1023 1023
  field_multiple: Multiple values
1024 1024
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1025 1025
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/sv.yml
969 969
  text_tip_issue_begin_day: ärende som börjar denna dag
970 970
  text_tip_issue_end_day: ärende som slutar denna dag
971 971
  text_tip_issue_begin_end_day: ärende som börjar och slutar denna dag
972
  text_project_identifier_info: Ändast gemener (a-z), siffror, streck och understreck är tillåtna.<br />När identifieraren sparats kan den inte ändras.
972
  text_identifier_info: Ändast gemener (a-z), siffror, streck och understreck är tillåtna.<br />När identifieraren sparats kan den inte ändras.
973 973
  text_caracters_maximum: "max %{count} tecken."
974 974
  text_caracters_minimum: "Måste vara minst %{count} tecken lång."
975 975
  text_length_between: "Längd mellan %{min} och %{max} tecken."
config/locales/th.yml
1015 1015
  label_copy_attachments: Copy attachments
1016 1016
  label_item_position: "%{position}/%{count}"
1017 1017
  label_completed_versions: Completed versions
1018
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1018
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1019 1019
  field_multiple: Multiple values
1020 1020
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1021 1021
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/tr.yml
1037 1037
  label_copy_attachments: Copy attachments
1038 1038
  label_item_position: "%{position}/%{count}"
1039 1039
  label_completed_versions: Completed versions
1040
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1040
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1041 1041
  field_multiple: Multiple values
1042 1042
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1043 1043
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/uk.yml
1015 1015
  label_copy_attachments: Copy attachments
1016 1016
  label_item_position: "%{position}/%{count}"
1017 1017
  label_completed_versions: Completed versions
1018
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1018
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1019 1019
  field_multiple: Multiple values
1020 1020
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1021 1021
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/vi.yml
1069 1069
  label_copy_attachments: Copy attachments
1070 1070
  label_item_position: "%{position}/%{count}"
1071 1071
  label_completed_versions: Completed versions
1072
  text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1072
  text_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.
1073 1073
  field_multiple: Multiple values
1074 1074
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
1075 1075
  text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes
config/locales/zh-TW.yml
1013 1013
  text_tip_issue_begin_day: 今天起始的問題
1014 1014
  text_tip_issue_end_day: 今天截止的的問題
1015 1015
  text_tip_issue_begin_end_day: 今天起始與截止的問題
1016
  text_project_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
1016
  text_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
1017 1017
  text_caracters_maximum: "最多 %{count} 個字元."
1018 1018
  text_caracters_minimum: "長度必須大於 %{count} 個字元."
1019 1019
  text_length_between: "長度必須介於 %{min} 至 %{max} 個字元之間."
config/locales/zh.yml
1020 1020
  label_copy_attachments: 复制附件
1021 1021
  label_item_position: "%{position}/%{count}"
1022 1022
  label_completed_versions: 已完成的版本
1023
  text_project_identifier_info: 仅小写字母(a-z)、数字、破折号(-)和下划线(_)可以使用。<br />一旦保存,标识无法修改。
1023
  text_identifier_info: 仅小写字母(a-z)、数字、破折号(-)和下划线(_)可以使用。<br />一旦保存,标识无法修改。
1024 1024
  field_multiple: 多重取值
1025 1025
  setting_commit_cross_project_ref: 允许引用/修复所有其他项目的问题
1026 1026
  text_issue_conflict_resolution_add_notes: 添加说明并取消我的其他变更处理。
test/functional/repositories_git_controller_test.rb
78 78
    put :update, :id => repository.id,
79 79
                 :repository => {
80 80
                     :extra_report_last_commit => '0',
81
                     :identifier => 'test-update',
81
                     :identifier => 'cannot-be-changed-since-it-is-frozen',
82 82
                 }
83 83
    assert_response 302
84 84
    repo2 = Repository.find(repository.id)
85
    assert_equal 'test-update', repo2.identifier
85
    assert_equal 'test-create', repo2.identifier
86 86
    assert_equal false, repo2.extra_report_last_commit
87 87
  end
88 88

  
test/unit/repository_test.rb
105 105
    )
106 106
    assert r.save
107 107
  end
108
  
109
  def test_identifier_should_not_be_frozen_for_a_new_repository
110
    assert_equal false, Repository.new.identifier_frozen?
111
  end
112

  
113
  def test_identifier_should_not_be_frozen_for_a_saved_repository_with_blank_identifier
114
    Repository.update_all(["identifier = ''"], "id = 10")
115

  
116
    assert_equal false, Repository.find(10).identifier_frozen?
117
  end
118

  
119
  def test_identifier_should_be_frozen_for_a_saved_repository_with_valid_identifier
120
    Repository.update_all(["identifier = 'abc123'"], "id = 10")
121

  
122
    assert_equal true, Repository.find(10).identifier_frozen?
123
  end
108 124

  
109 125
  def test_destroy
110 126
    repository = Repository.find(10)
111
-