diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 36123ba47..7d89e2163 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -126,10 +126,14 @@ class ApplicationController < ActionController::Base def redirect_back_or_default(default) back_url = CGI.unescape(params[:back_url].to_s) if !back_url.blank? - uri = URI.parse(back_url) - # do not redirect user to another host or to the login or register page - if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) - redirect_to(back_url) and return + begin + uri = URI.parse(back_url) + # do not redirect user to another host or to the login or register page + if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) + redirect_to(back_url) and return + end + rescue URI::InvalidURIError + # redirect to default end end redirect_to default diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index dbf9cd8e5..aebd48bec 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -35,6 +35,7 @@ class DocumentsController < ApplicationController else @grouped = documents.group_by(&:category) end + @document = @project.documents.build render :layout => false if request.xhr? end diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index 6df54f098..d479855f2 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -22,6 +22,7 @@ class JournalsController < ApplicationController if request.post? @journal.update_attributes(:notes => params[:notes]) if params[:notes] @journal.destroy if @journal.details.empty? && @journal.notes.blank? + call_hook(:controller_journals_edit_post, { :journal => @journal, :params => params}) respond_to do |format| format.html { redirect_to :controller => 'issues', :action => 'show', :id => @journal.journalized_id } format.js { render :action => 'update' } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0e02e5692..37231cb57 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -18,6 +18,7 @@ require 'coderay' require 'coderay/helpers/file_type' require 'forwardable' +require 'cgi' module ApplicationHelper include Redmine::WikiFormatting::Macros::Definitions @@ -525,7 +526,7 @@ module ApplicationHelper def back_url_hidden_field_tag back_url = params[:back_url] || request.env['HTTP_REFERER'] - hidden_field_tag('back_url', back_url) unless back_url.blank? + hidden_field_tag('back_url', CGI.escape(back_url)) unless back_url.blank? end def check_all_links(form_name) diff --git a/app/models/document.rb b/app/models/document.rb index 627a2418f..af38484e7 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -28,4 +28,10 @@ class Document < ActiveRecord::Base validates_presence_of :project, :title, :category validates_length_of :title, :maximum => 60 + + def after_initialize + if new_record? + self.category ||= Enumeration.default('DCAT') + end + end end diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index d32a0c049..e4b080be1 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -44,7 +44,9 @@ class Enumeration < ActiveRecord::Base end def before_save - Enumeration.update_all("is_default = #{connection.quoted_false}", {:opt => opt}) if is_default? + if is_default? && is_default_changed? + Enumeration.update_all("is_default = #{connection.quoted_false}", {:opt => opt}) + end end def objects_count diff --git a/app/models/user.rb b/app/models/user.rb index 3722081d2..ff46d9772 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -178,6 +178,11 @@ class User < ActiveRecord::Base token = Token.find_by_action_and_value('autologin', key) token && (token.created_on > Setting.autologin.to_i.day.ago) && token.user.active? ? token.user : nil end + + # Makes find_by_mail case-insensitive + def self.find_by_mail(mail) + find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase]) + end # Sort users by their display names def <=>(user) diff --git a/app/views/journals/_notes_form.rhtml b/app/views/journals/_notes_form.rhtml index 9baec03fa..94c710ebd 100644 --- a/app/views/journals/_notes_form.rhtml +++ b/app/views/journals/_notes_form.rhtml @@ -1,6 +1,7 @@ <% form_remote_tag(:url => {}, :html => { :id => "journal-#{@journal.id}-form" }) do %> <%= text_area_tag :notes, @journal.notes, :class => 'wiki-edit', :rows => (@journal.notes.blank? ? 10 : [[10, @journal.notes.length / 50].max, 100].min) %> + <%= call_hook(:view_journals_notes_form_after_notes, { :journal => @journal}) %>

<%= submit_tag l(:button_save) %> <%= link_to l(:button_cancel), '#', :onclick => "Element.remove('journal-#{@journal.id}-form'); " + "Element.show('journal-#{@journal.id}-notes'); return false;" %>

diff --git a/app/views/journals/update.rjs b/app/views/journals/update.rjs index 2b5a54c0a..55efb9bf3 100644 --- a/app/views/journals/update.rjs +++ b/app/views/journals/update.rjs @@ -6,3 +6,5 @@ else page.show "journal-#{@journal.id}-notes" page.remove "journal-#{@journal.id}-form" end + +call_hook(:view_journals_update_rjs_bottom, { :page => page, :journal => @journal }) diff --git a/lang/de.yml b/lang/de.yml index 93afc016b..5650c3c31 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -344,6 +344,7 @@ label_last_updates_plural: %d zuletzt aktualisierten label_registered_on: Angemeldet am label_activity: Aktivität label_overall_activity: Aktivität aller Projekte anzeigen +label_user_activity: "Aktivität von %s" label_new: Neu label_logged_as: Angemeldet als label_environment: Environment @@ -543,6 +544,7 @@ label_send_test_email: Test-E-Mail senden label_feeds_access_key_created_on: Atom-Zugriffsschlüssel vor %s erstellt label_module_plural: Module label_added_time_by: Von %s vor %s hinzugefügt +label_updated_time_by: Von %s vor %s aktualisiert label_updated_time: Vor %s aktualisiert label_jump_to_a_project: Zu einem Projekt springen... label_file_plural: Dateien @@ -694,7 +696,5 @@ default_activity_development: Entwicklung enumeration_issue_priorities: Ticket-Prioritäten enumeration_doc_categories: Dokumentenkategorien enumeration_activities: Aktivitäten (Zeiterfassung) -label_user_activity: "%s's activity" -label_updated_time_by: Updated by %s %s ago text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' setting_diff_max_lines_displayed: Max number of diff lines displayed diff --git a/lang/es.yml b/lang/es.yml index 52d3c30aa..8437beca1 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -19,11 +19,11 @@ actionview_datehelper_time_in_words_second_less_than_plural: menos de %d segundo actionview_instancetag_blank_option: Por favor seleccione activerecord_error_accepted: debe ser aceptado activerecord_error_blank: no puede estar en blanco -activerecord_error_circular_dependency: Esta relación podría crear una dependencia anidada +activerecord_error_circular_dependency: Esta relación podría crear una dependencia circular activerecord_error_confirmation: la confirmación no coincide activerecord_error_empty: no puede estar vacío activerecord_error_exclusion: está reservado -activerecord_error_greater_than_start_date: debe ser la fecha mayor que del comienzo +activerecord_error_greater_than_start_date: debe ser posterior a la fecha de comienzo activerecord_error_inclusion: no está incluído en la lista activerecord_error_invalid: no es válido activerecord_error_not_a_date: no es una fecha válida @@ -140,11 +140,11 @@ field_is_default: Estado por defecto field_is_filter: Usado como filtro field_is_for_all: Para todos los proyectos field_is_in_chlog: Consultar las peticiones en el histórico -field_is_in_roadmap: Consultar las peticiones en el roadmap +field_is_in_roadmap: Consultar las peticiones en la planificación field_is_public: Público field_is_required: Obligatorio field_issue: Petición -field_issue_to_id: Petición Relacionada +field_issue_to_id: Petición relacionada field_language: Idioma field_last_login_on: Última conexión field_lastname: Apellido @@ -178,7 +178,7 @@ field_subproject: Proyecto secundario field_summary: Resumen field_time_zone: Zona horaria field_title: Título -field_tracker: Tracker +field_tracker: Tipo field_type: Tipo field_updated_on: Actualizado field_url: URL @@ -215,7 +215,7 @@ label_ago: hace label_all: todos label_all_time: todo el tiempo label_all_words: Todas las palabras -label_and_its_subprojects: %s y sus subproyectos +label_and_its_subprojects: %s y proyectos secundarios label_applied_status: Aplicar estado label_assigned_to_me_issues: Peticiones que me están asignadas label_associated_revisions: Revisiones asociadas @@ -234,7 +234,7 @@ label_blocks: bloquea a label_board: Foro label_board_new: Nuevo foro label_board_plural: Foros -label_boolean: Boleano +label_boolean: Booleano label_browse: Hojear label_bulk_edit_selected_issues: Editar las peticiones seleccionadas label_calendar: Calendario @@ -293,7 +293,7 @@ label_enumerations: Listas de valores label_environment: Entorno label_equals: igual label_example: Ejemplo -label_export_to: Exportar a +label_export_to: 'Exportar a:' label_f_hour: %.2f hora label_f_hour_plural: %.2f horas label_feed_plural: Feeds @@ -327,7 +327,7 @@ label_issue_category_new: Nueva categoría label_issue_category_plural: Categorías de las peticiones label_issue_new: Nueva petición label_issue_plural: Peticiones -label_issue_status: Estado de petición +label_issue_status: Estado de la petición label_issue_status_new: Nuevo estado label_issue_status_plural: Estados de las peticiones label_issue_tracking: Peticiones @@ -337,7 +337,7 @@ label_issue_watchers: Seguidores label_issues_by: Peticiones por %s label_jump_to_a_project: Ir al proyecto... label_language_based: Basado en el idioma -label_last_changes: %d cambios del último +label_last_changes: últimos %d cambios label_last_login: Última conexión label_last_month: último mes label_last_n_days: últimos %d días @@ -384,7 +384,7 @@ label_news_plural: Noticias label_news_view_all: Ver todas las noticias label_next: Siguiente label_no_change_option: (Sin cambios) -label_no_data: Ningun dato a mostrar +label_no_data: Ningún dato a mostrar label_nobody: nadie label_none: ninguno label_not_contains: no contiene @@ -397,7 +397,7 @@ label_options: Opciones label_overall_activity: Actividad global label_overview: Vistazo label_password_lost: ¿Olvidaste la contraseña? -label_per_page: Por la página +label_per_page: Por página label_permissions: Permisos label_permissions_report: Informe de permisos label_personalize_page: Personalizar esta página @@ -438,7 +438,7 @@ label_result_plural: Resultados label_reverse_chronological_order: En orden cronológico inverso label_revision: Revisión label_revision_plural: Revisiones -label_roadmap: Roadmap +label_roadmap: Planificación label_roadmap_due_in: Finaliza en %s label_roadmap_no_issues: No hay peticiones para esta versión label_roadmap_overdue: %s tarde @@ -452,7 +452,7 @@ label_search_titles_only: Buscar sólo en títulos label_send_information: Enviar información de la cuenta al usuario label_send_test_email: Enviar un correo de prueba label_settings: Configuración -label_show_completed_versions: Muestra las versiones completas +label_show_completed_versions: Muestra las versiones terminadas label_sort_by: Ordenar por %s label_sort_higher: Subir label_sort_highest: Primero @@ -474,16 +474,18 @@ label_time_tracking: Control de tiempo label_today: hoy label_topic_plural: Temas label_total: Total -label_tracker: Tracker -label_tracker_new: Nuevo tracker -label_tracker_plural: Trackers +label_tracker: Tipo +label_tracker_new: Nuevo tipo +label_tracker_plural: Tipos de peticiones label_updated_time: Actualizado hace %s +label_updated_time_by: Actualizado por %s hace %s label_used_by: Utilizado por label_user: Usuario +label_user_activity: "Actividad de %s" label_user_mail_no_self_notified: "No quiero ser avisado de cambios hechos por mí" label_user_mail_option_all: "Para cualquier evento en todos mis proyectos" label_user_mail_option_none: "Sólo para elementos monitorizados o relacionados conmigo" -label_user_mail_option_selected: "Para cualquier evento del proyecto seleccionado..." +label_user_mail_option_selected: "Para cualquier evento de los proyectos seleccionados..." label_user_new: Nuevo usuario label_user_plural: Usuarios label_version: Versión @@ -501,22 +503,22 @@ label_wiki_page_plural: Wiki páginas label_workflow: Flujo de trabajo label_year: Año label_yesterday: ayer -mail_body_account_activation_request: "Un nuevo usuario (%s) ha sido registrado. Esta cuenta está pendiende de aprobación" +mail_body_account_activation_request: 'Se ha inscrito un nuevo usuario (%s). La cuenta está pendiende de aprobación:' mail_body_account_information: Información sobre su cuenta mail_body_account_information_external: Puede usar su cuenta "%s" para conectarse. -mail_body_lost_password: 'Para cambiar su contraseña, haga click en el siguiente enlace:' -mail_body_register: 'Para activar su cuenta, haga click en el siguiente enlace:' +mail_body_lost_password: 'Para cambiar su contraseña, haga clic en el siguiente enlace:' +mail_body_register: 'Para activar su cuenta, haga clic en el siguiente enlace:' mail_body_reminder: "%d peticion(es) asignadas a tí finalizan en los próximos %d días:" mail_subject_account_activation_request: Petición de activación de cuenta %s mail_subject_lost_password: Tu contraseña del %s mail_subject_register: Activación de la cuenta del %s mail_subject_reminder: "%d peticion(es) finalizan en los próximos días" -notice_account_activated: Su cuenta ha sido activada. Ahora se encuentra conectado. +notice_account_activated: Su cuenta ha sido activada. Ya puede conectarse. notice_account_invalid_creditentials: Usuario o contraseña inválido. notice_account_lost_email_sent: Se le ha enviado un correo con instrucciones para elegir una nueva contraseña. notice_account_password_updated: Contraseña modificada correctamente. -notice_account_pending: "Su cuenta ha sido creada y está pendiende de la aprobación por parte de administrador" -notice_account_register_done: Cuenta creada correctamente. +notice_account_pending: "Su cuenta ha sido creada y está pendiende de la aprobación por parte del administrador." +notice_account_register_done: Cuenta creada correctamente. Para activarla, haga clic sobre el enlace que le ha sido enviado por correo. notice_account_unknown_email: Usuario desconocido. notice_account_updated: Cuenta actualizada correctamente. notice_account_wrong_password: Contraseña incorrecta. @@ -524,9 +526,9 @@ notice_can_t_change_password: Esta cuenta utiliza una fuente de autenticación e notice_default_data_loaded: Configuración por defecto cargada correctamente. notice_email_error: Ha ocurrido un error mientras enviando el correo (%s) notice_email_sent: Se ha enviado un correo a %s -notice_failed_to_save_issues: "Imposible salvar %s peticion(es) en %d seleccionado: %s." -notice_feeds_access_key_reseted: Su clave de acceso para RSS ha sido reiniciada -notice_file_not_found: La página a la que intentas acceder no existe. +notice_failed_to_save_issues: "Imposible grabar %s peticion(es) en %d seleccionado: %s." +notice_feeds_access_key_reseted: Su clave de acceso para RSS ha sido reiniciada. +notice_file_not_found: La página a la que intenta acceder no existe. notice_locking_conflict: Los datos han sido modificados por otro usuario. notice_no_issue_selected: "Ninguna petición seleccionada. Por favor, compruebe la petición que quiere modificar" notice_not_authorized: No tiene autorización para acceder a esta página. @@ -544,9 +546,9 @@ permission_comment_news: Comentar noticias permission_commit_access: Acceso de escritura permission_delete_issues: Borrar peticiones permission_delete_messages: Borrar mensajes +permission_delete_own_messages: Borrar mensajes propios permission_delete_wiki_pages: Borrar páginas wiki permission_delete_wiki_pages_attachments: Borrar ficheros -permission_delete_own_messages: Borrar mensajes propios permission_edit_issue_notes: Modificar notas permission_edit_issues: Modificar peticiones permission_edit_messages: Modificar mensajes @@ -602,15 +604,16 @@ setting_commit_fix_keywords: Palabras clave para la corrección setting_commit_logs_encoding: Codificación de los mensajes de commit setting_commit_ref_keywords: Palabras clave para la referencia setting_cross_project_issue_relations: Permitir relacionar peticiones de distintos proyectos -setting_date_format: Formato de la fecha +setting_date_format: Formato de fecha setting_default_language: Idioma por defecto setting_default_projects_public: Los proyectos nuevos son públicos por defecto -setting_display_subprojects_issues: Mostrar peticiones de un subproyecto en el proyecto padre por defecto +setting_diff_max_lines_displayed: Número máximo de diferencias mostradas +setting_display_subprojects_issues: Mostrar por defecto peticiones de proy. secundarios en el principal setting_emails_footer: Pie de mensajes setting_enabled_scm: Activar SCM setting_feeds_limit: Límite de contenido para sindicación setting_gravatar_enabled: Usar iconos de usuario (Gravatar) -setting_host_name: Nombre de host +setting_host_name: Nombre y ruta del servidor setting_issue_list_default_columns: Columnas por defecto para la lista de peticiones setting_issues_export_limit: Límite de exportación de peticiones setting_login_required: Se requiere identificación @@ -632,7 +635,7 @@ setting_wiki_compression: Compresión del historial del Wiki status_active: activo status_locked: bloqueado status_registered: registrado -text_are_you_sure: ¿ Estás seguro ? +text_are_you_sure: ¿Está seguro? text_assign_time_entries_to_project: Asignar las horas al proyecto text_caracters_maximum: %d caracteres como máximo. text_caracters_minimum: %d caracteres como mínimo @@ -640,11 +643,12 @@ text_comma_separated: Múltiples valores permitidos (separados por coma). text_default_administrator_account_changed: Cuenta de administrador por defecto modificada text_destroy_time_entries: Borrar las horas text_destroy_time_entries_question: Existen %.02f horas asignadas a la petición que quiere borrar. ¿Qué quiere hacer ? +text_diff_truncated: '... Diferencia truncada por exceder el máximo tamaño visualizable.' text_email_delivery_not_configured: "El envío de correos no está configurado, y las notificaciones se han desactivado. \n Configure el servidor de SMTP en config/email.yml y reinicie la aplicación para activar los cambios." text_enumeration_category_reassign_to: 'Reasignar al siguiente valor:' text_enumeration_destroy_question: '%d objetos con este valor asignado.' text_file_repository_writable: Se puede escribir en el repositorio -text_issue_added: Petición añadida por %s. +text_issue_added: Petición %s añadida por %s. text_issue_category_destroy_assignments: Dejar las peticiones sin categoría text_issue_category_destroy_question: Algunas peticiones (%d) están asignadas a esta categoría. ¿Qué desea hacer? text_issue_category_reassign_to: Reasignar las peticiones a la categoría @@ -657,27 +661,23 @@ text_journal_set_to: fijado a %s text_length_between: Longitud entre %d y %d caracteres. text_load_default_configuration: Cargar la configuración por defecto text_min_max_length_info: 0 para ninguna restricción -text_no_configuration_data: "Todavía no se han configurado roles, ni trackers, ni estados y flujo de trabajo asociado a peticiones. Se recomiendo encarecidamente cargar la configuración por defecto. Una vez cargada, podrá modificarla." +text_no_configuration_data: "Todavía no se han configurado perfiles, ni tipos, estados y flujo de trabajo asociado a peticiones. Se recomiendo encarecidamente cargar la configuración por defecto. Una vez cargada, podrá modificarla." text_project_destroy_confirmation: ¿Estás seguro de querer eliminar el proyecto? text_project_identifier_info: 'Letras minúsculas (a-z), números y signos de puntuación permitidos.
Una vez guardado, el identificador no puede modificarse.' text_reassign_time_entries: 'Reasignar las horas a esta petición:' text_regexp_info: ej. ^[A-Z0-9]+$ -text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped." +text_repository_usernames_mapping: "Establezca la correspondencia entre los usuarios de Redmine y los presentes en el log del repositorio.\nLos usuarios con el mismo nombre o correo en Redmine y en el repositorio serán asociados automáticamente." text_rmagick_available: RMagick disponible (opcional) text_select_mail_notifications: Seleccionar los eventos a notificar text_select_project_modules: 'Seleccione los módulos a activar para este proyecto:' text_status_changed_by_changeset: Aplicado en los cambios %s -text_subprojects_destroy_warning: 'Los subproyectos: %s también se eliminarán' +text_subprojects_destroy_warning: 'Los proyectos secundarios: %s también se eliminarán' text_tip_task_begin_day: tarea que comienza este día text_tip_task_begin_end_day: tarea que comienza y termina este día text_tip_task_end_day: tarea que termina este día -text_tracker_no_workflow: No hay ningún flujo de trabajo definido para este tracker +text_tracker_no_workflow: No hay ningún flujo de trabajo definido para este tipo de petición text_unallowed_characters: Caracteres no permitidos -text_user_mail_option: "En los proyectos no seleccionados, sólo recibirá notificaciones sobre elementos monitorizados o elementos en los que esté involucrado (por ejemplo, peticiones de las que usted sea autor o asignadas a usted)." +text_user_mail_option: "De los proyectos no seleccionados, sólo recibirá notificaciones sobre elementos monitorizados o elementos en los que esté involucrado (por ejemplo, peticiones de las que usted sea autor o asignadas a usted)." text_user_wrote: '%s escribió:' text_wiki_destroy_confirmation: ¿Seguro que quiere borrar el wiki y todo su contenido? text_workflow_edit: Seleccionar un flujo de trabajo para actualizar -label_user_activity: "%s's activity" -label_updated_time_by: Updated by %s %s ago -text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' -setting_diff_max_lines_displayed: Max number of diff lines displayed diff --git a/lang/hu.yml b/lang/hu.yml index 24a9da4a5..170c6956e 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -694,6 +694,6 @@ text_repository_usernames_mapping: "Állítsd be a felhasználó összerendelés permission_edit_own_messages: Saját üzenetek szerkesztése permission_delete_own_messages: Saját üzenetek törlése label_user_activity: "%s tevékenységei" -label_updated_time_by: Updated by %s %s ago -text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' -setting_diff_max_lines_displayed: Max number of diff lines displayed +label_updated_time_by: "Módosította %s ennyivel ezelőtt: %s" +text_diff_truncated: '... A diff fájl vége nem jelenik meg, mert hosszab, mint a megjeleníthető sorok száma.' +setting_diff_max_lines_displayed: A megjelenítendő sorok száma (maximum) a diff fájloknál diff --git a/lang/ko.yml b/lang/ko.yml index 9d2fb6d8e..b3f4a5dd2 100644 --- a/lang/ko.yml +++ b/lang/ko.yml @@ -120,18 +120,18 @@ field_subject: 제목 field_due_date: 완료 기한 field_assigned_to: 담당자 field_priority: 우선순위 -field_fixed_version: 목표 버전 +field_fixed_version: 목표버전 field_user: 사용자 field_role: 역할 field_homepage: 홈페이지 field_is_public: 공개 field_parent: 상위 프로젝트 -field_is_in_chlog: 변경이력(changelog)에서 보여지는 일감들 -field_is_in_roadmap: 로드맵에서 보여지는 일감들 +field_is_in_chlog: 변경이력(changelog)에서 표시할 일감들 +field_is_in_roadmap: 로드맵에서표시할 일감들 field_login: 로그인 field_mail_notification: 메일 알림 field_admin: 관리자 -field_last_login_on: 최종 접속 +field_last_login_on: 마지막 로그인 field_language: 언어 field_effective_date: 일자 field_password: 비밀번호 @@ -188,7 +188,7 @@ setting_commit_ref_keywords: 일감 참조에 사용할 키워드들 setting_commit_fix_keywords: 일감 해결에 사용할 키워드들 setting_autologin: 자동 로그인 setting_date_format: 날짜 형식 -setting_cross_project_issue_relations: 프로젝트간 일감에 관련을 맺는 것을 허용 +setting_cross_project_issue_relations: 프로젝트간 일감에 관계을 맺는 것을 허용 setting_issue_list_default_columns: 일감 목록에 보여줄 기본 컬럼들 setting_repositories_encodings: 저장소 인코딩 setting_emails_footer: 메일 꼬리 @@ -201,7 +201,7 @@ label_project_new: 새 프로젝트 label_project_plural: 프로젝트 label_project_all: 모든 프로젝트 label_project_latest: 최근 프로젝트 -label_issue: 일감 보기 +label_issue: 일감 label_issue_new: 새 일감만들기 label_issue_plural: 일감 보기 label_issue_view_all: 모든 일감 보기 @@ -249,9 +249,9 @@ label_last_login: 최종 접속 label_last_updates: 최종 변경 내역 label_last_updates_plural: 최종변경 %d label_registered_on: 등록시각 -label_activity: 진행중인 작업 -label_new: 신규 -label_logged_as: ▶ +label_activity: 작업내역 +label_new: 새로 만들기 +label_logged_as: '로그인계정:' label_environment: 환경 label_authentication: 인증설정 label_auth_source: 인증 모드 @@ -280,7 +280,7 @@ label_attachment_plural: 관련파일 label_report: 보고서 label_report_plural: 보고서 label_news: 뉴스 -label_news_new: 뉴스추가 +label_news_new: 새 뉴스 label_news_plural: 뉴스 label_news_latest: 최근 뉴스 label_news_view_all: 모든 뉴스 @@ -298,7 +298,7 @@ label_open_issues: 진행중 label_open_issues_plural: 진행중 label_closed_issues: 완료됨 label_closed_issues_plural: 완료됨 -label_total: Total +label_total: 합계 label_permissions: 허가권한 label_current_status: 일감 상태 label_new_statuses_allowed: 허용되는 일감 상태 @@ -316,7 +316,7 @@ label_gantt: Gantt 챠트 label_internal: 내부 label_last_changes: 지난 변경사항 %d 건 label_change_view_all: 모든 변경 내역 보기 -label_personalize_page: 입맛대로 구성하기(Drag & Drop) +label_personalize_page: 입맛대로 구성하기 label_comment: 댓글 label_comment_plural: 댓글 label_comment_add: 댓글 추가 @@ -353,7 +353,7 @@ label_latest_revision: 최근 개정판 label_latest_revision_plural: 최근 개정판 label_view_revisions: 개정판 보기 label_max_size: 최대 크기 -label_on: 'on' +label_on: '전체: ' label_sort_highest: 최상단으로 label_sort_higher: 위로 label_sort_lower: 아래로 @@ -361,7 +361,7 @@ label_sort_lowest: 최하단으로 label_roadmap: 로드맵 label_roadmap_due_in: 기한 %s label_roadmap_overdue: %s 지연 -label_roadmap_no_issues: 이버전에 해당하는 일감 없음 +label_roadmap_no_issues: 이 버전에 해당하는 일감 없음 label_search: 검색 label_result_plural: 결과 label_all_words: 모든 단어 @@ -412,19 +412,19 @@ label_disabled: 비활성화 label_show_completed_versions: 완료된 버전 보기 label_me: 나 label_board: 게시판 -label_board_new: 신규 게시판 +label_board_new: 새 게시판 label_board_plural: 게시판 label_topic_plural: 주제 label_message_plural: 관련글 -label_message_last: 최종 글 +label_message_last: 마지막 글 label_message_new: 새글쓰기 label_reply_plural: 답글 label_send_information: 사용자에게 계정정보를 보냄 label_year: 년 label_month: 월 label_week: 주 -label_date_from: 에서 -label_date_to: (으)로 +label_date_from: '기간:' +label_date_to: ' ~ ' label_language_based: 언어설정에 따름 label_sort_by: 정렬방법(%s) label_send_test_email: 테스트 메일 보내기 @@ -533,7 +533,7 @@ default_activity_development: 개발 enumeration_issue_priorities: 일감 우선순위 enumeration_doc_categories: 문서 카테고리 -enumeration_activities: 진행활동(시간 추적) +enumeration_activities: 작업분류(시간추적) button_copy: 복사 mail_body_account_information_external: 레드마인에 로그인할 때 "%s" 계정을 사용하실 수 있습니다. button_change_password: 비밀번호 변경 @@ -555,7 +555,7 @@ button_annotate: 주석달기(annotate) label_issues_by: 일감분류 방식 %s field_searchable: 검색가능 label_display_per_page: '페이지당: %s' -setting_per_page_options: 페이지당 표시할 객채 수 +setting_per_page_options: 페이지당 표시할 객체 수 label_age: 마지막 수정일 notice_default_data_loaded: 기본 설정을 성공적으로 로드하였습니다. text_load_default_configuration: 기본 설정을 로딩하기 @@ -585,20 +585,20 @@ project_module_files: 관련파일 project_module_documents: 문서 project_module_repository: 저장소 project_module_news: 뉴스 -project_module_time_tracking: 진행중인 작업 +project_module_time_tracking: 시간추적 text_file_repository_writable: 파일 저장소 쓰기 가능 text_default_administrator_account_changed: 기본 관리자 계정이 변경되었습니다. -text_rmagick_available: RMagick available (optional) +text_rmagick_available: RMagick 사용가능(옵션) button_configure: 설정 label_plugins: 플러그인 label_ldap_authentication: LDAP 인증 label_downloads_abbr: D/L label_add_another_file: 다른 파일 추가 label_this_month: 이번 달 -text_destroy_time_entries_question: %.02f hours were reported on the issues you are about to delete. What do you want to do ? +text_destroy_time_entries_question: 삭제하려는 일감에 %.02f 시간이 보고되어 있습니다. 어떻게 하시겠습니까? label_last_n_days: 지난 %d 일 label_all_time: 모든 시간 -error_issue_not_found_in_project: 'The issue was not found or does not belong to this project' +error_issue_not_found_in_project: '일감이 없거나 이 프로젝트의 것이 아닙니다.' label_this_year: 올해 text_assign_time_entries_to_project: 보고된 시간을 프로젝트에 할당하기 label_date_range: 날짜 범위 @@ -608,15 +608,15 @@ label_optional_description: 부가적인 설명 label_last_month: 지난 달 text_destroy_time_entries: 보고된 시간을 삭제하기 text_reassign_time_entries: '이 알림에 보고된 시간을 재할당하기:' -setting_activity_days_default: 프로젝트 활동에 보여질 날수 +setting_activity_days_default: 프로젝트 작업내역에 보여줄 날수 label_chronological_order: 시간 순으로 정렬 field_comments_sorting: 히스토리 정렬 설정 label_reverse_chronological_order: 시간 역순으로 정렬 -label_preferences: Preferences +label_preferences: 설정 setting_display_subprojects_issues: 하위 프로젝트의 일감을 최상위 프로젝트에서 표시 -label_overall_activity: 전체 진행 상황 +label_overall_activity: 전체 작업내역 setting_default_projects_public: 새 프로젝트를 공개로 설정 -error_scm_annotate: "The entry does not exist or can not be annotated." +error_scm_annotate: "항목이 없거나 주석을 달 수 없습니다." label_planning: 프로젝트계획(Planning) text_subprojects_destroy_warning: '서브프로젝트(%s)가 자동으로 지워질 것입니다.' label_and_its_subprojects: %s와 서브프로젝트들 @@ -692,7 +692,7 @@ label_example: 예 text_repository_usernames_mapping: "저장소 로그에서 발견된 각 사용자에 레드마인 사용자를 업데이트할때 선택합니다.\n레드마인과 저장소의 이름이나 이메일이 같은 사용자가 자동으로 연결됩니다." permission_edit_own_messages: 자기 메시지 편집 permission_delete_own_messages: 자기 메시지 삭제 -label_user_activity: "%s의 활동" -label_updated_time_by: Updated by %s %s ago -text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' -setting_diff_max_lines_displayed: Max number of diff lines displayed +label_user_activity: "%s의 작업내역" +label_updated_time_by: %s가 %s 전에 변경 +text_diff_truncated: '... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.' +setting_diff_max_lines_displayed: 차이점보기에 표시할 최대 줄수 diff --git a/lang/ru.yml b/lang/ru.yml index acf916006..ce051bd5c 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -518,7 +518,8 @@ label_total: Всего label_tracker_new: Новый трекер label_tracker_plural: Трекеры label_tracker: Трекер -label_updated_time: Обновлен %s назад +label_updated_time: Обновлено %s назад +label_updated_time_by: Обновлено %s %s назад label_used_by: Используется label_user_activity: "Активность пользователя %s" label_user_mail_no_self_notified: "Не извещать об изменениях, которые я сделал сам" @@ -652,6 +653,7 @@ setting_cross_project_issue_relations: Разрешить пересечение setting_date_format: Формат даты setting_default_language: Язык по умолчанию setting_default_projects_public: Новые проекты являются общедоступными +setting_diff_max_lines_displayed: Максимальное число строк для diff setting_display_subprojects_issues: Отображение подпроектов по умолчанию setting_emails_footer: Подстрочные примечания Email setting_enabled_scm: Разрешенные SCM @@ -689,6 +691,7 @@ text_comma_separated: Допустимы несколько значений (ч text_default_administrator_account_changed: Учетная запись администратора по умолчанию изменена text_destroy_time_entries_question: Вы собираетесь удалить %.02f часа(ов) прикрепленных за этой задачей. text_destroy_time_entries: Удалить зарегистрированное время +text_diff_truncated: '... Этот diff ограничен, так как превышает максимальный отображаемый размер.' text_email_delivery_not_configured: "Параметры работы с почтовым сервером не настроены и функция уведомления по email не активна.\nНастроить параметры для Вашего SMTP-сервера Вы можете в файле config/email.yml. Для применения изменений перезапустите приложение." text_enumeration_category_reassign_to: 'Назначить им следующее значение:' text_enumeration_destroy_question: '%d объект(а,ов) связаны с этим значением.' @@ -727,6 +730,3 @@ text_user_wrote: '%s написал(а):' text_wiki_destroy_confirmation: Вы уверены, что хотите удалить данную Wiki и все ее содержимое? text_workflow_edit: Выберите роль и трекер для редактирования последовательности состояний -label_updated_time_by: Updated by %s %s ago -text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' -setting_diff_max_lines_displayed: Max number of diff lines displayed diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml index f52f4d815..6faa7d6d6 100644 --- a/lang/zh-tw.yml +++ b/lang/zh-tw.yml @@ -223,6 +223,7 @@ setting_mail_handler_api_enabled: 啟用處理傳入電子郵件的服務 setting_mail_handler_api_key: API 金鑰 setting_sequential_project_identifiers: 循序產生專案識別碼 setting_gravatar_enabled: 啟用 Gravatar 全球認證大頭像 +setting_diff_max_lines_displayed: 差異顯示行數之最大值 permission_edit_project: 編輯專案 permission_select_project_modules: 選擇專案模組 @@ -670,6 +671,7 @@ text_enumeration_destroy_question: '目前有 %d 個物件使用此列舉值。' text_enumeration_category_reassign_to: '重新設定其列舉值為:' text_email_delivery_not_configured: "您尚未設定電子郵件傳送方式,因此提醒選項已被停用。\n請在 config/email.yml 中設定 SMTP 之後,重新啟動 Redmine,以啟用電子郵件提醒選項。" text_repository_usernames_mapping: "選擇或更新 Redmine 使用者與版本庫使用者之對應關係。\n版本庫中之使用者帳號或電子郵件信箱,與 Redmine 設定相同者,將自動產生對應關係。" +text_diff_truncated: '... 這份差異已被截短以符合顯示行數之最大值' default_role_manager: 管理人員 default_role_developper: 開發人員 @@ -696,5 +698,3 @@ default_activity_development: 開發 enumeration_issue_priorities: 項目優先權 enumeration_doc_categories: 文件分類 enumeration_activities: 活動 (時間追蹤) -text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' -setting_diff_max_lines_displayed: Max number of diff lines displayed diff --git a/lang/zh.yml b/lang/zh.yml index 428c6e67d..6e6b42b50 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -223,6 +223,7 @@ setting_mail_handler_api_enabled: 启用用于接收邮件的服务 setting_mail_handler_api_key: API key setting_sequential_project_identifiers: 顺序产生项目标识 setting_gravatar_enabled: 使用Gravatar用户头像 +setting_diff_max_lines_displayed: 查看差别页面上显示的最大行数 permission_edit_project: 编辑项目 permission_select_project_modules: 选择项目模块 @@ -544,7 +545,8 @@ label_send_test_email: 发送测试邮件 label_feeds_access_key_created_on: RSS 存取键是在 %s 之前建立的 label_module_plural: 模块 label_added_time_by: 由 %s 在 %s 之前添加 -label_updated_time: 更新于 %s 前 +label_updated_time: 更新于 %s 之前 +label_updated_time_by: 由 %s 更新于 %s 之前 label_jump_to_a_project: 选择一个项目... label_file_plural: 文件 label_changeset_plural: 变更 @@ -669,6 +671,7 @@ text_enumeration_category_reassign_to: '将它们关联到新的枚举值:' text_enumeration_destroy_question: '%d 个对象被关联到了这个枚举值。' text_email_delivery_not_configured: "邮件参数尚未配置,因此邮件通知功能已被禁用。\n请在config/email.yml中配置您的SMTP服务器信息并重新启动以使其生效。" text_repository_usernames_mapping: "选择或更新与版本库中的用户名对应的Redmine用户。\n版本库中与Redmine中的同名用户将被自动对应。" +text_diff_truncated: '... 差别内容超过了可显示的最大行数并已被截断' default_role_manager: 管理人员 default_role_developper: 开发人员 @@ -695,6 +698,3 @@ default_activity_development: 开发 enumeration_issue_priorities: 问题优先级 enumeration_doc_categories: 文档类别 enumeration_activities: 活动(时间跟踪) -label_updated_time_by: Updated by %s %s ago -text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' -setting_diff_max_lines_displayed: Max number of diff lines displayed diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb index 7c1f0213a..b2e7abda0 100644 --- a/test/functional/documents_controller_test.rb +++ b/test/functional/documents_controller_test.rb @@ -32,10 +32,19 @@ class DocumentsControllerTest < Test::Unit::TestCase end def test_index + # Sets a default category + e = Enumeration.find_by_name('Technical documentation') + e.update_attributes(:is_default => true) + get :index, :project_id => 'ecookbook' assert_response :success assert_template 'index' assert_not_nil assigns(:grouped) + + # Default category selected in the new document form + assert_tag :select, :attributes => {:name => 'document[category_id]'}, + :child => {:tag => 'option', :attributes => {:selected => 'selected'}, + :content => 'Technical documentation'} end def test_new_with_one_attachment diff --git a/test/integration/account_test.rb b/test/integration/account_test.rb index c349200d3..c6cfd080e 100644 --- a/test/integration/account_test.rb +++ b/test/integration/account_test.rb @@ -44,7 +44,7 @@ class AccountTest < ActionController::IntegrationTest assert_response :success assert_template "account/lost_password" - post "account/lost_password", :mail => 'jsmith@somenet.foo' + post "account/lost_password", :mail => 'jSmith@somenet.foo' assert_redirected_to "account/login" token = Token.find(:first) diff --git a/test/unit/document_test.rb b/test/unit/document_test.rb new file mode 100644 index 000000000..17a0ad6ea --- /dev/null +++ b/test/unit/document_test.rb @@ -0,0 +1,37 @@ +# Redmine - project management software +# Copyright (C) 2006-2008 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +require File.dirname(__FILE__) + '/../test_helper' + +class DocumentTest < Test::Unit::TestCase + fixtures :projects, :enumerations, :documents + + def test_create + doc = Document.new(:project => Project.find(1), :title => 'New document', :category => Enumeration.find_by_name('User documentation')) + assert doc.save + end + + def test_create_with_default_category + # Sets a default category + e = Enumeration.find_by_name('Technical documentation') + e.update_attributes(:is_default => true) + + doc = Document.new(:project => Project.find(1), :title => 'New document') + assert_equal e, doc.category + assert doc.save + end +end diff --git a/test/unit/enumeration_test.rb b/test/unit/enumeration_test.rb index 9b7bfd174..4da3f094b 100644 --- a/test/unit/enumeration_test.rb +++ b/test/unit/enumeration_test.rb @@ -37,6 +37,43 @@ class EnumerationTest < Test::Unit::TestCase assert !Enumeration.find(7).in_use? end + def test_default + e = Enumeration.default('IPRI') + assert e.is_a?(Enumeration) + assert e.is_default? + assert_equal 'Normal', e.name + end + + def test_create + e = Enumeration.new(:opt => 'IPRI', :name => 'Very urgent', :is_default => false) + assert e.save + assert_equal 'Normal', Enumeration.default('IPRI').name + end + + def test_create_as_default + e = Enumeration.new(:opt => 'IPRI', :name => 'Very urgent', :is_default => true) + assert e.save + assert_equal e, Enumeration.default('IPRI') + end + + def test_update_default + e = Enumeration.default('IPRI') + e.update_attributes(:name => 'Changed', :is_default => true) + assert_equal e, Enumeration.default('IPRI') + end + + def test_update_default_to_non_default + e = Enumeration.default('IPRI') + e.update_attributes(:name => 'Changed', :is_default => false) + assert_nil Enumeration.default('IPRI') + end + + def test_change_default + e = Enumeration.find_by_name('Urgent') + e.update_attributes(:name => 'Urgent', :is_default => true) + assert_equal e, Enumeration.default('IPRI') + end + def test_destroy_with_reassign Enumeration.find(4).destroy(Enumeration.find(6)) assert_nil Issue.find(:first, :conditions => {:priority_id => 4}) diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index b931501a1..319a1c2f4 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -158,4 +158,10 @@ class UserTest < Test::Unit::TestCase @jsmith.pref.comments_sorting = 'desc' assert @jsmith.wants_comments_in_reverse_order? end + + def test_find_by_mail_should_be_case_insensitive + u = User.find_by_mail('JSmith@somenet.foo') + assert_not_nil u + assert_equal 'jsmith@somenet.foo', u.mail + end end