Feature #6092 » revision_truncation_length_as_setting.diff
app/helpers/repositories_helper.rb | ||
---|---|---|
19 | 19 | |
20 | 20 |
module RepositoriesHelper |
21 | 21 |
def format_revision(txt) |
22 |
txt.to_s[0,8]
|
|
22 |
txt.to_s[0,Setting.repository_revision_truncation.to_i]
|
|
23 | 23 |
end |
24 | 24 |
|
25 | 25 |
def truncate_at_line_break(text, length = 255) |
app/models/changeset.rb | ||
---|---|---|
23 | 23 |
has_many :changes, :dependent => :delete_all |
24 | 24 |
has_and_belongs_to_many :issues |
25 | 25 | |
26 |
acts_as_event :title => Proc.new {|o| "#{l(:label_revision)} #{o.revision}" + (o.short_comments.blank? ? '' : (': ' + o.short_comments))}, |
|
26 |
acts_as_event :title => Proc.new {|o| "#{l(:label_revision)} #{o.revision.to_s[0,Setting.repository_revision_truncation.to_i]}" + (o.short_comments.blank? ? '' : (': ' + o.short_comments))},
|
|
27 | 27 |
:description => :long_comments, |
28 | 28 |
:datetime => :committed_on, |
29 | 29 |
:url => Proc.new {|o| {:controller => 'repositories', :action => 'revision', :id => o.repository.project, :rev => o.revision}} |
app/views/repositories/revision.rhtml | ||
---|---|---|
14 | 14 |
» |
15 | 15 | |
16 | 16 |
<% form_tag({:controller => 'repositories', :action => 'revision', :id => @project, :rev => nil}, :method => :get) do %> |
17 |
<%= text_field_tag 'rev', @rev[0,8], :size => 8 %>
|
|
17 |
<%= text_field_tag 'rev', @rev[0,Setting.repository_revision_truncation.to_i], :size => 8 %>
|
|
18 | 18 |
<%= submit_tag 'OK', :name => nil %> |
19 | 19 |
<% end %> |
20 | 20 |
</div> |
app/views/settings/_repositories.rhtml | ||
---|---|---|
21 | 21 |
<p><%= setting_select :commit_logs_encoding, Setting::ENCODINGS %></p> |
22 | 22 | |
23 | 23 |
<p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p> |
24 |
<p><%= setting_text_field :repository_revision_truncation, :size => 6 %></p> |
|
24 | 25 |
</div> |
25 | 26 | |
26 | 27 |
<fieldset class="box tabular settings"><legend><%= l(:text_issues_ref_in_commit_messages) %></legend> |
config/locales/bg.yml | ||
---|---|---|
898 | 898 |
text_zoom_in: Zoom in |
899 | 899 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
900 | 900 |
label_overall_spent_time: Overall spent time |
901 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/bs.yml | ||
---|---|---|
922 | 922 |
text_zoom_in: Zoom in |
923 | 923 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
924 | 924 |
label_overall_spent_time: Overall spent time |
925 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/ca.yml | ||
---|---|---|
901 | 901 |
text_zoom_in: Zoom in |
902 | 902 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
903 | 903 |
label_overall_spent_time: Overall spent time |
904 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/cs.yml | ||
---|---|---|
904 | 904 |
text_zoom_in: Zoom in |
905 | 905 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
906 | 906 |
label_overall_spent_time: Overall spent time |
907 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/da.yml | ||
---|---|---|
924 | 924 |
text_zoom_in: Zoom in |
925 | 925 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
926 | 926 |
label_overall_spent_time: Overall spent time |
927 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/de.yml | ||
---|---|---|
926 | 926 |
enumeration_activities: Aktivitäten (Zeiterfassung) |
927 | 927 |
enumeration_system_activity: System-Aktivität |
928 | 928 | |
929 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/el.yml | ||
---|---|---|
904 | 904 |
text_zoom_in: Zoom in |
905 | 905 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
906 | 906 |
label_overall_spent_time: Overall spent time |
907 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/en-GB.yml | ||
---|---|---|
907 | 907 |
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. |
908 | 908 |
notice_failed_to_save_members: "Failed to save member(s): {{errors}}." |
909 | 909 |
label_project_copy_notifications: Send email notifications during the project copy |
910 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/en.yml | ||
---|---|---|
329 | 329 |
setting_diff_max_lines_displayed: Max number of diff lines displayed |
330 | 330 |
setting_file_max_size_displayed: Max size of text files displayed inline |
331 | 331 |
setting_repository_log_display_limit: Maximum number of revisions displayed on file log |
332 |
setting_repository_revision_truncation: Revision number truncation length |
|
332 | 333 |
setting_openid: Allow OpenID login and registration |
333 | 334 |
setting_password_min_length: Minimum password length |
334 | 335 |
setting_new_project_user_role_id: Role given to a non-admin user who creates a project |
config/locales/es.yml | ||
---|---|---|
948 | 948 |
text_zoom_in: Zoom in |
949 | 949 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
950 | 950 |
label_overall_spent_time: Overall spent time |
951 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/eu.yml | ||
---|---|---|
908 | 908 |
text_zoom_in: Zoom in |
909 | 909 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
910 | 910 |
label_overall_spent_time: Overall spent time |
911 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/fi.yml | ||
---|---|---|
934 | 934 |
text_zoom_in: Zoom in |
935 | 935 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
936 | 936 |
label_overall_spent_time: Overall spent time |
937 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/fr.yml | ||
---|---|---|
927 | 927 |
text_zoom_in: Zoom avant |
928 | 928 |
notice_unable_delete_time_entry: Impossible de supprimer le temps passé. |
929 | 929 |
label_overall_spent_time: Temps passé global |
930 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/gl.yml | ||
---|---|---|
924 | 924 |
text_zoom_in: Zoom in |
925 | 925 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
926 | 926 |
label_overall_spent_time: Overall spent time |
927 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/he.yml | ||
---|---|---|
913 | 913 |
enumeration_doc_categories: קטגוריות מסמכים |
914 | 914 |
enumeration_activities: פעילויות (מעקב אחר זמנים) |
915 | 915 |
enumeration_system_activity: פעילות מערכת |
916 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/hr.yml | ||
---|---|---|
911 | 911 |
text_zoom_in: Zoom in |
912 | 912 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
913 | 913 |
label_overall_spent_time: Overall spent time |
914 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/hu.yml | ||
---|---|---|
931 | 931 |
text_zoom_in: Nagyít |
932 | 932 |
notice_unable_delete_time_entry: Az időrögzítés nem törölhető |
933 | 933 |
label_overall_spent_time: Összes rászánt idő |
934 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/id.yml | ||
---|---|---|
916 | 916 |
text_zoom_in: Zoom in |
917 | 917 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
918 | 918 |
label_overall_spent_time: Overall spent time |
919 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/it.yml | ||
---|---|---|
911 | 911 |
text_zoom_in: Zoom in |
912 | 912 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
913 | 913 |
label_overall_spent_time: Overall spent time |
914 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/ja.yml | ||
---|---|---|
933 | 933 |
enumeration_doc_categories: 文書カテゴリ |
934 | 934 |
enumeration_activities: 作業分類 (時間トラッキング) |
935 | 935 |
enumeration_system_activity: システム作業分類 |
936 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/ko.yml | ||
---|---|---|
964 | 964 |
text_zoom_in: Zoom in |
965 | 965 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
966 | 966 |
label_overall_spent_time: Overall spent time |
967 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/lt.yml | ||
---|---|---|
972 | 972 |
text_zoom_in: Zoom in |
973 | 973 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
974 | 974 |
label_overall_spent_time: Overall spent time |
975 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/lv.yml | ||
---|---|---|
899 | 899 |
text_zoom_in: Zoom in |
900 | 900 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
901 | 901 |
label_overall_spent_time: Overall spent time |
902 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/mn.yml | ||
---|---|---|
905 | 905 |
text_zoom_in: Zoom in |
906 | 906 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
907 | 907 |
label_overall_spent_time: Overall spent time |
908 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/nl.yml | ||
---|---|---|
886 | 886 |
text_zoom_in: Zoom in |
887 | 887 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
888 | 888 |
label_overall_spent_time: Overall spent time |
889 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/no.yml | ||
---|---|---|
899 | 899 |
text_zoom_in: Zoom in |
900 | 900 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
901 | 901 |
label_overall_spent_time: Overall spent time |
902 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/pl.yml | ||
---|---|---|
929 | 929 |
text_zoom_in: Zoom in |
930 | 930 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
931 | 931 |
label_overall_spent_time: Overall spent time |
932 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/pt-BR.yml | ||
---|---|---|
932 | 932 |
text_zoom_in: Aproximar zoom |
933 | 933 |
notice_unable_delete_time_entry: Não foi possível excluir a entrada no registro de horas trabalhadas. |
934 | 934 |
label_overall_spent_time: Tempo gasto geral |
935 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/pt.yml | ||
---|---|---|
916 | 916 |
text_zoom_in: Zoom in |
917 | 917 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
918 | 918 |
label_overall_spent_time: Overall spent time |
919 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/ro.yml | ||
---|---|---|
901 | 901 |
text_zoom_in: Zoom in |
902 | 902 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
903 | 903 |
label_overall_spent_time: Overall spent time |
904 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/ru.yml | ||
---|---|---|
1024 | 1024 |
text_zoom_in: Приблизить |
1025 | 1025 |
notice_unable_delete_time_entry: Невозможно удалить запись журнала. |
1026 | 1026 |
label_overall_spent_time: Всего затрачено времени |
1027 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/sk.yml | ||
---|---|---|
903 | 903 |
text_zoom_in: Zoom in |
904 | 904 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
905 | 905 |
label_overall_spent_time: Overall spent time |
906 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/sl.yml | ||
---|---|---|
903 | 903 |
text_zoom_in: Zoom in |
904 | 904 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
905 | 905 |
label_overall_spent_time: Overall spent time |
906 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/sr-CY.yml | ||
---|---|---|
905 | 905 |
text_zoom_in: Zoom in |
906 | 906 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
907 | 907 |
label_overall_spent_time: Overall spent time |
908 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/sr.yml | ||
---|---|---|
905 | 905 |
text_zoom_in: Zoom in |
906 | 906 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
907 | 907 |
label_overall_spent_time: Overall spent time |
908 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/sv.yml | ||
---|---|---|
953 | 953 |
enumeration_doc_categories: Dokumentkategorier |
954 | 954 |
enumeration_activities: Aktiviteter (tidsuppföljning) |
955 | 955 |
enumeration_system_activity: Systemaktivitet |
956 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/th.yml | ||
---|---|---|
901 | 901 |
text_zoom_in: Zoom in |
902 | 902 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
903 | 903 |
label_overall_spent_time: Overall spent time |
904 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/tr.yml | ||
---|---|---|
931 | 931 |
text_zoom_in: Zoom in |
932 | 932 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
933 | 933 |
label_overall_spent_time: Overall spent time |
934 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/uk.yml | ||
---|---|---|
900 | 900 |
text_zoom_in: Zoom in |
901 | 901 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
902 | 902 |
label_overall_spent_time: Overall spent time |
903 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/vi.yml | ||
---|---|---|
963 | 963 |
text_zoom_in: Zoom in |
964 | 964 |
notice_unable_delete_time_entry: Unable to delete time log entry. |
965 | 965 |
label_overall_spent_time: Overall spent time |
966 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/zh-TW.yml | ||
---|---|---|
993 | 993 |
enumeration_doc_categories: 文件分類 |
994 | 994 |
enumeration_activities: 活動 (時間追蹤) |
995 | 995 |
enumeration_system_activity: 系統活動 |
996 |
setting_repository_revision_truncation: Revision number truncation length |
config/locales/zh.yml | ||
---|---|---|
926 | 926 |
text_zoom_in: 放大 |
927 | 927 |
notice_unable_delete_time_entry: 无法删除工时记录。 |
928 | 928 |
label_overall_spent_time: 所有项目耗用工时 |
929 |
setting_repository_revision_truncation: Revision number truncation length |
config/settings.yml | ||
---|---|---|
166 | 166 |
repository_log_display_limit: |
167 | 167 |
format: int |
168 | 168 |
default: 100 |
169 |
repository_revision_truncation: |
|
170 |
format: int |
|
171 |
default: 8 |
|
169 | 172 |
ui_theme: |
170 | 173 |
default: '' |
171 | 174 |
emails_footer: |