Compare commits

..

1 Commits
1.1.1 ... 1.1.0

Author SHA1 Message Date
Jean-Philippe Lang
17517575ec tagged version 1.1.0
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/1.1.0@4672 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-09 16:27:39 +00:00
122 changed files with 502 additions and 10389 deletions

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>1.1-stable</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.rubypeople.rdt.core.rubybuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.ide.project.nature.web</nature>
<nature>org.rubypeople.rdt.core.rubynature</nature>
<nature>org.radrails.rails.core.railsnature</nature>
</natures>
</projectDescription>

View File

@@ -28,7 +28,6 @@ class IssueRelationsController < ApplicationController
respond_to do |format|
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
format.js do
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
render :update do |page|
page.replace_html "relations", :partial => 'issues/relations'
if @relation.errors.empty?
@@ -48,10 +47,7 @@ class IssueRelationsController < ApplicationController
end
respond_to do |format|
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
format.js {
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'}
}
format.js { render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'} }
end
end

View File

@@ -108,7 +108,6 @@ class IssuesController < ApplicationController
@journals.reverse! if User.current.wants_comments_in_reverse_order?
@changesets = @issue.changesets.visible.all
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@priorities = IssuePriority.all

View File

@@ -139,7 +139,6 @@ class RepositoriesController < ApplicationController
end
def revision
raise ChangesetNotFound if @rev.nil? || @rev.empty?
@changeset = @repository.find_changeset_by_name(@rev)
raise ChangesetNotFound unless @changeset
@@ -225,7 +224,7 @@ class RepositoriesController < ApplicationController
end
def show_error_not_found
render_error :message => l(:error_scm_not_found), :status => 404
render_error l(:error_scm_not_found)
end
# Handler for Redmine::Scm::Adapters::CommandFailed exception

View File

@@ -91,13 +91,12 @@ class Repository < ActiveRecord::Base
def relative_path(path)
path
end
# Finds and returns a revision with a number or the beginning of a hash
def find_changeset_by_name(name)
return nil if name.blank?
changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%']))
end
def latest_changeset
@latest_changeset ||= changesets.find(:first)
end

View File

@@ -66,9 +66,6 @@ class TimeEntry < ActiveRecord::Base
# these attributes make time aggregations easier
def spent_on=(date)
super
if spent_on.is_a?(Time)
self.spent_on = spent_on.to_date
end
self.tyear = spent_on ? spent_on.year : nil
self.tmonth = spent_on ? spent_on.month : nil
self.tweek = spent_on ? Date.civil(spent_on.year, spent_on.month, spent_on.day).cweek : nil

View File

@@ -261,16 +261,12 @@ class User < Principal
notified_projects_ids
end
def valid_notification_options
self.class.valid_notification_options(self)
end
# Only users that belong to more than 1 project can select projects for which they are notified
def self.valid_notification_options(user=nil)
def valid_notification_options
# Note that @user.membership.size would fail since AR ignores
# :include association option when doing a count
if user.nil? || user.memberships.length < 1
MAIL_NOTIFICATION_OPTIONS.reject {|option| option.first == 'selected'}
if memberships.length < 1
MAIL_NOTIFICATION_OPTIONS.delete_if {|option| option.first == 'selected'}
else
MAIL_NOTIFICATION_OPTIONS
end
@@ -423,12 +419,7 @@ class User < Principal
when 'all'
true
when 'selected'
# user receives notifications for created/assigned issues on unselected projects
if object.is_a?(Issue) && (object.author == self || object.assigned_to == self)
true
else
false
end
# Handled by the Project
when 'none'
false
when 'only_my_events'

View File

@@ -45,11 +45,11 @@ class Wiki < ActiveRecord::Base
# find the page with the given title
def find_page(title, options = {})
title = start_page if title.blank?
title = Wiki.titleize(title)
page = pages.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title])
title = Wiki.titleize(title).downcase
page = pages.first(:conditions => ["LOWER(title) LIKE ?", title])
if !page && !(options[:with_redirect] == false)
# search for a redirect
redirect = redirects.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title])
redirect = redirects.first(:conditions => ["LOWER(title) LIKE ?", title])
page = find_page(redirect.redirects_to, :with_redirect => false) if redirect
end
page

View File

@@ -6,9 +6,9 @@
<p><strong><%=l(:label_related_issues)%></strong></p>
<% if @relations.present? %>
<% if @issue.relations.any? %>
<table style="width:100%">
<% @relations.each do |relation| %>
<% @issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation| %>
<tr>
<td><%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
<%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %>

View File

@@ -26,10 +26,10 @@ api.issue do
render_api_issue_children(@issue, api) if include_in_api_response?('children')
api.array :relations do
@relations.each do |relation|
@issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation|
api.relation(:id => relation.id, :issue_id => relation.other_issue(@issue).id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay)
end
end if include_in_api_response?('relations') && @relations.present?
end if include_in_api_response?('relations')
api.array :changesets do
@issue.changesets.each do |changeset|

View File

@@ -56,8 +56,8 @@
<div class="splitcontentright">
<% if roles.any? && principals.any? %>
<% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post,
:loading => '$(\'member-add-submit\').disable();',
:complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();') do |f| %>
:loading => "$('member-add-submit').disable()",
:complete => "$('member-add-submit').enable()") do |f| %>
<fieldset><legend><%=l(:label_member_new)%></legend>
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>

View File

@@ -8,7 +8,7 @@
<p><%= setting_check_box :plain_text_mail %></p>
<p><%= setting_select(:default_notification_option, User.valid_notification_options.collect {|o| [l(o.last), o.first.to_s]}) %></p>
<p><%= setting_select(:default_notification_option, User::MAIL_NOTIFICATION_OPTIONS.collect {|o| [l(o.last), o.first.to_s]}) %></p>
</div>

View File

@@ -51,7 +51,6 @@ Rails::Initializer.run do |config|
config.action_mailer.perform_deliveries = false
config.gem 'rubytree', :lib => 'tree'
config.gem 'coderay', :version => '~>0.9.7'
# Load any local configuration that is kept out of source control
# (e.g. gems, patches).

View File

@@ -1,12 +1,11 @@
bg:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
date:
formats:
# Use the strftime parameters for formats.
# When no format has been given, it uses default.
# You can provide other formats here if you like!
default: "%d-%m-%Y"
default: "%Y-%m-%d"
short: "%b %d"
long: "%B %d, %Y"
@@ -66,13 +65,12 @@ bg:
other: "почти %{count} години"
number:
# Default format for numbers
format:
separator: "."
delimiter: ""
precision: 3
human:
format:
human:
format:
precision: 1
delimiter: ""
storage_units:
@@ -85,8 +83,7 @@ bg:
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence.
support:
array:
@@ -97,8 +94,8 @@ bg:
errors:
template:
header:
one: "1 грешка попречи този %{model} да бъде записан"
other: "%{count} грешки попречиха този %{model} да бъде записан"
one: "1 error prohibited this %{model} from being saved"
other: "%{count} errors prohibited this %{model} from being saved"
messages:
inclusion: "не съществува в списъка"
exclusion: "е запазено"
@@ -123,7 +120,6 @@ bg:
greater_than_start_date: "трябва да е след началната дата"
not_same_project: "не е от същия проект"
circular_dependency: "Тази релация ще доведе до безкрайна зависимост"
cant_link_an_issue_with_a_descendant: "Една задача не може да бъде свързвана към своя подзадача"
actionview_instancetag_blank_option: Изберете
@@ -154,61 +150,24 @@ bg:
notice_file_not_found: Несъществуваща или преместена страница.
notice_locking_conflict: Друг потребител променя тези данни в момента.
notice_not_authorized: Нямате право на достъп до тази страница.
notice_not_authorized_archived_project: Проектът, който се опитвате да видите е архивиран.
notice_email_sent: "Изпратен e-mail на %{value}"
notice_email_error: "Грешка при изпращане на e-mail (%{value})"
notice_feeds_access_key_reseted: Вашия ключ за RSS достъп беше променен.
notice_api_access_key_reseted: Вашият API ключ за достъп беше изчистен.
notice_failed_to_save_issues: "Неуспешен запис на %{count} задачи от %{total} избрани: %{ids}."
notice_failed_to_save_members: "Невъзможност за запис на член(ове): %{errors}."
notice_no_issue_selected: "Няма избрани задачи."
notice_account_pending: "Профилът Ви е създаден и очаква одобрение от администратор."
notice_default_data_loaded: Примерната информация е заредена успешно.
notice_unable_delete_version: Невъзможност за изтриване на версия
notice_unable_delete_time_entry: Невъзможност за изтриване на запис на time log.
notice_issue_done_ratios_updated: Обновен процент на завършените задачи.
notice_gantt_chart_truncated: Мрежовият график е съкратен, понеже броят на обектите, които могат да бъдат показани е твърде голям (%{max})
error_can_t_load_default_data: "Грешка при зареждане на примерната информация: %{value}"
error_scm_not_found: Несъществуващ обект в хранилището.
error_scm_command_failed: "Грешка при опит за комуникация с хранилище: %{value}"
error_scm_annotate: "Обектът не съществува или не може да бъде анотиран."
error_issue_not_found_in_project: 'Задачата не е намерена или не принадлежи на този проект'
error_no_tracker_in_project: Няма асоциирани тракери с този проект. Проверете настройките на проекта.
error_no_default_issue_status: Няма установено подразбиращо се състояние за задачите. Моля проверете вашата конфигурация (Вижте "Администрация -> Състояния на задачи").
error_can_not_delete_custom_field: Невъзможност за изтриване на потребителско поле
error_can_not_delete_tracker: Този тракер съдържа задачи и не може да бъде изтрит.
error_can_not_remove_role: Тази роля се използва и не може да бъде изтрита.
error_can_not_reopen_issue_on_closed_version: Задача, асоциирана със затворена версия не може да бъде отворена отново
error_can_not_archive_project: Този проект не може да бъде архивиран
error_issue_done_ratios_not_updated: Процентът на завършените задачи не е обновен.
error_workflow_copy_source: Моля изберете source тракер или роля
error_workflow_copy_target: Моля изберете тракер(и) и роля (роли).
error_unable_delete_issue_status: Невъзможност за изтриване на състояние на задача
error_unable_to_connect: Невъзможност за свързване с (%{value})
warning_attachments_not_saved: "%{count} файла не бяха записани."
mail_subject_lost_password: "Вашата парола (%{value})"
mail_body_lost_password: 'За да смените паролата си, използвайте следния линк:'
mail_subject_register: "Активация на профил (%{value})"
mail_body_register: 'За да активирате профила си използвайте следния линк:'
mail_body_account_information_external: "Можете да използвате вашия %{value} профил за вход."
mail_body_account_information: Информацията за профила ви
mail_subject_account_activation_request: "Заявка за активиране на профил в %{value}"
mail_body_account_activation_request: "Има новорегистриран потребител (%{value}), очакващ вашето одобрение:"
mail_subject_reminder: "%{count} задачи с краен срок с следващите %{days} дни"
mail_body_reminder: "%{count} задачи, назначени на вас са с краен срок в следващите %{days} дни:"
mail_subject_wiki_content_added: "Wiki страницата '%{id}' беше добавена"
mail_body_wiki_content_added: Wiki страницата '%{id}' беше добавена от %{author}.
mail_subject_wiki_content_updated: "Wiki страницата '%{id}' не беше обновена"
mail_body_wiki_content_updated: Wiki страницата '%{id}' беше обновена от %{author}.
gui_validation_error: 1 грешка
gui_validation_error_plural: "%{count} грешки"
field_name: Име
field_description: Описание
field_summary: Анотация
field_summary: Групиран изглед
field_is_required: Задължително
field_firstname: Име
field_lastname: Фамилия
@@ -241,7 +200,6 @@ bg:
field_priority: Приоритет
field_fixed_version: Планувана версия
field_user: Потребител
field_principal: Principal
field_role: Роля
field_homepage: Начална страница
field_is_public: Публичен
@@ -267,7 +225,6 @@ bg:
field_attr_lastname: Атрибут Фамилия (Lastname)
field_attr_mail: Атрибут Email
field_onthefly: Динамично създаване на потребител
field_start_date: Начална дата
field_done_ratio: % Прогрес
field_auth_source: Начин на оторизация
field_hide_mail: Скрий e-mail адреса ми
@@ -285,24 +242,7 @@ bg:
field_assignable: Възможно е възлагане на задачи за тази роля
field_redirect_existing_links: Пренасочване на съществуващи линкове
field_estimated_hours: Изчислено време
field_column_names: Колони
field_time_entries: Log time
field_time_zone: Часова зона
field_searchable: С възможност за търсене
field_default_value: Стойност по подразбиране
field_comments_sorting: Сортиране на коментарите
field_parent_title: Родителска страница
field_editable: Editable
field_watcher: Наблюдател
field_identity_url: OpenID URL
field_content: Съдържание
field_group_by: Групиране на резултатите по
field_sharing: Sharing
field_parent_issue: Родителска задача
field_member_of_group: Член на група
field_assigned_to_role: Assignee's role
field_text: Текстово поле
field_visible: Видим
setting_app_title: Заглавие
setting_app_subtitle: Описание
@@ -313,132 +253,26 @@ bg:
setting_attachment_max_size: Максимална големина на прикачен файл
setting_issues_export_limit: Максимален брой задачи за експорт
setting_mail_from: E-mail адрес за емисии
setting_bcc_recipients: Получатели на скрито копие (bcc)
setting_plain_text_mail: само чист текст (без HTML)
setting_host_name: Хост
setting_text_formatting: Форматиране на текста
setting_wiki_compression: Wiki компресиране на историята
setting_feeds_limit: Максимален брой за емисии
setting_default_projects_public: Новите проекти са публични по подразбиране
setting_autofetch_changesets: Автоматично обработване на ревизиите
setting_sys_api_enabled: Разрешаване на WS за управление
setting_commit_ref_keywords: Отбелязващи ключови думи
setting_commit_fix_keywords: Приключващи ключови думи
setting_autologin: Автоматичен вход
setting_date_format: Формат на датата
setting_time_format: Формат на часа
setting_cross_project_issue_relations: Релации на задачи между проекти
setting_issue_list_default_columns: Показвани колони по подразбиране
setting_repositories_encodings: Кодови таблици
setting_commit_logs_encoding: Кодова таблица на съобщенията при поверяване
setting_emails_header: Emails header
setting_emails_footer: Подтекст за e-mail
setting_protocol: Протокол
setting_per_page_options: Опции за страниране
setting_user_format: Потребителски формат
setting_activity_days_default: Брой дни показвани на таб Дейност
setting_display_subprojects_issues: Показване на подпроектите в проектите по подразбиране
setting_enabled_scm: Разрешена SCM
setting_mail_handler_body_delimiters: Отрязване на e-mail-ите след един от тези редове
setting_mail_handler_api_enabled: Разрешаване на WS за входящи e-mail-и
setting_mail_handler_api_key: API ключ
setting_sequential_project_identifiers: Генериране на последователни проектни идентификатори
setting_gravatar_enabled: Използване на портребителски икони от Gravatar
setting_gravatar_default: Подразбиращо се изображение от Gravatar
setting_diff_max_lines_displayed: Максимален брой показани diff редове
setting_file_max_size_displayed: Максимален размер на текстовите файлове, показвани inline
setting_repository_log_display_limit: Максимален брой на показванете ревизии в лог файла
setting_openid: Рарешаване на OpenID вход и регистрация
setting_password_min_length: Минимална дължина на парола
setting_new_project_user_role_id: Роля, давана на потребител, създаващ проекти, който не е администратор
setting_default_projects_modules: Активирани модули по подразбиране за нов проект
setting_issue_done_ratio: Изчисление на процента на готови задачи с
setting_issue_done_ratio_issue_field: Използване на поле '% Прогрес'
setting_issue_done_ratio_issue_status: Използване на състоянието на задачите
setting_start_of_week: Първи ден на седмицата
setting_rest_api_enabled: Разрешаване на REST web сървис
setting_cache_formatted_text: Cache formatted text
setting_default_notification_option: Подразбиращ се начин за известяване
setting_commit_logtime_enabled: Разрешаване на отчитането на работното време
setting_commit_logtime_activity_id: Дейност при отчитане на работното време
setting_gantt_items_limit: Максимален брой обекти, които да се показват в мрежов график
permission_add_project: Създаване на проект
permission_add_subprojects: Създаване на подпроекти
permission_edit_project: Редактиране на проект
permission_select_project_modules: Избор на проектни модули
permission_manage_members: Управление на членовете (на екип)
permission_manage_project_activities: Управление на дейностите на проекта
permission_manage_versions: Управление на версиите
permission_manage_categories: Управление на категориите
permission_view_issues: Разглеждане на задачите
permission_add_issues: Добавяне на задачи
permission_edit_issues: Редактиране на задачи
permission_manage_issue_relations: Управление на връзките между задачите
permission_add_issue_notes: Добаване на бележки
permission_edit_issue_notes: Редактиране на бележки
permission_edit_own_issue_notes: Редактиране на собствени бележки
permission_move_issues: Преместване на задачи
permission_delete_issues: Изтриване на задачи
permission_manage_public_queries: Управление на публичните заявки
permission_save_queries: Запис на запитвания (queries)
permission_view_gantt: Разглеждане на мрежов график
permission_view_calendar: Разглеждане на календари
permission_view_issue_watchers: Разглеждане на списък с наблюдатели
permission_add_issue_watchers: Добавяне на наблюдатели
permission_delete_issue_watchers: Изтриване на наблюдатели
permission_log_time: Log spent time
permission_view_time_entries: Разглеждане на изразходваното време
permission_edit_time_entries: Редактиране на time logs
permission_edit_own_time_entries: Редактиране на собствените time logs
permission_manage_news: Управление на новини
permission_comment_news: Коментиране на новини
permission_manage_documents: Управление на документи
permission_view_documents: Разглеждане на документи
permission_manage_files: Управление на файлове
permission_view_files: Разглеждане на файлове
permission_manage_wiki: Управление на wiki
permission_rename_wiki_pages: Преименуване на wiki страници
permission_delete_wiki_pages: Изтриване на wiki страници
permission_view_wiki_pages: Разглеждане на wiki
permission_view_wiki_edits: Разглеждане на wiki история
permission_edit_wiki_pages: Редактиране на wiki страници
permission_delete_wiki_pages_attachments: Изтриване на прикачени файлове към wiki страници
permission_protect_wiki_pages: Заключване на wiki страници
permission_manage_repository: Управление на хранилища
permission_browse_repository: Разглеждане на хранилища
permission_view_changesets: Разглеждане на changesets
permission_commit_access: Поверяване
permission_manage_boards: Управление на boards
permission_view_messages: Разглеждане на съобщения
permission_add_messages: Публикуване на съобщения
permission_edit_messages: Редактиране на съобщения
permission_edit_own_messages: Редактиране на собствени съобщения
permission_delete_messages: Изтриване на съобщения
permission_delete_own_messages: Изтриване на собствени съобщения
permission_export_wiki_pages: Експорт на wiki страници
permission_manage_subtasks: Управление на подзадачите
project_module_issue_tracking: Тракинг
project_module_time_tracking: Отделяне на време
project_module_news: Новини
project_module_documents: Документи
project_module_files: Файлове
project_module_wiki: Wiki
project_module_repository: Хранилище
project_module_boards: Форуми
project_module_calendar: Календар
project_module_gantt: Мрежов график
label_user: Потребител
label_user_plural: Потребители
label_user_new: Нов потребител
label_user_anonymous: Анонимен
label_project: Проект
label_project_new: Нов проект
label_project_plural: Проекти
label_x_projects:
zero: 0 проекта
zero: 0 проекти
one: 1 проект
other: "%{count} проекта"
label_project_all: Всички проекти
@@ -447,13 +281,9 @@ bg:
label_issue_new: Нова задача
label_issue_plural: Задачи
label_issue_view_all: Всички задачи
label_issues_by: "Задачи по %{value}"
label_issue_added: Добавена задача
label_issue_updated: Обновена задача
label_document: Документ
label_document_new: Нов документ
label_document_plural: Документи
label_document_added: Добавен документ
label_role: Роля
label_role_plural: Роли
label_role_new: Нова роля
@@ -480,13 +310,11 @@ bg:
label_information_plural: Информация
label_please_login: Вход
label_register: Регистрация
label_login_with_open_id_option: или вход чрез OpenID
label_password_lost: Забравена парола
label_home: Начало
label_my_page: Лична страница
label_my_account: Профил
label_my_projects: Проекти, в които участвам
label_my_page_block: Блокове в личната страница
label_administration: Администрация
label_login: Вход
label_logout: Изход
@@ -496,8 +324,6 @@ bg:
label_last_login: Последно свързване
label_registered_on: Регистрация
label_activity: Дейност
label_overall_activity: Цялостна дейност
label_user_activity: "Активност на %{value}"
label_new: Нов
label_logged_as: Здравейте,
label_environment: Среда
@@ -506,13 +332,10 @@ bg:
label_auth_source_new: Нов начин на оторизация
label_auth_source_plural: Начини на оторизация
label_subproject_plural: Подпроекти
label_subproject_new: Нов подпроект
label_and_its_subprojects: "%{value} и неговите подпроекти"
label_min_max_length: Минимална - максимална дължина
label_list: Списък
label_date: Дата
label_integer: Целочислен
label_float: Дробно
label_boolean: Чекбокс
label_string: Текст
label_text: Дълъг текст
@@ -527,7 +350,6 @@ bg:
label_attachment_new: Нов файл
label_attachment_delete: Изтриване
label_attachment_plural: Файлове
label_file_added: Добавен файл
label_report: Справка
label_report_plural: Справки
label_news: Новини
@@ -535,13 +357,11 @@ bg:
label_news_plural: Новини
label_news_latest: Последни новини
label_news_view_all: Виж всички
label_news_added: Добавена новина
label_settings: Настройки
label_overview: Общ изглед
label_version: Версия
label_version_new: Нова версия
label_version_plural: Версии
label_close_versions: Затваряне на завършените версии
label_confirmation: Одобрение
label_export_to: Експорт към
label_read: Read...
@@ -568,7 +388,6 @@ bg:
label_new_statuses_allowed: Позволени състояния
label_all: всички
label_none: никакви
label_nobody: никой
label_next: Следващ
label_previous: Предишен
label_used_by: Използва се от
@@ -600,19 +419,9 @@ bg:
label_not_equals: не е
label_in_less_than: след по-малко от
label_in_more_than: след повече от
label_greater_or_equal: ">="
label_less_or_equal: <=
label_in: в следващите
label_today: днес
label_all_time: всички
label_yesterday: вчера
label_this_week: тази седмица
label_last_week: последната седмица
label_last_n_days: "последните %{count} дни"
label_this_month: текущия месец
label_last_month: последния месец
label_this_year: текущата година
label_date_range: Период
label_less_than_ago: преди по-малко от
label_more_than_ago: преди повече от
label_ago: преди
@@ -620,25 +429,17 @@ bg:
label_not_contains: не съдържа
label_day_plural: дни
label_repository: Хранилище
label_repository_plural: Хранилища
label_browse: Разглеждане
label_modification: "%{count} промяна"
label_modification_plural: "%{count} промени"
label_branch: работен вариант
label_tag: Версия
label_revision: Ревизия
label_revision_plural: Ревизии
label_revision_id: Ревизия %{value}
label_associated_revisions: Асоциирани ревизии
label_added: добавено
label_modified: променено
label_copied: копирано
label_renamed: преименувано
label_deleted: изтрито
label_latest_revision: Последна ревизия
label_latest_revision_plural: Последни ревизии
label_view_revisions: Виж ревизиите
label_view_all_revisions: Разглеждане на всички ревизии
label_max_size: Максимална големина
label_sort_highest: Премести най-горе
label_sort_higher: Премести по-горе
@@ -664,7 +465,6 @@ bg:
label_changes_details: Подробни промени
label_issue_tracking: Тракинг
label_spent_time: Отделено време
label_overall_spent_time: Общо употребено време
label_f_hour: "%{value} час"
label_f_hour_plural: "%{value} часа"
label_time_tracking: Отделяне на време
@@ -686,7 +486,6 @@ bg:
label_relation_delete: Изтриване на релация
label_relates_to: свързана със
label_duplicates: дублира
label_duplicated_by: дублирана от
label_blocks: блокира
label_blocked_by: блокирана от
label_precedes: предшества
@@ -702,13 +501,10 @@ bg:
label_board: Форум
label_board_new: Нов форум
label_board_plural: Форуми
label_board_locked: Заключена
label_board_sticky: Sticky
label_topic_plural: Теми
label_message_plural: Съобщения
label_message_last: Последно съобщение
label_message_new: Нова тема
label_message_posted: Добавено съобщение
label_reply_plural: Отговори
label_send_information: Изпращане на информацията до потребителя
label_year: Година
@@ -719,81 +515,12 @@ bg:
label_language_based: В зависимост от езика
label_sort_by: "Сортиране по %{value}"
label_send_test_email: Изпращане на тестов e-mail
label_feeds_access_key: RSS access ключ
label_missing_feeds_access_key: Липсващ RSS ключ за достъп
label_feeds_access_key_created_on: "%{value} от създаването на RSS ключа"
label_module_plural: Модули
label_added_time_by: "Публикувана от %{author} преди %{age}"
label_updated_time_by: "Обновена от %{author} преди %{age}"
label_updated_time: "Обновена преди %{value}"
label_jump_to_a_project: Проект...
label_file_plural: Файлове
label_changeset_plural: Ревизии
label_default_columns: По подразбиране
label_no_change_option: (Без промяна)
label_bulk_edit_selected_issues: Редактиране на задачи
label_theme: Тема
label_default: По подразбиране
label_search_titles_only: Само в заглавията
label_user_mail_option_all: "За всяко събитие в проектите, в които участвам"
label_user_mail_option_selected: "За всички събития само в избраните проекти..."
label_user_mail_option_none: "Само за наблюдавани или в които участвам (автор или назначени на мен)"
label_user_mail_option_only_my_events: Само за неща, в които съм включен/а
label_user_mail_option_only_assigned: Само за неща, назначени на мен
label_user_mail_option_only_owner: Само за неща, на които аз съм собственик
label_user_mail_no_self_notified: "Не искам известия за извършени от мен промени"
label_registration_activation_by_email: активиране на профила по email
label_registration_manual_activation: ръчно активиране
label_registration_automatic_activation: автоматично активиране
label_display_per_page: "На страница по: %{value}"
label_age: Възраст
label_change_properties: Промяна на настройки
label_general: Основни
label_more: Още
label_scm: SCM (Система за контрол на версиите)
label_plugins: Плъгини
label_ldap_authentication: LDAP оторизация
label_downloads_abbr: D/L
label_optional_description: Незадължително описание
label_add_another_file: Добавяне на друг файл
label_preferences: Предпочитания
label_chronological_order: Хронологичен ред
label_reverse_chronological_order: Обратен хронологичен ред
label_planning: Планиране
label_incoming_emails: Входящи e-mail-и
label_generate_key: Генериране на ключ
label_issue_watchers: Наблюдатели
label_example: Пример
label_display: Display
label_sort: Сортиране
label_ascending: Нарастващ
label_descending: Намаляващ
label_date_from_to: От %{start} до %{end}
label_wiki_content_added: Wiki страница беше добавена
label_wiki_content_updated: Wiki страница беше обновена
label_group: Група
label_group_plural: Групи
label_group_new: Нова група
label_time_entry_plural: Използвано време
label_version_sharing_none: Не споделен
label_version_sharing_descendants: С подпроекти
label_version_sharing_hierarchy: С проектна йерархия
label_version_sharing_tree: С дърво на проектите
label_version_sharing_system: С всички проекти
label_update_issue_done_ratios: Обновяване на процента на завършените задачи
label_copy_source: Източник
label_copy_target: Цел
label_copy_same_as_target: Също като целта
label_display_used_statuses_only: Показване само на състоянията, използвани от този тракер
label_api_access_key: API ключ за достъп
label_missing_api_access_key: Липсващ API ключ
label_api_access_key_created_on: API ключ за достъп е създаден преди %{value}
label_profile: Профил
label_subtask_plural: Подзадачи
label_project_copy_notifications: Изпращане на Send e-mail известия по време на копирането на проекта
label_principal_search: "Търсене на потребител или група:"
label_user_search: "Търсене на потребител:"
button_login: Вход
button_submit: Прикачване
button_save: Запис
@@ -801,10 +528,8 @@ bg:
button_uncheck_all: Изчистване на всички
button_delete: Изтриване
button_create: Създаване
button_create_and_continue: Създаване и продължаване
button_test: Тест
button_edit: Редакция
button_edit_associated_wikipage: "Редактиране на асоциираната Wiki страница: %{page_title}"
button_add: Добавяне
button_change: Промяна
button_apply: Приложи
@@ -815,7 +540,6 @@ bg:
button_list: Списък
button_view: Преглед
button_move: Преместване
button_move_and_follow: Преместване и продължаване
button_back: Назад
button_cancel: Отказ
button_activate: Активация
@@ -829,49 +553,26 @@ bg:
button_unarchive: Разархивиране
button_reset: Генериране наново
button_rename: Преименуване
button_change_password: Промяна на парола
button_copy: Копиране
button_copy_and_follow: Копиране и продължаване
button_annotate: Анотация
button_update: Обновяване
button_configure: Конфигуриране
button_quote: Цитат
button_duplicate: Дублиране
button_show: Показване
status_active: активен
status_registered: регистриран
status_locked: заключен
version_status_open: отворена
version_status_locked: заключена
version_status_closed: затворена
field_active: Активен
text_select_mail_notifications: Изберете събития за изпращане на e-mail.
text_regexp_info: пр. ^[A-Z0-9]+$
text_min_max_length_info: 0 - без ограничения
text_project_destroy_confirmation: Сигурни ли сте, че искате да изтриете проекта и данните в него?
text_subprojects_destroy_warning: "Неговите подпроекти: %{value} също ще бъдат изтрити."
text_workflow_edit: Изберете роля и тракер за да редактирате работния процес
text_are_you_sure: Сигурни ли сте?
text_are_you_sure_with_children: Изтриване на задачата и нейните подзадачи?
text_journal_changed: "%{label} променен от %{old} на %{new}"
text_journal_set_to: "%{label} установен на %{value}"
text_journal_deleted: "%{label} изтрит (%{old})"
text_journal_added: "Добавено %{label} %{value}"
text_tip_issue_begin_day: задача, започваща този ден
text_tip_issue_end_day: задача, завършваща този ден
text_tip_issue_begin_end_day: задача, започваща и завършваща този ден
text_tip_task_begin_day: задача започваща този ден
text_tip_task_end_day: задача завършваща този ден
text_tip_task_begin_end_day: задача започваща и завършваща този ден
text_project_identifier_info: 'Позволени са малки букви (a-z), цифри и тирета.<br />Невъзможна промяна след запис.'
text_caracters_maximum: "До %{count} символа."
text_caracters_minimum: "Минимум %{count} символа."
text_length_between: "От %{min} до %{max} символа."
text_tracker_no_workflow: Няма дефиниран работен процес за този тракер
text_unallowed_characters: Непозволени символи
text_comma_separated: Позволено е изброяване (с разделител запетая).
text_line_separated: Позволени са много стойности (по едно на ред).
text_issues_ref_in_commit_messages: Отбелязване и приключване на задачи от ревизии
text_issue_added: "Публикувана е нова задача с номер %{id} (от %{author})."
text_issue_updated: "Задача %{id} е обновена (от %{author})."
@@ -879,36 +580,7 @@ bg:
text_issue_category_destroy_question: "Има задачи (%{count}) обвързани с тази категория. Какво ще изберете?"
text_issue_category_destroy_assignments: Премахване на връзките с категорията
text_issue_category_reassign_to: Преобвързване с категория
text_user_mail_option: "За неизбраните проекти, ще получавате известия само за наблюдавани дейности или в които участвате (т.е. автор или назначени на мен)."
text_no_configuration_data: "Все още не са конфигурирани Роли, тракери, състояния на задачи и работен процес.\nСтрого се препоръчва зареждането на примерната информация. Веднъж заредена ще имате възможност да я редактирате."
text_load_default_configuration: Зареждане на примерна информация
text_status_changed_by_changeset: "Приложено с ревизия %{value}."
text_time_logged_by_changeset: Приложено в ревизия %{value}.
text_issues_destroy_confirmation: 'Сигурни ли сте, че искате да изтриете избраните задачи?'
text_select_project_modules: 'Изберете активните модули за този проект:'
text_default_administrator_account_changed: Сменен фабричния администраторски профил
text_file_repository_writable: Възможност за писане в хранилището с файлове
text_plugin_assets_writable: Папката на приставките е разрешена за запис
text_rmagick_available: Наличен RMagick (по избор)
text_destroy_time_entries_question: "%{hours} часа са отделени на задачите, които искате да изтриете. Какво избирате?"
text_destroy_time_entries: Изтриване на отделеното време
text_assign_time_entries_to_project: Прехвърляне на отделеното време към проект
text_reassign_time_entries: 'Прехвърляне на отделеното време към задача:'
text_user_wrote: "%{value} написа:"
text_enumeration_destroy_question: "%{count} обекта са свързани с тази стойност."
text_enumeration_category_reassign_to: 'Пресвържете ги към тази стойност:'
text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/configuration.yml и рестартирайте Redmine, за да ги разрешите."
text_repository_usernames_mapping: "Изберете или променете потребителите в Redmine, съответстващи на потребителите в дневника на хранилището (repository).\nПотребителите с еднакви имена в Redmine и хранилищата се съвместяват автоматично."
text_diff_truncated: '... Този diff не е пълен, понеже е надхвърля максималния размер, който може да бъде показан.'
text_custom_field_possible_values_info: 'Една стойност на ред'
text_wiki_page_destroy_question: Тази страница има %{descendants} страници деца и descendant(s). Какво желаете да правите?
text_wiki_page_nullify_children: Запазване на тези страници като коренни страници
text_wiki_page_destroy_children: Изтриване на страниците деца и всички техни descendants
text_wiki_page_reassign_children: Преназначаване на страниците деца на тази родителска страница
text_own_membership_delete_confirmation: "Вие сте на път да премахнете някои или всички ваши разрешения и е възможно след това да не можете да редактирате този проект.\nСигурен ли сте, че искате да продължите?"
text_zoom_in: Увеличаване
text_zoom_out: Намаляване
default_role_manager: Мениджър
default_role_developer: Разработчик
default_role_reporter: Публикуващ
@@ -930,9 +602,333 @@ bg:
default_priority_immediate: Веднага
default_activity_design: Дизайн
default_activity_development: Разработка
enumeration_issue_priorities: Приоритети на задачи
enumeration_doc_categories: Категории документи
enumeration_activities: Дейности (time tracking)
label_file_plural: Файлове
label_changeset_plural: Ревизии
field_column_names: Колони
label_default_columns: По подразбиране
setting_issue_list_default_columns: Показвани колони по подразбиране
setting_repositories_encodings: Кодови таблици
notice_no_issue_selected: "Няма избрани задачи."
label_bulk_edit_selected_issues: Редактиране на задачи
label_no_change_option: (Без промяна)
notice_failed_to_save_issues: "Неуспешен запис на %{count} задачи от %{total} избрани: %{ids}."
label_theme: Тема
label_default: По подразбиране
label_search_titles_only: Само в заглавията
label_nobody: никой
button_change_password: Промяна на парола
text_user_mail_option: "За неизбраните проекти, ще получавате известия само за наблюдавани дейности или в които участвате (т.е. автор или назначени на мен)."
label_user_mail_option_selected: "За всички събития само в избраните проекти..."
label_user_mail_option_all: "За всяко събитие в проектите, в които участвам"
label_user_mail_option_none: "Само за наблюдавани или в които участвам (автор или назначени на мен)"
setting_emails_footer: Подтекст за e-mail
label_float: Дробно
button_copy: Копиране
mail_body_account_information_external: "Можете да използвате вашия %{value} профил за вход."
mail_body_account_information: Информацията за профила ви
setting_protocol: Протокол
label_user_mail_no_self_notified: "Не искам известия за извършени от мен промени"
setting_time_format: Формат на часа
label_registration_activation_by_email: активиране на профила по email
mail_subject_account_activation_request: "Заявка за активиране на профил в %{value}"
mail_body_account_activation_request: "Има новорегистриран потребител (%{value}), очакващ вашето одобрение:"
label_registration_automatic_activation: автоматично активиране
label_registration_manual_activation: ръчно активиране
notice_account_pending: "Профилът Ви е създаден и очаква одобрение от администратор."
field_time_zone: Часова зона
text_caracters_minimum: "Минимум %{count} символа."
setting_bcc_recipients: Получатели на скрито копие (bcc)
button_annotate: Анотация
label_issues_by: "Задачи по %{value}"
field_searchable: С възможност за търсене
label_display_per_page: "На страница по: %{value}"
setting_per_page_options: Опции за страниране
label_age: Възраст
notice_default_data_loaded: Примерната информацията е успешно заредена.
text_load_default_configuration: Зареждане на примерна информация
text_no_configuration_data: "Все още не са конфигурирани Роли, тракери, състояния на задачи и работен процес.\nСтрого се препоръчва зареждането на примерната информация. Веднъж заредена ще имате възможност да я редактирате."
error_can_t_load_default_data: "Грешка при зареждане на примерната информация: %{value}"
button_update: Обновяване
label_change_properties: Промяна на настройки
label_general: Основни
label_repository_plural: Хранилища
label_associated_revisions: Асоциирани ревизии
setting_user_format: Потребителски формат
text_status_changed_by_changeset: "Приложено с ревизия %{value}."
label_more: Още
text_issues_destroy_confirmation: 'Сигурни ли сте, че искате да изтриете избраните задачи?'
label_scm: SCM (Система за контрол на кода)
text_select_project_modules: 'Изберете активните модули за този проект:'
label_issue_added: Добавена задача
label_issue_updated: Обновена задача
label_document_added: Добавен документ
label_message_posted: Добавено съобщение
label_file_added: Добавен файл
label_news_added: Добавена новина
project_module_boards: Форуми
project_module_issue_tracking: Тракинг
project_module_wiki: Wiki
project_module_files: Файлове
project_module_documents: Документи
project_module_repository: Хранилище
project_module_news: Новини
project_module_time_tracking: Отделяне на време
text_file_repository_writable: Възможност за писане в хранилището с файлове
text_default_administrator_account_changed: Сменен фабричния администраторски профил
text_rmagick_available: Наличен RMagick (по избор)
button_configure: Конфигуриране
label_plugins: Плъгини
label_ldap_authentication: LDAP оторизация
label_downloads_abbr: D/L
label_this_month: текущия месец
label_last_n_days: "последните %{count} дни"
label_all_time: всички
label_this_year: текущата година
label_date_range: Период
label_last_week: последната седмица
label_yesterday: вчера
label_last_month: последния месец
label_add_another_file: Добавяне на друг файл
label_optional_description: Незадължително описание
text_destroy_time_entries_question: "%{hours} часа са отделени на задачите, които искате да изтриете. Какво избирате?"
error_issue_not_found_in_project: 'Задачата не е намерена или не принадлежи на този проект'
text_assign_time_entries_to_project: Прехвърляне на отделеното време към проект
text_destroy_time_entries: Изтриване на отделеното време
text_reassign_time_entries: 'Прехвърляне на отделеното време към задача:'
setting_activity_days_default: Брой дни показвани на таб Дейност
label_chronological_order: Хронологичен ред
field_comments_sorting: Сортиране на коментарите
label_reverse_chronological_order: Обратен хронологичен ред
label_preferences: Предпочитания
setting_display_subprojects_issues: Показване на подпроектите в проектите по подразбиране
label_overall_activity: Цялостна дейност
setting_default_projects_public: Новите проекти са публични по подразбиране
error_scm_annotate: "Обектът не съществува или не може да бъде анотиран."
label_planning: Планиране
text_subprojects_destroy_warning: "Неговите подпроекти: %{value} също ще бъдат изтрити."
label_and_its_subprojects: "%{value} и неговите подпроекти"
mail_body_reminder: "%{count} задачи, назначени на вас са с краен срок в следващите %{days} дни:"
mail_subject_reminder: "%{count} задачи с краен срок с следващите %{days} дни"
text_user_wrote: "%{value} написа:"
label_duplicated_by: дублирана от
setting_enabled_scm: Разрешена SCM
text_enumeration_category_reassign_to: 'Пресвържете ги към тази стойност:'
text_enumeration_destroy_question: "%{count} обекта са свързани с тази стойност."
label_incoming_emails: Входящи e-mail-и
label_generate_key: Генериране на ключ
setting_mail_handler_api_enabled: Разрешаване на WS за входящи e-mail-и
setting_mail_handler_api_key: API ключ
text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/email.yml и рестартирайте Redmine, за да ги разрешите."
field_parent_title: Родителска страница
label_issue_watchers: Наблюдатели
setting_commit_logs_encoding: Кодова таблица на съобщенията при поверяване
button_quote: Цитат
setting_sequential_project_identifiers: Генериране на последователни проектни идентификатори
notice_unable_delete_version: Невъзможност за изтриване на версия
label_renamed: преименувано
label_copied: копирано
setting_plain_text_mail: само чист текст (без HTML)
permission_view_files: Разглеждане на файлове
permission_edit_issues: Редактиране на задачи
permission_edit_own_time_entries: Редактиране на собствените time logs
permission_manage_public_queries: Управление на публичните заявки
permission_add_issues: Добавяне на задачи
permission_log_time: Log spent time
permission_view_changesets: Разглеждане на changesets
permission_view_time_entries: Разглеждане на изразходваното време
permission_manage_versions: Управление на версиите
permission_manage_wiki: Управление на wiki
permission_manage_categories: Управление на категориите задачи
permission_protect_wiki_pages: Заключване на wiki страници
permission_comment_news: Коментиране на новини
permission_delete_messages: Изтриване на съобщения
permission_select_project_modules: Избор на проектни модули
permission_manage_documents: Управление на документи
permission_edit_wiki_pages: Редактиране на wiki страници
permission_add_issue_watchers: Добавяне на наблюдатели
permission_view_gantt: Разглеждане на мрежов график
permission_move_issues: Преместване на задачи
permission_manage_issue_relations: Управление на връзките между задачите
permission_delete_wiki_pages: Изтриване на wiki страници
permission_manage_boards: Управление на boards
permission_delete_wiki_pages_attachments: Изтриване на прикачени файлове
permission_view_wiki_edits: Разглеждане на wiki история
permission_add_messages: Публикуване на съобщения
permission_view_messages: Разглеждане на съобщения
permission_manage_files: Управление на файлове
permission_edit_issue_notes: Редактиране на бележки
permission_manage_news: Управление на новини
permission_view_calendar: Разглеждане на календари
permission_manage_members: Управление на членовете (на екип)
permission_edit_messages: Редактиране на съобщения
permission_delete_issues: Изтриване на задачи
permission_view_issue_watchers: Разглеждане на списък с наблюдатели
permission_manage_repository: Управление на хранилища
permission_commit_access: Поверяване
permission_browse_repository: Разглеждане на хранилища
permission_view_documents: Разглеждане на документи
permission_edit_project: Редактиране на проект
permission_add_issue_notes: Добаване на бележки
permission_save_queries: Запис на запитвания (queries)
permission_view_wiki_pages: Разглеждане на wiki
permission_rename_wiki_pages: Преименуване на wiki страници
permission_edit_time_entries: Редактиране на time logs
permission_edit_own_issue_notes: Редактиране на собствени бележки
setting_gravatar_enabled: Използване на портребителски икони от Gravatar
label_example: Пример
text_repository_usernames_mapping: "Select ou 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."
permission_edit_own_messages: Редактиране на собствени съобщения
permission_delete_own_messages: Изтриване на собствени съобщения
label_user_activity: "Активност на %{value}"
label_updated_time_by: "Обновена от %{author} преди %{age}"
text_diff_truncated: '... Този diff не е пълен, понеже е надхвърля максималния размер, който може да бъде показан.'
setting_diff_max_lines_displayed: Максимален брой показани diff редове
text_plugin_assets_writable: Папката на приставките е разрешена за запис
warning_attachments_not_saved: "%{count} файла не бяха записани."
button_create_and_continue: Създаване и продължаване
text_custom_field_possible_values_info: 'Една стойност на ред'
label_display: Display
field_editable: Editable
setting_repository_log_display_limit: Максимален брой на показванете ревизии в лог файла
setting_file_max_size_displayed: Максимален размер на текстовите файлове, показвани inline
field_watcher: Наблюдател
setting_openid: Рарешаване на OpenID вход и регистрация
field_identity_url: OpenID URL
label_login_with_open_id_option: или вход чрез OpenID
field_content: Съдържание
label_descending: Намаляващ
label_sort: Сортиране
label_ascending: Нарастващ
label_date_from_to: От %{start} до %{end}
label_greater_or_equal: ">="
label_less_or_equal: <=
text_wiki_page_destroy_question: Тази страница има %{descendants} страници деца и descendant(s). Какво желаете да правите?
text_wiki_page_reassign_children: Преназначаване на страниците деца на тази родителска страница
text_wiki_page_nullify_children: Запазване на тези страници като коренни страници
text_wiki_page_destroy_children: Изтриване на страниците деца и всички техни descendants
setting_password_min_length: Минимална дължина на парола
field_group_by: Групиране на резултатите по
mail_subject_wiki_content_updated: "Wiki страницата '%{id}' не беше обновена"
label_wiki_content_added: Wiki страница беше добавена
mail_subject_wiki_content_added: "Wiki страницата '%{id}' беше добавена"
mail_body_wiki_content_added: Wiki страницата '%{id}' беше добавена от %{author}.
label_wiki_content_updated: Wiki страница беше обновена
mail_body_wiki_content_updated: Wiki страницата '%{id}' беше обновена от %{author}.
permission_add_project: Създаване на проект
setting_new_project_user_role_id: Роля, давана на потребител, създаващ проекти, който не е администратор
label_view_all_revisions: Разглеждане на всички ревизии
label_tag: Версия
label_branch: работен вариант
error_no_tracker_in_project: Няма асоциирани тракери с този проект. Проверете настройките на проекта.
error_no_default_issue_status: Няма установено подразбиращо се състояние за задачите. Моля проверете вашата конфигурация (Вижте "Администрация -> Състояния на задачи").
text_journal_changed: "%{label} променен от %{old} на %{new}"
text_journal_set_to: "%{label} установен на %{value}"
text_journal_deleted: "%{label} изтрит (%{old})"
label_group_plural: Групи
label_group: Група
label_group_new: Нова група
label_time_entry_plural: Използвано време
text_journal_added: "Добавено %{label} %{value}"
field_active: Активен
enumeration_system_activity: Системна активност
permission_delete_issue_watchers: Изтриване на наблюдатели
version_status_closed: затворена
version_status_locked: заключена
version_status_open: отворена
error_can_not_reopen_issue_on_closed_version: Задача, асоциирана със затворена версия не може да бъде отворена отново
label_user_anonymous: Анонимен
button_move_and_follow: Преместване и продължаване
setting_default_projects_modules: Активирани модули по подразбиране за нов проект
setting_gravatar_default: Подразбиращо се изображение от Gravatar
field_sharing: Sharing
label_version_sharing_hierarchy: С проектна йерархия
label_version_sharing_system: С всички проекти
label_version_sharing_descendants: С подпроекти
label_version_sharing_tree: С дърво на проектите
label_version_sharing_none: Не споделен
error_can_not_archive_project: Този проект не може да бъде архивиран
button_duplicate: Дублиране
button_copy_and_follow: Копиране и продължаване
label_copy_source: Източник
setting_issue_done_ratio: Изчисление на процента на готови задачи с
setting_issue_done_ratio_issue_status: Използване на състоянието на задачите
error_issue_done_ratios_not_updated: Процентът на завършените задачи не е обновен.
error_workflow_copy_target: Моля изберете тракер(и) и роля (роли).
setting_issue_done_ratio_issue_field: Използване на поле '% Прогрес'
label_copy_same_as_target: Също като целта
label_copy_target: Цел
notice_issue_done_ratios_updated: Обновен процент на завършените задачи.
error_workflow_copy_source: Моля изберете source тракер или роля
label_update_issue_done_ratios: Обновяване на процента на завършените задачи
setting_start_of_week: Първи ден на седмицата
permission_view_issues: Разглеждане на задачите
label_display_used_statuses_only: Показване само на състоянията, използвани от този тракер
label_revision_id: Ревизия %{value}
label_api_access_key: API ключ за достъп
label_api_access_key_created_on: API ключ за достъп е създаден преди %{value}
label_feeds_access_key: RSS access ключ
notice_api_access_key_reseted: Вашият API ключ за достъп беше изчистен.
setting_rest_api_enabled: Разрешаване на REST web сървис
label_missing_api_access_key: Липсващ API ключ
label_missing_feeds_access_key: Липсващ RSS ключ за достъп
button_show: Показване
text_line_separated: Позволени са много стойности (по едно на ред).
setting_mail_handler_body_delimiters: Отрязване на e-mail-ите след един от тези редове
permission_add_subprojects: Създаване на подпроекти
label_subproject_new: Нов подпроект
text_own_membership_delete_confirmation: |-
Вие сте на път да премахнете някои или всички ваши разрешения и е възможно след това на да не можете да редатирате този проект.
Сигурен ли сте, че искате да продължите?
label_close_versions: Затваряне на завършените версии
label_board_sticky: Sticky
label_board_locked: Заключена
permission_export_wiki_pages: Експорт на wiki страници
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Управление на дейностите на проекта
error_unable_delete_issue_status: Невъзможност за изтриване на състояние на задача
label_profile: Профил
permission_manage_subtasks: Управление на подзадачите
field_parent_issue: Родителска задача
label_subtask_plural: Подзадачи
label_project_copy_notifications: Изпращане на Send e-mail известия по време на копирането на проекта
error_can_not_delete_custom_field: Невъзможност за изтриване на потребителско поле
error_unable_to_connect: Невъзможност за свързване с (%{value})
error_can_not_remove_role: Тази роля се използва и не може да бъде изтрита.
error_can_not_delete_tracker: Този тракер съдържа задачи и не може да бъде изтрит.
field_principal: Principal
label_my_page_block: Блокове в личната страница
notice_failed_to_save_members: "Невъзможност за запис на член(ове): %{errors}."
text_zoom_out: Намаляване
text_zoom_in: Увеличаване
notice_unable_delete_time_entry: Невъзможност за изтриване на запис на time log.
label_overall_spent_time: Общо употребено време
field_time_entries: Log time
notice_not_authorized_archived_project: Проектът, който се опитвате да видите е архивиран.
text_tip_issue_end_day: задача, завършваща този ден
field_text: Текстово поле
label_user_mail_option_only_owner: Само за неща, на които аз съм собственик
field_member_of_group: Член на група
project_module_gantt: Мрежов график
text_are_you_sure_with_children: Изтриване на задачата и нейните подзадачи?
text_tip_issue_begin_end_day: задача, започваща и завършваща този ден
setting_default_notification_option: Подразбиращ се начин за известяване
project_module_calendar: Календар
label_user_mail_option_only_my_events: Само за неща, в които съм включен/а
text_tip_issue_begin_day: задача, започваща този ден
label_user_mail_option_only_assigned: Само за неща, назначени на мен
button_edit_associated_wikipage: "Редактиране на асоциираната Wiki страница: %{page_title}"
field_assigned_to_role: Assignee's role
field_start_date: Начална дата
label_principal_search: "Търсене на потребител или група:"
label_user_search: "Търсене на потребител:"
field_visible: Видим
setting_emails_header: Emails header
setting_commit_logtime_activity_id: Дейност при отчитане на работното време
text_time_logged_by_changeset: Приложено в ревизия %{value}.
setting_commit_logtime_enabled: Разрешаване на отчитането на работното време
notice_gantt_chart_truncated: Мрежовият график е съкратен, понеже броят на обектите, които могат да бъдат показани е твърде голям (%{max})
setting_gantt_items_limit: Максимален брой обекти, които да се показват в мрежов график

View File

@@ -546,7 +546,7 @@ cs:
label_relation_delete: Odstranit souvislost
label_relates_to: související s
label_duplicates: duplicity
label_blocks: blokuje
label_blocks: bloků
label_blocked_by: zablokován
label_precedes: předchází
label_follows: následuje

View File

@@ -166,7 +166,7 @@ fr:
notice_successful_create: Création effectuée avec succès.
notice_successful_update: Mise à jour effectuée avec succès.
notice_successful_delete: Suppression effectuée avec succès.
notice_successful_connection: Connexion réussie.
notice_successful_connection: Connection réussie.
notice_file_not_found: "La page à laquelle vous souhaitez accéder n'existe pas ou a été supprimée."
notice_locking_conflict: Les données ont été mises à jour par un autre utilisateur. Mise à jour impossible.
notice_not_authorized: "Vous n'êtes pas autorisés à accéder à cette page."
@@ -449,9 +449,6 @@ fr:
label_issue_view_all: Voir toutes les demandes
label_issue_added: Demande ajoutée
label_issue_updated: Demande mise à jour
label_issue_note_added: Note ajoutée
label_issue_status_updated: Statut changé
label_issue_priority_updated: Priorité changée
label_issues_by: "Demandes par %{value}"
label_document: Document
label_document_new: Nouveau document
@@ -489,7 +486,7 @@ fr:
label_my_page: Ma page
label_my_account: Mon compte
label_my_projects: Mes projets
label_my_page_block: Blocs disponibles
label_my_page_block: Ma page bloque
label_administration: Administration
label_login: Connexion
label_logout: Déconnexion

View File

@@ -275,9 +275,9 @@ nl:
field_user: Gebruiker
field_value: Waarde
field_version: Versie
general_csv_decimal_separator: ','
general_csv_decimal_separator: '.'
general_csv_encoding: ISO-8859-1
general_csv_separator: ';'
general_csv_separator: ','
general_first_day_of_week: '7'
general_lang_name: 'Nederlands'
general_pdf_encoding: ISO-8859-1

View File

@@ -208,7 +208,6 @@ sv:
notice_unable_delete_version: Denna version var inte möjlig att ta bort.
notice_unable_delete_time_entry: Tidloggning kunde inte tas bort.
notice_issue_done_ratios_updated: % klart uppdaterade.
notice_gantt_chart_truncated: "Schemat förminskades eftersom det överskrider det maximala antalet aktiviteter som får visas (%{max})"
error_can_t_load_default_data: "Standardkonfiguration gick inte att läsa in: %{value}"
error_scm_not_found: "Inlägg och/eller revision finns inte i detta versionsarkiv."
@@ -218,7 +217,7 @@ sv:
error_no_tracker_in_project: 'Ingen ärendetyp är associerad med projektet. Vänligen kontrollera projektinställningarna.'
error_no_default_issue_status: 'Ingen status är definierad som standard för nya ärenden. Vänligen kontrollera din konfiguration (Gå till "Administration -> Ärendestatus").'
error_can_not_delete_custom_field: Kan inte ta bort användardefinerat fält
error_can_not_delete_tracker: "Det finns ärenden av denna typ och den är därför inte möjlig att ta bort."
error_can_not_delete_tracker: Det finns ärenden av denna typ och den är därför inte möjlig att ta bort.
error_can_not_remove_role: "Denna roll används och den är därför inte möjlig att ta bort."
error_can_not_reopen_issue_on_closed_version: 'Ett ärende tilldelat en stängd version kan inte öppnas på nytt'
error_can_not_archive_project: Detta projekt kan inte arkiveras
@@ -226,7 +225,7 @@ sv:
error_workflow_copy_source: 'Vänligen välj källans ärendetyp eller roll'
error_workflow_copy_target: 'Vänligen välj ärendetyp(er) och roll(er) för mål'
error_unable_delete_issue_status: 'Ärendestatus kunde inte tas bort'
error_unable_to_connect: "Kan inte ansluta (%{value})"
error_unable_to_connect: Kan inte ansluta (%{value})
warning_attachments_not_saved: "%{count} fil(er) kunde inte sparas."
@@ -241,9 +240,9 @@ sv:
mail_subject_reminder: "%{count} ärende(n) har deadline under de kommande %{days} dagarna"
mail_body_reminder: "%{count} ärende(n) som är tilldelat dig har deadline under de %{days} dagarna:"
mail_subject_wiki_content_added: "'%{id}' wikisida has lagts till"
mail_body_wiki_content_added: "The '%{id}' wikisida has lagts till av %{author}."
mail_body_wiki_content_added: The '%{id}' wikisida has lagts till av %{author}.
mail_subject_wiki_content_updated: "'%{id}' wikisida har uppdaterats"
mail_body_wiki_content_updated: "The '%{id}' wikisida har uppdaterats av %{author}."
mail_body_wiki_content_updated: The '%{id}' wikisida har uppdaterats av %{author}.
gui_validation_error: 1 fel
gui_validation_error_plural: "%{count} fel"
@@ -341,8 +340,8 @@ sv:
field_group_by: Gruppera resultat efter
field_sharing: Delning
field_parent_issue: Förälderaktivitet
field_member_of_group: "Tilldelad användares grupp"
field_assigned_to_role: "Tilldelad användares roll"
field_member_of_group: Tilldelad användares grupp
field_assigned_to_role: Tilldelad användares roll
field_text: Textfält
field_visible: Synlig
@@ -381,7 +380,7 @@ sv:
setting_activity_days_default: Dagar som visas på projektaktivitet
setting_display_subprojects_issues: Visa ärenden från underprojekt i huvudprojekt
setting_enabled_scm: Aktivera SCM
setting_mail_handler_body_delimiters: "Trunkera mail efter en av följande rader"
setting_mail_handler_body_delimiters: Trunkera mail efter en av följande rader
setting_mail_handler_api_enabled: Aktivera WS för inkommande mail
setting_mail_handler_api_key: API-nyckel
setting_sequential_project_identifiers: Generera projektidentifierare sekventiellt
@@ -401,9 +400,6 @@ sv:
setting_rest_api_enabled: Aktivera REST webbtjänst
setting_cache_formatted_text: Cacha formaterad text
setting_default_notification_option: Standard notifieringsalternativ
setting_commit_logtime_enabled: Aktivera tidloggning
setting_commit_logtime_activity_id: Aktivitet för loggad tid
setting_gantt_items_limit: Maximalt antal aktiviteter som visas i gantt-schemat
permission_add_project: Skapa projekt
permission_add_subprojects: Skapa underprojekt
@@ -585,7 +581,7 @@ sv:
label_version_plural: Versioner
label_close_versions: Stäng klara versioner
label_confirmation: Bekräftelse
label_export_to: 'Finns även som:'
label_export_to: Exportera till
label_read: Läs...
label_public_projects: Publika projekt
label_open_issues: öppen
@@ -670,7 +666,7 @@ sv:
label_tag: Tag
label_revision: Revision
label_revision_plural: Revisioner
label_revision_id: "Revision %{value}"
label_revision_id: Revision %{value}
label_associated_revisions: Associerade revisioner
label_added: tillagd
label_modified: modifierad
@@ -779,10 +775,10 @@ sv:
label_search_titles_only: Sök endast i titlar
label_user_mail_option_all: "För alla händelser i mina projekt"
label_user_mail_option_selected: "För alla händelser i markerade projekt..."
label_user_mail_option_none: "Inga händelser"
label_user_mail_option_only_my_events: "Endast för saker jag bevakar eller är inblandad i"
label_user_mail_option_only_assigned: "Endast för saker jag är tilldelad"
label_user_mail_option_only_owner: "Endast för saker jag äger"
label_user_mail_option_none: Inga händelser
label_user_mail_option_only_my_events: Endast för saker jag bevakar eller är inblandad i
label_user_mail_option_only_assigned: Endast för saker jag är tilldelad
label_user_mail_option_only_owner: Endast för saker jag äger
label_user_mail_no_self_notified: "Jag vill inte bli underrättad om ändringar som jag har gjort"
label_registration_activation_by_email: kontoaktivering med mail
label_registration_manual_activation: manuell kontoaktivering
@@ -829,7 +825,7 @@ sv:
label_display_used_statuses_only: Visa endast status som används av denna ärendetyp
label_api_access_key: API-nyckel
label_missing_api_access_key: Saknar en API-nyckel
label_api_access_key_created_on: "API-nyckel skapad för %{value} sedan"
label_api_access_key_created_on: API-nyckel skapad för %{value} sedan
label_profile: Profil
label_subtask_plural: Underaktiviteter
label_project_copy_notifications: Skicka mailnotifieringar när projektet kopieras
@@ -925,7 +921,6 @@ sv:
text_no_configuration_data: "Roller, ärendetyper, ärendestatus och arbetsflöden har inte konfigurerats ännu.\nDet rekommenderas att läsa in standardkonfigurationen. Du kommer att kunna göra ändringar efter att den blivit inläst."
text_load_default_configuration: Läs in standardkonfiguration
text_status_changed_by_changeset: "Tilldelad i changeset %{value}."
text_time_logged_by_changeset: "Tilldelad i changeset %{value}."
text_issues_destroy_confirmation: 'Är du säker på att du vill radera markerade ärende(n) ?'
text_select_project_modules: 'Välj vilka moduler som ska vara aktiva för projektet:'
text_default_administrator_account_changed: Standardadministratörens konto ändrat
@@ -943,10 +938,10 @@ sv:
text_repository_usernames_mapping: "Välj eller uppdatera den Redmine-användare som är mappad till varje användarnamn i versionarkivloggen.\nAnvändare med samma användarnamn eller mailadress i både Redmine och versionsarkivet mappas automatiskt."
text_diff_truncated: '... Denna diff har förminskats eftersom den överskrider den maximala storlek som kan visas.'
text_custom_field_possible_values_info: 'Ett värde per rad'
text_wiki_page_destroy_question: "Denna sida har %{descendants} underliggande sidor. Vad vill du göra?"
text_wiki_page_nullify_children: "Behåll undersidor som rotsidor"
text_wiki_page_destroy_children: "Ta bort alla underliggande sidor"
text_wiki_page_reassign_children: "Flytta undersidor till denna föräldersida"
text_wiki_page_destroy_question: Denna sida har %{descendants} underliggande sidor. Vad vill du göra?
text_wiki_page_nullify_children: Behåll undersidor som rotsidor
text_wiki_page_destroy_children: Ta bort alla underliggande sidor
text_wiki_page_reassign_children: Flytta undersidor till denna föräldersida
text_own_membership_delete_confirmation: "Några av, eller alla, dina behörigheter kommer att tas bort och du kanske inte längre kommer kunna göra ändringar i det här projektet.\nVill du verkligen fortsätta?"
text_zoom_out: Zooma ut
text_zoom_in: Zooma in
@@ -977,3 +972,8 @@ sv:
enumeration_doc_categories: Dokumentkategorier
enumeration_activities: Aktiviteter (tidsuppföljning)
enumeration_system_activity: Systemaktivitet
setting_commit_logtime_activity_id: Activity for logged time
text_time_logged_by_changeset: Applied in changeset %{value}.
setting_commit_logtime_enabled: Enable time logging
notice_gantt_chart_truncated: The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart

View File

@@ -4,29 +4,6 @@ Redmine - project management software
Copyright (C) 2006-2011 Jean-Philippe Lang
http://www.redmine.org/
== 2011-01-30 v1.1.1
* Defect #4899: Redmine fails to list files for darcs repository
* Defect #7245: Wiki fails to find pages with cyrillic characters using postgresql
* Defect #7256: redmine/public/.htaccess must be moved for non-fastcgi installs/upgrades
* Defect #7258: Automatic spent time logging does not work properly with SQLite3
* Defect #7259: Released 1.1.0 uses "devel" label inside admin information
* Defect #7265: "Loading..." icon does not disappear after add project member
* Defect #7266: Test test_due_date_distance_in_words fail due to undefined locale
* Defect #7274: CSV value separator in dutch locale
* Defect #7277: Enabling gravatas causes usernames to overlap first name field in user list
* Defect #7294: "Notifiy for only project I select" is not available anymore in 1.1.0
* Defect #7307: HTTP 500 error on query for empty revision
* Defect #7313: Label not translated in french in Settings/Email Notification tab
* Defect #7329: <code class="javascript"> with long strings may hang server
* Defect #7337: My page french translation
* Defect #7348: French Translation of "Connection"
* Defect #7385: Error when viewing an issue which was related to a deleted subtask
* Defect #7386: NoMethodError on pdf export
* Defect #7415: Darcs adapter recognizes new files as modified files above Darcs 2.4
* Defect #7421: no email sent with 'Notifiy for any event on the selected projects only'
* Feature #5344: Update to latest CodeRay 0.9.x
== 2011-01-09 v1.1.0
* Defect #2038: Italics in wiki headers show-up wrong in the toc

View File

@@ -255,7 +255,7 @@ module Redmine
pdf.SetFontStyle('B',9)
pdf.Cell(35,5, l(:field_description) + ":")
pdf.SetFontStyle('',9)
pdf.MultiCell(155,5, issue.description.to_s,"BR")
pdf.MultiCell(155,5, issue.description,"BR")
pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)
@@ -271,7 +271,7 @@ module Redmine
pdf.Ln
unless changeset.comments.blank?
pdf.SetFontStyle('',8)
pdf.MultiCell(190,5, changeset.comments.to_s)
pdf.MultiCell(190,5, changeset.comments)
end
pdf.Ln
end
@@ -291,7 +291,7 @@ module Redmine
end
if journal.notes?
pdf.SetFontStyle('',8)
pdf.MultiCell(190,5, journal.notes.to_s)
pdf.MultiCell(190,5, journal.notes)
end
pdf.Ln
end

View File

@@ -31,14 +31,16 @@ module Redmine
end
def darcs_binary_version
darcsversion = darcs_binary_version_from_command_line
if m = darcsversion.match(%r{\A(.*?)((\d+\.)+\d+)})
m[2].scan(%r{\d+}).collect(&:to_i)
cmd = "#{DARCS_BIN} --version"
version = nil
shellout(cmd) do |io|
# Read darcs version in first returned line
if m = io.gets.match(%r{((\d+\.)+\d+)})
version = m[0].scan(%r{\d+}).collect(&:to_i)
end
end
end
def darcs_binary_version_from_command_line
shellout("#{DARCS_BIN} --version") { |io| io.read }.to_s
return nil if $? && $?.exitstatus != 0
version
end
end
@@ -62,9 +64,7 @@ module Redmine
# or nil if the given path doesn't exist in the repository
def entries(path=nil, identifier=nil)
path_prefix = (path.blank? ? '' : "#{path}/")
if path.blank?
path = ( self.class.client_version_above?([2, 2, 0]) ? @url : '.' )
end
path = '.' if path.blank?
entries = Entries.new
cmd = "#{DARCS_BIN} annotate --repodir #{shell_quote @url} --xml-output"
cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier
@@ -167,38 +167,9 @@ module Redmine
})
})
end
def get_paths_for_patch(hash)
paths = get_paths_for_patch_raw(hash)
if self.class.client_version_above?([2, 4])
orig_paths = paths
paths = []
add_paths = []
add_paths_name = []
mod_paths = []
other_paths = []
orig_paths.each do |path|
if path[:action] == 'A'
add_paths << path
add_paths_name << path[:path]
elsif path[:action] == 'M'
mod_paths << path
else
other_paths << path
end
end
add_paths_name.each do |add_path|
mod_paths.delete_if { |m| m[:path] == add_path }
end
paths.concat add_paths
paths.concat mod_paths
paths.concat other_paths
end
paths
end
# Retrieve changed paths for a single patch
def get_paths_for_patch_raw(hash)
def get_paths_for_patch(hash)
cmd = "#{DARCS_BIN} annotate --repodir #{shell_quote @url} --summary --xml-output"
cmd << " --match #{shell_quote("hash #{hash}")} "
paths = []

View File

@@ -4,13 +4,13 @@ module Redmine
module VERSION #:nodoc:
MAJOR = 1
MINOR = 1
TINY = 1
TINY = 0
# Branch values:
# * official release: nil
# * stable branch: stable
# * trunk: devel
BRANCH = 'stable'
BRANCH = 'devel'
def self.revision
revision = nil

View File

@@ -289,7 +289,7 @@ task :migrate_from_mantis => :environment do
project.versions.each do |version|
v = Version.new :name => encode(version.version),
:description => encode(version.description),
:effective_date => (version.date_order ? version.date_order.to_date : nil)
:effective_date => version.date_order.to_date
v.project = p
v.save
versions_map[version.id] = v.id

View File

@@ -40,15 +40,7 @@ namespace :test do
system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}"
end
desc "Creates a test mercurial repository"
task :mercurial => :create_dir do
repo_path = "tmp/test/mercurial_repository"
bundle_path = "test/fixtures/repositories/mercurial_repository.hg"
system "hg init #{repo_path}"
system "hg -R #{repo_path} pull #{bundle_path}"
end
(supported_scms - [:subversion, :mercurial]).each do |scm|
(supported_scms - [:subversion]).each do |scm|
desc "Creates a test #{scm} repository"
task scm => :create_dir do
system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test"

View File

@@ -914,8 +914,8 @@ h4 img.gravatar {
}
td.username img.gravatar {
margin: 0 0.5em 0 0;
vertical-align: top;
float: left;
margin: 0 1em 0 0;
}
#activity dt img.gravatar {

Binary file not shown.

View File

@@ -95,12 +95,4 @@ wiki_contents_009:
version: 1
author_id: 1
comments:
wiki_contents_010:
text: Page with cyrillic title
updated_on: 2007-03-08 00:18:07 +01:00
page_id: 10
id: 10
version: 1
author_id: 1
comments:

View File

@@ -62,10 +62,4 @@ wiki_pages_009:
wiki_id: 2
protected: false
parent_id: 8
wiki_pages_010:
created_on: 2007-03-08 00:18:07 +01:00
title: Этикаенеджмента
id: 10
wiki_id: 1
protected: false
parent_id:

View File

@@ -33,19 +33,6 @@ class IssueRelationsControllerTest < ActionController::TestCase
end
end
def test_new_xhr
assert_difference 'IssueRelation.count' do
@request.session[:user_id] = 3
xhr :post, :new,
:issue_id => 3,
:relation => {:issue_to_id => '1', :relation_type => 'relates', :delay => ''}
assert_select_rjs 'relations' do
assert_select 'table', 1
assert_select 'tr', 2 # relations
end
end
end
def test_new_should_accept_id_with_hash
assert_difference 'IssueRelation.count' do
@request.session[:user_id] = 3
@@ -81,20 +68,4 @@ class IssueRelationsControllerTest < ActionController::TestCase
post :destroy, :id => '2', :issue_id => '3'
end
end
def test_destroy_xhr
IssueRelation.create!(:relation_type => IssueRelation::TYPE_RELATES) do |r|
r.issue_from_id = 3
r.issue_to_id = 1
end
assert_difference 'IssueRelation.count', -1 do
@request.session[:user_id] = 3
xhr :post, :destroy, :id => '2', :issue_id => '3'
assert_select_rjs 'relations' do
assert_select 'table', 1
assert_select 'tr', 1 # relation left
end
end
end
end

View File

@@ -33,10 +33,9 @@ class RepositoriesGitControllerTest < ActionController::TestCase
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
User.current = nil
@repository = Repository::Git.create(:project => Project.find(3), :url => REPOSITORY_PATH)
assert @repository
Repository::Git.create(:project => Project.find(3), :url => REPOSITORY_PATH)
end
if File.directory?(REPOSITORY_PATH)
def test_show
get :show, :id => 3
@@ -127,11 +126,8 @@ class RepositoriesGitControllerTest < ActionController::TestCase
assert_not_nil assigns(:entry)
assert_equal 'sources', assigns(:entry).name
end
def test_diff
@repository.fetch_changesets
@repository.reload
# Full diff of changeset 2f9c0091
get :diff, :id => 3, :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
assert_response :success
@@ -142,21 +138,6 @@ class RepositoriesGitControllerTest < ActionController::TestCase
:sibling => { :tag => 'td',
:attributes => { :class => /diff_out/ },
:content => /def remove/ }
assert_tag :tag => 'h2', :content => /2f9c0091/
end
def test_diff_two_revs
@repository.fetch_changesets
@repository.reload
get :diff, :id => 3, :rev => '61b685fbe55ab05b5ac68402d5720c1a6ac973d1',
:rev_to => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
assert_response :success
assert_template 'diff'
diff = assigns(:diff)
assert_not_nil diff
assert_tag :tag => 'h2', :content => /2f9c0091:61b685fb/
end
def test_annotate
@@ -169,33 +150,13 @@ class RepositoriesGitControllerTest < ActionController::TestCase
:sibling => { :tag => 'td', :content => /jsmith/ },
:sibling => { :tag => 'td', :content => /watcher =/ }
end
def test_annotate_binary_file
get :annotate, :id => 3, :path => ['images', 'edit.png']
assert_response 500
assert_tag :tag => 'p', :attributes => { :id => /errorExplanation/ },
:content => /can not be annotated/
end
def test_revision
@repository.fetch_changesets
@repository.reload
['61b685fbe55ab05b5ac68402d5720c1a6ac973d1', '61b685f'].each do |r|
get :revision, :id => 3, :rev => r
assert_response :success
assert_template 'revision'
end
end
def test_empty_revision
@repository.fetch_changesets
@repository.reload
['', ' ', nil].each do |r|
get :revision, :id => 3, :rev => r
assert_response 404
assert_error_tag :content => /was not found/
end
end
else
puts "Git test repository NOT FOUND. Skipping functional tests !!!"
def test_fake; assert true end

View File

@@ -32,10 +32,9 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
User.current = nil
@repository = Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
assert @repository
Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
end
if File.directory?(REPOSITORY_PATH)
def test_show
get :show, :id => 3
@@ -165,16 +164,6 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
:attributes => { :class => 'line-num' },
:sibling => { :tag => 'td', :content => /watcher =/ }
end
def test_empty_revision
@repository.fetch_changesets
@repository.reload
['', ' ', nil].each do |r|
get :revision, :id => 3, :rev => r
assert_response 404
assert_error_tag :content => /was not found/
end
end
else
puts "Mercurial test repository NOT FOUND. Skipping functional tests !!!"
def test_fake; assert true end

View File

@@ -168,18 +168,10 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
def test_invalid_revision
get :revision, :id => 1, :rev => 'something_weird'
assert_response 404
assert_response 500
assert_error_tag :content => /was not found/
end
def test_empty_revision
['', ' ', nil].each do |r|
get :revision, :id => 1, :rev => r
assert_response 404
assert_error_tag :content => /was not found/
end
end
def test_revision_with_repository_pointing_to_a_subdirectory
r = Project.find(1).repository
# Changes repository url to a subdirectory
@@ -206,8 +198,6 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
get :diff, :id => 1, :rev => 3
assert_response :success
assert_template 'diff'
assert_tag :tag => 'h2', :content => /3/
end
def test_directory_diff
@@ -219,8 +209,6 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
assert_not_nil diff
# 2 files modified
assert_equal 2, Redmine::UnifiedDiff.new(diff).size
assert_tag :tag => 'h2', :content => /2:6/
end
def test_annotate

View File

@@ -610,7 +610,6 @@ EXPECTED
Date.today - 100 => 'about 3 months late',
Date.today - 20000 => 'over 54 years late',
}
::I18n.locale = :en
to_test.each do |date, expected|
assert_equal expected, due_date_distance_in_words(date)
end

View File

@@ -1,53 +0,0 @@
require File.expand_path('../../../../../../test_helper', __FILE__)
begin
require 'mocha'
class DarcsAdapterTest < ActiveSupport::TestCase
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/darcs_repository'
if File.directory?(REPOSITORY_PATH)
def setup
@adapter = Redmine::Scm::Adapters::DarcsAdapter.new(REPOSITORY_PATH)
end
def test_darcsversion
to_test = { "1.0.9 (release)\n" => [1,0,9] ,
"2.2.0 (release)\n" => [2,2,0] }
to_test.each do |s, v|
test_darcsversion_for(s, v)
end
end
def test_revisions
id1 = '20080308225258-98289-761f654d669045eabee90b91b53a21ce5593cadf.gz'
revs = @adapter.revisions('', nil, nil, {:with_path => true})
assert_equal 6, revs.size
assert_equal id1, revs[5].scmid
paths = revs[5].paths
assert_equal 5, paths.size
assert_equal 'A', paths[0][:action]
assert_equal '/README', paths[0][:path]
assert_equal 'A', paths[1][:action]
assert_equal '/images', paths[1][:path]
end
private
def test_darcsversion_for(darcsversion, version)
@adapter.class.expects(:darcs_binary_version_from_command_line).returns(darcsversion)
assert_equal version, @adapter.class.darcs_binary_version
end
else
puts "Darcs test repository NOT FOUND. Skipping unit tests !!!"
def test_fake; assert true end
end
end
rescue LoadError
class DarcsMochaFake < ActiveSupport::TestCase
def test_fake; assert(false, "Requires mocha to run those tests") end
end
end

View File

@@ -63,23 +63,6 @@ class RepositoryGitTest < ActiveSupport::TestCase
assert_equal 15, @repository.changesets.count
end
def test_find_changeset_by_name
@repository.fetch_changesets
@repository.reload
['7234cb2750b63f47bff735edc50a1c0a433c2518', '7234cb2750b'].each do |r|
assert_equal '7234cb2750b63f47bff735edc50a1c0a433c2518',
@repository.find_changeset_by_name(r).revision
end
end
def test_find_changeset_by_empty_name
@repository.fetch_changesets
@repository.reload
['', ' ', nil].each do |r|
assert_nil @repository.find_changeset_by_name(r)
end
end
def test_identifier
@repository.fetch_changesets
@repository.reload
@@ -91,17 +74,16 @@ class RepositoryGitTest < ActiveSupport::TestCase
@repository.fetch_changesets
@repository.reload
c = @repository.changesets.find_by_revision('7234cb2750b63f47bff735edc50a1c0a433c2518')
assert_equal '7234cb27', c.format_identifier
assert_equal c.format_identifier, '7234cb27'
end
def test_activities
c = Changeset.new(:repository => @repository,
:committed_on => Time.now,
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
:revision => 'abc7234cb2750b63f47bff735edc50a1c0a433c2',
:scmid => 'abc7234cb2750b63f47bff735edc50a1c0a433c2',
:comments => 'test')
assert c.event_title.include?('abc7234c:')
assert_equal 'abc7234cb2750b63f47bff735edc50a1c0a433c2', c.event_url[:rev]
assert_equal c.event_url[:rev], 'abc7234cb2750b63f47bff735edc50a1c0a433c2'
end
else
puts "Git test repository NOT FOUND. Skipping unit tests !!!"

View File

@@ -102,8 +102,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
@repository.reload
cs1 = @repository.changesets.find_by_revision('13')
assert_not_nil cs1
c1 = cs1.changes.sort_by(&:path)
c1 = cs1.changes
assert_equal 2, c1.size
assert_equal 'A', c1[0].action

View File

@@ -96,14 +96,6 @@ class RepositorySubversionTest < ActiveSupport::TestCase
assert_equal c.revision, c.identifier
end
def test_find_changeset_by_empty_name
@repository.fetch_changesets
@repository.reload
['', ' ', nil].each do |r|
assert_nil @repository.find_changeset_by_name(r)
end
end
def test_identifier_nine_digit
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
:revision => '123456789', :comments => 'test')
@@ -127,14 +119,14 @@ class RepositorySubversionTest < ActiveSupport::TestCase
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
:revision => '1', :comments => 'test')
assert c.event_title.include?('1:')
assert_equal '1', c.event_url[:rev]
assert_equal c.event_url[:rev], '1'
end
def test_activities_nine_digit
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
:revision => '123456789', :comments => 'test')
assert c.event_title.include?('123456789:')
assert_equal '123456789', c.event_url[:rev]
assert_equal c.event_url[:rev], '123456789'
end
else
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!"

View File

@@ -48,42 +48,6 @@ class TimeEntryTest < ActiveSupport::TestCase
def test_hours_should_default_to_nil
assert_nil TimeEntry.new.hours
end
def test_spent_on_with_blank
c = TimeEntry.new
c.spent_on = ''
assert_nil c.spent_on
end
def test_spent_on_with_nil
c = TimeEntry.new
c.spent_on = nil
assert_nil c.spent_on
end
def test_spent_on_with_string
c = TimeEntry.new
c.spent_on = "2011-01-14"
assert_equal Date.parse("2011-01-14"), c.spent_on
end
def test_spent_on_with_invalid_string
c = TimeEntry.new
c.spent_on = "foo"
assert_nil c.spent_on
end
def test_spent_on_with_date
c = TimeEntry.new
c.spent_on = Date.today
assert_equal Date.today, c.spent_on
end
def test_spent_on_with_time
c = TimeEntry.new
c.spent_on = Time.now
assert_equal Date.today, c.spent_on
end
context "#earilest_date_for_project" do
setup do

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# redMine - project management software
# Copyright (C) 2006 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
@@ -303,19 +303,6 @@ class UserTest < ActiveSupport::TestCase
assert_nil @dlopper.roles_for_project(Project.find(2)).detect {|role| role.member?}
end
def test_valid_notification_options
# without memberships
assert_equal 5, User.find(7).valid_notification_options.size
# with memberships
assert_equal 6, User.find(2).valid_notification_options.size
end
def test_valid_notification_options_class_method
assert_equal 5, User.valid_notification_options.size
assert_equal 5, User.valid_notification_options(User.find(7)).size
assert_equal 6, User.valid_notification_options(User.find(2)).size
end
def test_mail_notification_all
@jsmith.mail_notification = 'all'
@jsmith.notified_project_ids = []
@@ -468,7 +455,6 @@ class UserTest < ActiveSupport::TestCase
should "be false for a user with :only_my_events and isn't an author, creator, or assignee" do
@user = User.generate_with_protected!(:mail_notification => 'only_my_events')
Member.create!(:user => @user, :project => @project, :role_ids => [1])
assert ! @user.notify_about?(@issue)
end
@@ -501,22 +487,6 @@ class UserTest < ActiveSupport::TestCase
@assignee.update_attribute(:mail_notification, 'only_owner')
assert ! @assignee.notify_about?(@issue)
end
should "be true for a user with :selected and is the author" do
@author.update_attribute(:mail_notification, 'selected')
assert @author.notify_about?(@issue)
end
should "be true for a user with :selected and is the assignee" do
@assignee.update_attribute(:mail_notification, 'selected')
assert @assignee.notify_about?(@issue)
end
should "be false for a user with :selected and is not the author or assignee" do
@user = User.generate_with_protected!(:mail_notification => 'selected')
Member.create!(:user => @user, :project => @project, :role_ids => [1])
assert ! @user.notify_about?(@issue)
end
end
context "other events" do

View File

@@ -46,9 +46,6 @@ class WikiTest < ActiveSupport::TestCase
assert_equal page, wiki.find_page('Another_page')
assert_equal page, wiki.find_page('Another page')
assert_equal page, wiki.find_page('ANOTHER page')
page = WikiPage.find(10)
assert_equal page, wiki.find_page('Этикаенеджмента')
end
def test_titleize

View File

@@ -1,155 +0,0 @@
--- !ruby/object:Gem::Specification
name: coderay
version: !ruby/object:Gem::Version
hash: 53
prerelease: false
segments:
- 0
- 9
- 7
version: 0.9.7
platform: ruby
authors:
- murphy
autorequire:
bindir: bin
cert_chain: []
date: 2011-01-15 00:00:00 +01:00
default_executable:
dependencies: []
description: |
Fast and easy syntax highlighting for selected languages, written in Ruby.
Comes with RedCloth integration and LOC counter.
email: murphy@rubychan.de
executables:
- coderay
- coderay_stylesheet
extensions: []
extra_rdoc_files:
- lib/README
- FOLDERS
files:
- ./lib/coderay/duo.rb
- ./lib/coderay/encoder.rb
- ./lib/coderay/encoders/_map.rb
- ./lib/coderay/encoders/comment_filter.rb
- ./lib/coderay/encoders/count.rb
- ./lib/coderay/encoders/debug.rb
- ./lib/coderay/encoders/div.rb
- ./lib/coderay/encoders/filter.rb
- ./lib/coderay/encoders/html/css.rb
- ./lib/coderay/encoders/html/numerization.rb
- ./lib/coderay/encoders/html/output.rb
- ./lib/coderay/encoders/html.rb
- ./lib/coderay/encoders/json.rb
- ./lib/coderay/encoders/lines_of_code.rb
- ./lib/coderay/encoders/null.rb
- ./lib/coderay/encoders/page.rb
- ./lib/coderay/encoders/span.rb
- ./lib/coderay/encoders/statistic.rb
- ./lib/coderay/encoders/term.rb
- ./lib/coderay/encoders/text.rb
- ./lib/coderay/encoders/token_class_filter.rb
- ./lib/coderay/encoders/xml.rb
- ./lib/coderay/encoders/yaml.rb
- ./lib/coderay/for_redcloth.rb
- ./lib/coderay/helpers/file_type.rb
- ./lib/coderay/helpers/gzip_simple.rb
- ./lib/coderay/helpers/plugin.rb
- ./lib/coderay/helpers/word_list.rb
- ./lib/coderay/scanner.rb
- ./lib/coderay/scanners/_map.rb
- ./lib/coderay/scanners/c.rb
- ./lib/coderay/scanners/cpp.rb
- ./lib/coderay/scanners/css.rb
- ./lib/coderay/scanners/debug.rb
- ./lib/coderay/scanners/delphi.rb
- ./lib/coderay/scanners/diff.rb
- ./lib/coderay/scanners/groovy.rb
- ./lib/coderay/scanners/html.rb
- ./lib/coderay/scanners/java/builtin_types.rb
- ./lib/coderay/scanners/java.rb
- ./lib/coderay/scanners/java_script-0.9.6.rb
- ./lib/coderay/scanners/java_script.rb
- ./lib/coderay/scanners/json.rb
- ./lib/coderay/scanners/nitro_xhtml.rb
- ./lib/coderay/scanners/php.rb
- ./lib/coderay/scanners/plaintext.rb
- ./lib/coderay/scanners/python.rb
- ./lib/coderay/scanners/rhtml.rb
- ./lib/coderay/scanners/ruby/patterns.rb
- ./lib/coderay/scanners/ruby.rb
- ./lib/coderay/scanners/scheme.rb
- ./lib/coderay/scanners/sql.rb
- ./lib/coderay/scanners/xml.rb
- ./lib/coderay/scanners/yaml.rb
- ./lib/coderay/style.rb
- ./lib/coderay/styles/_map.rb
- ./lib/coderay/styles/cycnus.rb
- ./lib/coderay/styles/murphy.rb
- ./lib/coderay/token_classes.rb
- ./lib/coderay/tokens.rb
- ./lib/coderay.rb
- ./Rakefile
- ./test/functional/basic.rb
- ./test/functional/basic.rbc
- ./test/functional/for_redcloth.rb
- ./test/functional/for_redcloth.rbc
- ./test/functional/load_plugin_scanner.rb
- ./test/functional/load_plugin_scanner.rbc
- ./test/functional/suite.rb
- ./test/functional/suite.rbc
- ./test/functional/vhdl.rb
- ./test/functional/vhdl.rbc
- ./test/functional/word_list.rb
- ./test/functional/word_list.rbc
- ./lib/README
- ./LICENSE
- lib/README
- FOLDERS
- bin/coderay
- bin/coderay_stylesheet
has_rdoc: true
homepage: http://coderay.rubychan.de
licenses: []
post_install_message:
rdoc_options:
- -SNw2
- -mlib/README
- -t CodeRay Documentation
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
none: false
requirements:
- - ">="
- !ruby/object:Gem::Version
hash: 51
segments:
- 1
- 8
- 2
version: 1.8.2
required_rubygems_version: !ruby/object:Gem::Requirement
none: false
requirements:
- - ">="
- !ruby/object:Gem::Version
hash: 3
segments:
- 0
version: "0"
requirements: []
rubyforge_project: coderay
rubygems_version: 1.3.7
signing_key:
specification_version: 3
summary: Fast syntax highlighting for selected languages.
test_files:
- ./test/functional/suite.rb

View File

@@ -1,53 +0,0 @@
= CodeRay - Trunk folder structure
== bench - Benchmarking system
All benchmarking stuff goes here.
Test inputs are stored in files named <code>example.<lang></code>.
Test outputs go to <code>bench/test.<encoder-default-file-extension></code>.
Run <code>bench/bench.rb</code> to get a usage description.
Run <code>rake bench</code> to perform an example benchmark.
== bin - Scripts
Executional files for CodeRay.
== demo - Demos and functional tests
Demonstrational scripts to show of CodeRay's features.
Run them as functional tests with <code>rake test:demos</code>.
== etc - Lots of stuff
Some addidtional files for CodeRay, mainly graphics and Vim scripts.
== gem_server - Gem output folder
For <code>rake gem</code>.
== lib - CodeRay library code
This is the base directory for the CodeRay library.
== rake_helpers - Rake helper libraries
Some files to enhance Rake, including the Autumnal Rdoc template and some scripts.
== test - Tests
Tests for the scanners.
Each language has its own subfolder and sub-suite.
Run with <code>rake test</code>.

View File

@@ -1,35 +0,0 @@
require 'rake/rdoctask'
ROOT = '.'
LIB_ROOT = File.join ROOT, 'lib'
EXTRA_RDOC_FILES = %w(lib/README FOLDERS)
task :default => :test
if File.directory? 'rake_tasks'
# load rake tasks from subfolder
for task_file in Dir['rake_tasks/*.rake'].sort
load task_file
end
else
# fallback tasks when rake_tasks folder is not present
desc 'Run CodeRay tests (basic)'
task :test do
ruby './test/functional/suite.rb'
ruby './test/functional/for_redcloth.rb'
end
desc 'Generate documentation for CodeRay'
Rake::RDocTask.new :doc do |rd|
rd.title = 'CodeRay Documentation'
rd.main = 'lib/README'
rd.rdoc_files.add Dir['lib']
rd.rdoc_files.add 'lib/README'
rd.rdoc_files.add 'FOLDERS'
rd.rdoc_dir = 'doc'
end
end

View File

@@ -1,86 +0,0 @@
#!/usr/bin/env ruby
# CodeRay Executable
#
# Version: 0.2
# Author: murphy
require 'coderay'
if ARGV.empty?
$stderr.puts <<-USAGE
CodeRay #{CodeRay::VERSION} (http://coderay.rubychan.de)
Usage:
coderay file [-<format>]
coderay -<lang> [-<format>] [< file] [> output]
Defaults:
lang: based on file extension
format: ANSI colorized output for terminal, HTML page for files
Examples:
coderay foo.rb # colorized output to terminal, based on file extension
coderay foo.rb -loc # print LOC count, based on file extension and format
coderay foo.rb > foo.html # HTML page output to file, based on extension
coderay -ruby < foo.rb # colorized output to terminal, based on lang
coderay -ruby -loc < foo.rb # print LOC count, based on lang
coderay -ruby -page foo.rb # HTML page output to terminal, based on lang and format
coderay -ruby -page foo.rb > foo.html # HTML page output to file, based on lang and format
USAGE
end
first, second = ARGV
def read
file = ARGV.grep(/^(?!-)/).last
if file
if File.exist?(file)
File.read file
else
$stderr.puts "No such file: #{file}"
end
else
$stdin.read
end
end
if first
if first[/-(\w+)/] == first
lang = $1
input = read
tokens = :scan
else
file = first
unless File.exist? file
$stderr.puts "No such file: #{file}"
exit 2
end
tokens = CodeRay.scan_file file
end
else
$stderr.puts 'No lang/file given.'
exit 1
end
if second
if second[/-(\w+)/] == second
format = $1.to_sym
else
raise 'invalid format (must be -xxx)'
end
else
if $stdout.tty?
format = :term
else
$stderr.puts 'No format given; setting to default (HTML Page).'
format = :page
end
end
if tokens == :scan
output = CodeRay::Duo[lang => format].highlight input
else
output = tokens.encode format
end
out = $stdout
out.puts output

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env ruby
require 'coderay'
puts CodeRay::Encoders[:html]::CSS.new.stylesheet

View File

@@ -1,224 +0,0 @@
module CodeRay
module Scanners
class JavaScript < Scanner
include Streamable
register_for :java_script
file_extension 'js'
# The actual JavaScript keywords.
KEYWORDS = %w[
break case catch continue default delete do else
finally for function if in instanceof new
return switch throw try typeof var void while with
]
PREDEFINED_CONSTANTS = %w[
false null true undefined
]
MAGIC_VARIABLES = %w[ this arguments ] # arguments was introduced in JavaScript 1.4
KEYWORDS_EXPECTING_VALUE = WordList.new.add %w[
case delete in instanceof new return throw typeof with
]
# Reserved for future use.
RESERVED_WORDS = %w[
abstract boolean byte char class debugger double enum export extends
final float goto implements import int interface long native package
private protected public short static super synchronized throws transient
volatile
]
IDENT_KIND = WordList.new(:ident).
add(RESERVED_WORDS, :reserved).
add(PREDEFINED_CONSTANTS, :pre_constant).
add(MAGIC_VARIABLES, :local_variable).
add(KEYWORDS, :keyword)
ESCAPE = / [bfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
REGEXP_ESCAPE = / [bBdDsSwW] /x
STRING_CONTENT_PATTERN = {
"'" => /[^\\']+/,
'"' => /[^\\"]+/,
'/' => /[^\\\/]+/,
}
KEY_CHECK_PATTERN = {
"'" => / [^\\']* (?: \\.? [^\\']* )* '? \s* : /x,
'"' => / [^\\"]* (?: \\.? [^\\"]* )* "? \s* : /x,
}
def scan_tokens tokens, options
state = :initial
string_delimiter = nil
value_expected = true
key_expected = false
function_expected = false
until eos?
kind = nil
match = nil
case state
when :initial
if match = scan(/ \s+ | \\\n /x)
value_expected = true if !value_expected && match.index(?\n)
tokens << [match, :space]
next
elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
value_expected = true
kind = :comment
elsif check(/\.?\d/)
key_expected = value_expected = false
if scan(/0[xX][0-9A-Fa-f]+/)
kind = :hex
elsif scan(/(?>0[0-7]+)(?![89.eEfF])/)
kind = :oct
elsif scan(/\d+[fF]|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
kind = :float
elsif scan(/\d+/)
kind = :integer
end
elsif value_expected && match = scan(/<([[:alpha:]]\w*) (?: [^\/>]*\/> | .*?<\/\1>)/xim)
# FIXME: scan over nested tags
xml_scanner.tokenize match
value_expected = false
next
elsif match = scan(/ [-+*=<>?:;,!&^|(\[{~%]+ | \.(?!\d) /x)
value_expected = true
last_operator = match[-1]
key_expected = (last_operator == ?{) || (last_operator == ?,)
function_expected = false
kind = :operator
elsif scan(/ [)\]}]+ /x)
function_expected = key_expected = value_expected = false
kind = :operator
elsif match = scan(/ [$a-zA-Z_][A-Za-z_0-9$]* /x)
kind = IDENT_KIND[match]
value_expected = (kind == :keyword) && KEYWORDS_EXPECTING_VALUE[match]
# TODO: labels
if kind == :ident
if match.index(?$) # $ allowed inside an identifier
kind = :predefined
elsif function_expected
kind = :function
elsif check(/\s*[=:]\s*function\b/)
kind = :function
elsif key_expected && check(/\s*:/)
kind = :key
end
end
function_expected = (kind == :keyword) && (match == 'function')
key_expected = false
elsif match = scan(/["']/)
if key_expected && check(KEY_CHECK_PATTERN[match])
state = :key
else
state = :string
end
tokens << [:open, state]
string_delimiter = match
kind = :delimiter
elsif value_expected && (match = scan(/\/(?=\S)/))
tokens << [:open, :regexp]
state = :regexp
string_delimiter = '/'
kind = :delimiter
elsif scan(/ \/ /x)
value_expected = true
key_expected = false
kind = :operator
else
getch
kind = :error
end
when :string, :regexp, :key
if scan(STRING_CONTENT_PATTERN[string_delimiter])
kind = :content
elsif match = scan(/["'\/]/)
tokens << [match, :delimiter]
if state == :regexp
modifiers = scan(/[gim]+/)
tokens << [modifiers, :modifier] if modifiers && !modifiers.empty?
end
tokens << [:close, state]
string_delimiter = nil
key_expected = value_expected = false
state = :initial
next
elsif state != :regexp && (match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox))
if string_delimiter == "'" && !(match == "\\\\" || match == "\\'")
kind = :content
else
kind = :char
end
elsif state == :regexp && scan(/ \\ (?: #{ESCAPE} | #{REGEXP_ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
kind = :char
elsif scan(/\\./m)
kind = :content
elsif scan(/ \\ | $ /x)
tokens << [:close, state]
kind = :error
key_expected = value_expected = false
state = :initial
else
raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
end
else
raise_inspect 'Unknown state', tokens
end
match ||= matched
if $CODERAY_DEBUG and not kind
raise_inspect 'Error token %p in line %d' %
[[match, kind], line], tokens
end
raise_inspect 'Empty token', tokens unless match
tokens << [match, kind]
end
if [:string, :regexp].include? state
tokens << [:close, state]
end
tokens
end
protected
def reset_instance
super
@xml_scanner.reset if defined? @xml_scanner
end
def xml_scanner
@xml_scanner ||= CodeRay.scanner :xml, :tokens => @tokens, :keep_tokens => true, :keep_state => false
end
end
end
end

View File

@@ -1,122 +0,0 @@
require 'test/unit'
require 'coderay'
class BasicTest < Test::Unit::TestCase
def test_version
assert_nothing_raised do
assert_match(/\A\d\.\d\.\d\z/, CodeRay::VERSION)
end
end
RUBY_TEST_CODE = 'puts "Hello, World!"'
RUBY_TEST_TOKENS = [
['puts', :ident],
[' ', :space],
[:open, :string],
['"', :delimiter],
['Hello, World!', :content],
['"', :delimiter],
[:close, :string]
]
def test_simple_scan
assert_nothing_raised do
assert_equal RUBY_TEST_TOKENS, CodeRay.scan(RUBY_TEST_CODE, :ruby).to_ary
end
end
RUBY_TEST_HTML = 'puts <span class="s"><span class="dl">&quot;</span>' +
'<span class="k">Hello, World!</span><span class="dl">&quot;</span></span>'
def test_simple_highlight
assert_nothing_raised do
assert_equal RUBY_TEST_HTML, CodeRay.scan(RUBY_TEST_CODE, :ruby).html
end
end
def test_duo
assert_equal(RUBY_TEST_CODE,
CodeRay::Duo[:plain, :plain].highlight(RUBY_TEST_CODE))
assert_equal(RUBY_TEST_CODE,
CodeRay::Duo[:plain => :plain].highlight(RUBY_TEST_CODE))
end
def test_duo_stream
assert_equal(RUBY_TEST_CODE,
CodeRay::Duo[:plain, :plain].highlight(RUBY_TEST_CODE, :stream => true))
end
def test_comment_filter
assert_equal <<-EXPECTED, CodeRay.scan(<<-INPUT, :ruby).comment_filter.text
#!/usr/bin/env ruby
code
more code
EXPECTED
#!/usr/bin/env ruby
=begin
A multi-line comment.
=end
code
# A single-line comment.
more code # and another comment, in-line.
INPUT
end
def test_lines_of_code
assert_equal 2, CodeRay.scan(<<-INPUT, :ruby).lines_of_code
#!/usr/bin/env ruby
=begin
A multi-line comment.
=end
code
# A single-line comment.
more code # and another comment, in-line.
INPUT
rHTML = <<-RHTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title><%= controller.controller_name.titleize %>: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'scaffold' %>
</head>
<body>
<p style="color: green"><%= flash[:notice] %></p>
<div id="main">
<%= yield %>
</div>
</body>
</html>
RHTML
assert_equal 0, CodeRay.scan(rHTML, :html).lines_of_code
assert_equal 0, CodeRay.scan(rHTML, :php).lines_of_code
assert_equal 0, CodeRay.scan(rHTML, :yaml).lines_of_code
assert_equal 4, CodeRay.scan(rHTML, :rhtml).lines_of_code
end
def test_rubygems_not_loaded
assert_equal nil, defined? Gem
end if ENV['check_rubygems'] && RUBY_VERSION < '1.9'
def test_list_of_encoders
assert_kind_of(Array, CodeRay::Encoders.list)
assert CodeRay::Encoders.list.include?('count')
end
def test_list_of_scanners
assert_kind_of(Array, CodeRay::Scanners.list)
assert CodeRay::Scanners.list.include?('plaintext')
end
def test_scan_a_frozen_string
CodeRay.scan RUBY_VERSION, :ruby
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -1,77 +0,0 @@
require 'test/unit'
$:.unshift 'lib'
require 'coderay'
begin
require 'rubygems' unless defined? Gem
gem 'RedCloth', '>= 4.0.3' rescue nil
require 'redcloth'
rescue LoadError
warn 'RedCloth not found - skipping for_redcloth tests.'
end
class BasicTest < Test::Unit::TestCase
def test_for_redcloth
require 'coderay/for_redcloth'
assert_equal "<p><span lang=\"ruby\" class=\"CodeRay\">puts <span style=\"background-color:#fff0f0;color:#D20\"><span style=\"color:#710\">&quot;</span><span style=\"\">Hello, World!</span><span style=\"color:#710\">&quot;</span></span></span></p>",
RedCloth.new('@[ruby]puts "Hello, World!"@').to_html
assert_equal <<-BLOCKCODE.chomp,
<div lang="ruby" class="CodeRay">
<div class="code"><pre>puts <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">&quot;</span><span style="">Hello, World!</span><span style="color:#710">&quot;</span></span></pre></div>
</div>
BLOCKCODE
RedCloth.new('bc[ruby]. puts "Hello, World!"').to_html
end
def test_for_redcloth_no_lang
require 'coderay/for_redcloth'
assert_equal "<p><code>puts \"Hello, World!\"</code></p>",
RedCloth.new('@puts "Hello, World!"@').to_html
assert_equal <<-BLOCKCODE.chomp,
<pre><code>puts \"Hello, World!\"</code></pre>
BLOCKCODE
RedCloth.new('bc. puts "Hello, World!"').to_html
end
def test_for_redcloth_style
require 'coderay/for_redcloth'
assert_equal <<-BLOCKCODE.chomp,
<pre style=\"color: red;\"><code style=\"color: red;\">puts \"Hello, World!\"</code></pre>
BLOCKCODE
RedCloth.new('bc{color: red}. puts "Hello, World!"').to_html
end
def test_for_redcloth_escapes
require 'coderay/for_redcloth'
assert_equal '<p><span lang="ruby" class="CodeRay">&gt;</span></p>',
RedCloth.new('@[ruby]>@').to_html
assert_equal <<-BLOCKCODE.chomp,
<div lang="ruby" class="CodeRay">
<div class="code"><pre>&amp;</pre></div>
</div>
BLOCKCODE
RedCloth.new('bc[ruby]. &').to_html
end
def test_for_redcloth_escapes2
require 'coderay/for_redcloth'
assert_equal "<p><span lang=\"c\" class=\"CodeRay\"><span style=\"color:#579\">#include</span> <span style=\"color:#B44;font-weight:bold\">&lt;test.h&gt;</span></span></p>",
RedCloth.new('@[c]#include <test.h>@').to_html
end
# See http://jgarber.lighthouseapp.com/projects/13054/tickets/124-code-markup-does-not-allow-brackets.
def test_for_redcloth_false_positive
require 'coderay/for_redcloth'
assert_equal '<p><code>[project]_dff.skjd</code></p>',
RedCloth.new('@[project]_dff.skjd@').to_html
# false positive, but expected behavior / known issue
assert_equal "<p><span lang=\"ruby\" class=\"CodeRay\">_dff.skjd</span></p>",
RedCloth.new('@[ruby]_dff.skjd@').to_html
assert_equal <<-BLOCKCODE.chomp,
<pre><code>[project]_dff.skjd</code></pre>
BLOCKCODE
RedCloth.new('bc. [project]_dff.skjd').to_html
end
end if defined? RedCloth

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
require 'test/unit'
require 'coderay'
class PluginScannerTest < Test::Unit::TestCase
def test_load
require File.join(File.dirname(__FILE__), 'vhdl')
assert_equal 'VHDL', CodeRay.scanner(:vhdl).class.name
end
end

View File

@@ -1,317 +0,0 @@
!RBIX
0
x
M
1
n
n
x
10
__script__
i
53
5
7
0
64
47
49
1
1
15
5
7
2
64
47
49
1
1
15
99
7
3
45
4
5
43
6
43
7
65
49
8
3
13
99
12
7
9
12
7
10
12
65
12
49
11
4
15
49
9
0
15
2
11
I
6
I
0
I
0
I
0
n
p
12
s
9
test/unit
x
7
require
s
7
coderay
x
17
PluginScannerTest
x
4
Test
n
x
4
Unit
x
8
TestCase
x
10
open_class
x
14
__class_init__
M
1
n
n
x
17
PluginScannerTest
i
16
5
66
99
7
0
7
1
65
67
49
2
0
49
3
4
11
I
5
I
0
I
0
I
0
n
p
4
x
9
test_load
M
1
n
n
x
9
test_load
i
48
5
45
0
1
45
0
2
65
49
3
0
49
4
1
7
5
64
49
6
2
47
49
7
1
15
5
7
8
64
45
9
10
7
11
49
12
1
49
13
0
49
14
0
47
49
15
2
11
I
4
I
0
I
0
I
0
n
p
16
x
4
File
n
n
x
11
active_path
x
7
dirname
s
4
vhdl
x
4
join
x
7
require
s
4
VHDL
x
7
CodeRay
n
x
4
vhdl
x
7
scanner
x
5
class
x
4
name
x
12
assert_equal
p
7
I
0
I
6
I
0
I
7
I
19
I
8
I
30
x
69
/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb
p
0
x
17
method_visibility
x
15
add_defn_method
p
3
I
2
I
6
I
10
x
69
/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb
p
0
x
13
attach_method
p
7
I
0
I
1
I
9
I
2
I
12
I
4
I
35
x
69
/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb
p
0

View File

@@ -1,12 +0,0 @@
require 'test/unit'
MYDIR = File.dirname(__FILE__)
$:.unshift 'lib'
require 'coderay'
puts "Running basic CodeRay #{CodeRay::VERSION} tests..."
suite = %w(basic load_plugin_scanner word_list)
for test_case in suite
load File.join(MYDIR, test_case + '.rb')
end

View File

@@ -1,322 +0,0 @@
!RBIX
0
x
M
1
n
n
x
10
__script__
i
95
5
7
0
64
47
49
1
1
15
65
7
2
45
3
4
65
49
5
0
49
6
1
49
7
2
15
99
43
8
7
9
49
10
1
7
11
64
49
12
1
15
5
7
13
64
47
49
1
1
15
5
7
14
45
15
16
43
17
47
49
18
0
7
19
63
3
47
49
20
1
15
7
21
64
7
22
64
7
23
64
35
3
19
0
15
20
0
56
24
50
25
0
15
2
11
I
6
I
2
I
0
I
0
n
p
26
s
9
test/unit
x
7
require
x
5
MYDIR
x
4
File
n
x
11
active_path
x
7
dirname
x
9
const_set
x
7
Globals
x
2
$:
x
2
[]
s
3
lib
x
2
<<
s
7
coderay
s
22
Running basic CodeRay
x
7
CodeRay
n
x
7
VERSION
x
4
to_s
s
9
tests...
x
4
puts
s
5
basic
s
19
load_plugin_scanner
s
9
word_list
M
1
p
2
x
9
for_block
t
n
x
9
__block__
i
28
57
22
1
1
15
5
45
0
1
45
2
3
21
1
1
7
4
64
81
5
49
6
2
47
49
7
1
11
I
6
I
0
I
1
I
1
n
p
8
x
4
File
n
x
5
MYDIR
n
s
3
.rb
x
1
+
x
4
join
x
4
load
p
5
I
0
I
a
I
5
I
b
I
1c
x
55
/Users/murphy/ruby/coderay-0.9/test/functional/suite.rb
p
0
x
4
each
p
15
I
0
I
1
I
9
I
3
I
1a
I
5
I
29
I
6
I
32
I
7
I
47
I
9
I
55
I
a
I
5f
x
55
/Users/murphy/ruby/coderay-0.9/test/functional/suite.rb
p
2
x
5
suite
x
9
test_case

View File

@@ -1,126 +0,0 @@
class VHDL < CodeRay::Scanners::Scanner
register_for :vhdl
RESERVED_WORDS = [
'access','after','alias','all','assert','architecture','begin',
'block','body','buffer','bus','case','component','configuration','constant',
'disconnect','downto','else','elsif','end','entity','exit','file','for',
'function','generate','generic','group','guarded','if','impure','in',
'inertial','inout','is','label','library','linkage','literal','loop',
'map','new','next','null','of','on','open','others','out','package',
'port','postponed','procedure','process','pure','range','record','register',
'reject','report','return','select','severity','signal','shared','subtype',
'then','to','transport','type','unaffected','units','until','use','variable',
'wait','when','while','with','note','warning','error','failure','and',
'or','xor','not','nor',
'array'
]
PREDEFINED_TYPES = [
'bit','bit_vector','character','boolean','integer','real','time','string',
'severity_level','positive','natural','signed','unsigned','line','text',
'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state',
'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength',
'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector'
]
PREDEFINED_CONSTANTS = [
]
IDENT_KIND = CodeRay::CaseIgnoringWordList.new(:ident).
add(RESERVED_WORDS, :reserved).
add(PREDEFINED_TYPES, :pre_type).
add(PREDEFINED_CONSTANTS, :pre_constant)
ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
def scan_tokens tokens, options
state = :initial
until eos?
kind = nil
match = nil
case state
when :initial
if scan(/ \s+ | \\\n /x)
kind = :space
elsif scan(/-- .*/x)
kind = :comment
elsif scan(/ [-+*\/=<>?:;,!&^|()\[\]{}~%]+ | \.(?!\d) /x)
kind = :operator
elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x)
kind = IDENT_KIND[match.downcase]
elsif match = scan(/[a-z]?"/i)
tokens << [:open, :string]
state = :string
kind = :delimiter
elsif scan(/ L?' (?: [^\'\n\\] | \\ #{ESCAPE} )? '? /ox)
kind = :char
elsif scan(/(?:\d+)(?![.eEfF])/)
kind = :integer
elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
kind = :float
else
getch
kind = :error
end
when :string
if scan(/[^\\\n"]+/)
kind = :content
elsif scan(/"/)
tokens << ['"', :delimiter]
tokens << [:close, :string]
state = :initial
next
elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
kind = :char
elsif scan(/ \\ | $ /x)
tokens << [:close, :string]
kind = :error
state = :initial
else
raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
end
else
raise_inspect 'Unknown state', tokens
end
match ||= matched
if $DEBUG and not kind
raise_inspect 'Error token %p in line %d' %
[[match, kind], line], tokens
end
raise_inspect 'Empty token', tokens unless match
tokens << [match, kind]
end
if state == :string
tokens << [:close, :string]
end
tokens
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +0,0 @@
require 'test/unit'
require 'coderay'
class WordListTest < Test::Unit::TestCase
include CodeRay
# define word arrays
RESERVED_WORDS = %w[
asm break case continue default do else
...
]
PREDEFINED_TYPES = %w[
int long short char void
...
]
PREDEFINED_CONSTANTS = %w[
EOF NULL ...
]
# make a WordList
IDENT_KIND = WordList.new(:ident).
add(RESERVED_WORDS, :reserved).
add(PREDEFINED_TYPES, :pre_type).
add(PREDEFINED_CONSTANTS, :pre_constant)
def test_word_list_example
assert_equal :pre_type, IDENT_KIND['void']
# assert_equal :pre_constant, IDENT_KIND['...'] # not specified
end
def test_word_list
list = WordList.new(:ident).add(['foobar'], :reserved)
assert_equal :reserved, list['foobar']
assert_equal :ident, list['FooBar']
end
def test_word_list_cached
list = WordList.new(:ident, true).add(['foobar'], :reserved)
assert_equal :reserved, list['foobar']
assert_equal :ident, list['FooBar']
end
def test_case_ignoring_word_list
list = CaseIgnoringWordList.new(:ident).add(['foobar'], :reserved)
assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
list = CaseIgnoringWordList.new(:ident).add(['FooBar'], :reserved)
assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
end
def test_case_ignoring_word_list_cached
list = CaseIgnoringWordList.new(:ident, true).add(['foobar'], :reserved)
assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
list = CaseIgnoringWordList.new(:ident, true).add(['FooBar'], :reserved)
assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
end
def test_dup
list = WordList.new(:ident).add(['foobar'], :reserved)
assert_equal :reserved, list['foobar']
list2 = list.dup
list2.add(%w[foobar], :keyword)
assert_equal :keyword, list2['foobar']
assert_equal :reserved, list['foobar']
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,7 @@ And with line numbers.
* is what everybody should have on their website
* solves all your problems and makes the girls run after you
Version: 0.9.7
Version: 0.9.2
Author:: murphy (Kornelius Kalnbach)
Contact:: murphy rubychan de
Website:: coderay.rubychan.de[http://coderay.rubychan.de]
@@ -94,7 +94,6 @@ Please report errors in this documentation to <murphy rubychan de>.
* Rob Aldred for the terminal encoder
* Trans for pointing out $DEBUG dependencies
* Flameeyes for finding that Term::ANSIColor was obsolete
* Etienne Massip for reporting a serious bug in JavaScript scanner
* matz and all Ruby gods and gurus
* The inventors of: the computer, the internet, the true color display, HTML &
CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime,

View File

@@ -134,7 +134,7 @@ module CodeRay
# Minor: feature milestone
# Teeny: development state, 0 for pre-release
# Revision: Subversion Revision number (generated on rake gem:make)
VERSION = '0.9.7'
VERSION = '0.9.2'
require 'coderay/tokens'
require 'coderay/token_classes'

View File

@@ -276,13 +276,9 @@ module Encoders
when :begin_line
@opened[0] = type
if style = @css_style[@opened]
if style['class="']
@out << style.sub('class="', 'class="line ')
else
@out << style.sub('>', ' class="line">')
end
@out << style.sub('<span', '<div')
else
@out << '<span class="line">'
@out << '<div>'
end
@opened << type
when :end_line
@@ -293,7 +289,7 @@ module Encoders
raise 'Malformed token stream: Trying to close a line (%p) \
that is not open. Open are: %p.' % [type, @opened[1..-1]]
end
@out << '</span>'
@out << '</div>'
@opened.pop
end

View File

@@ -80,8 +80,8 @@ module Encoders
line_numbers.gsub!(/\n/) { "<tt>\n</tt>" }
line_numbers_table_tpl = TABLE.apply('LINE_NUMBERS', line_numbers)
gsub!("</div>\n", '</div>')
gsub!("\n", "<tt>\n</tt>")
gsub!(/<\/div>\n/) { '</div>' }
gsub!(/\n/) { "<tt>\n</tt>" }
wrap_in! line_numbers_table_tpl
@wrapped_in = :div

View File

@@ -68,16 +68,15 @@ module CodeRay
def normify code
code = code.to_s
if code.respond_to?(:encoding) && (code.encoding.name != 'UTF-8' || !code.valid_encoding?)
code = code.dup
original_encoding = code.encoding
code.force_encoding 'Windows-1252'
unless code.valid_encoding?
code.force_encoding original_encoding
if code.encoding.name == 'UTF-8'
code.encode! 'UTF-16BE', :invalid => :replace, :undef => :replace, :replace => '?'
end
code.encode! 'UTF-8', :invalid => :replace, :undef => :replace, :replace => '?'
if code.respond_to? :force_encoding
debug, $DEBUG = $DEBUG, false
begin
code.force_encoding 'utf-8'
code[/\z/] # raises an ArgumentError when code contains a non-UTF-8 char
rescue ArgumentError
code.force_encoding 'binary'
ensure
$DEBUG = debug
end
end
code.to_unix
@@ -148,12 +147,7 @@ module CodeRay
def string= code
code = Scanner.normify(code)
if defined?(RUBY_DESCRIPTION) && RUBY_DESCRIPTION['rubinius 1.0.1']
reset_state
@string = code
else
super code
end
super code
reset_instance
end

View File

@@ -14,11 +14,12 @@ module Scanners
]
module RE
NonASCII = /[\x80-\xFF]/
Hex = /[0-9a-fA-F]/
Unicode = /\\#{Hex}{1,6}(?:\r\n|\s)?/ # differs from standard because it allows uppercase hex too
Escape = /#{Unicode}|\\[^\r\n\f0-9a-fA-F]/
NMChar = /[-_a-zA-Z0-9]|#{Escape}/
NMStart = /[_a-zA-Z]|#{Escape}/
NMChar = /[-_a-zA-Z0-9]|#{NonASCII}|#{Escape}/
NMStart = /[_a-zA-Z]|#{NonASCII}|#{Escape}/
NL = /\r\n|\r|\n|\f/
String1 = /"(?:[^\n\r\f\\"]|\\#{NL}|#{Escape})*"?/ # FIXME: buggy regexp
String2 = /'(?:[^\n\r\f\\']|\\#{NL}|#{Escape})*'?/ # FIXME: buggy regexp

View File

@@ -47,16 +47,11 @@ module Scanners
tokens << [match, :change]
next unless match = scan(/.+/)
kind = :plain
elsif match = scan(/@@(?>[^@\n]*)@@/)
if check(/\n|$/)
tokens << [:begin_line, line_kind = :change]
else
tokens << [:open, :change]
end
tokens << [match[0,2], :change]
tokens << [match[2...-2], :plain]
tokens << [match[-2,2], :change]
tokens << [:close, :change] unless line_kind
elsif scan(/(@@)((?>[^@\n]*))(@@)/)
tokens << [:begin_line, line_kind = :change]
tokens << [self[1], :change]
tokens << [self[2], :plain]
tokens << [self[3], :change]
next unless match = scan(/.+/)
kind = :plain
elsif match = scan(/\+/)
@@ -72,7 +67,7 @@ module Scanners
elsif scan(/ .*/)
kind = :comment
elsif scan(/.+/)
tokens << [:begin_line, line_kind = :comment]
tokens << [:begin_line, line_kind = :head]
kind = :plain
else
raise_inspect 'else case rached'

Some files were not shown because too many files have changed in this diff Show More