From 5a8232665fee6707d7fbf587ec05170deec7a9fa Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Tue, 22 Jan 2013 22:41:25 +0600 Subject: [PATCH] [refs #836] small refactoring --- app/views/platforms/product_build_lists/_results.html.haml | 6 ++---- config/locales/models/build_list.en.yml | 3 +-- config/locales/models/build_list.ru.yml | 3 +-- config/locales/models/product_build_list.en.yml | 3 +-- config/locales/models/product_build_list.ru.yml | 3 +-- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/views/platforms/product_build_lists/_results.html.haml b/app/views/platforms/product_build_lists/_results.html.haml index ab9aed523..6e458cce5 100644 --- a/app/views/platforms/product_build_lists/_results.html.haml +++ b/app/views/platforms/product_build_lists/_results.html.haml @@ -1,8 +1,6 @@ -- header = subject.is_a?(BuildList) ? 'logs' : 'results' -- prefix = 'layout.' << subject.class.name.underscore << 's.' -%h3= t("#{prefix}#{header}") +%h3= subject.class.human_attribute_name(subject.is_a?(BuildList) ? 'logs' : 'results') - unless subject.results.present? - %h4.nomargin= t("#{prefix}no_#{header}") + %h4.nomargin= t('layout.no_') - else %table.tablesorter.width565{:cellpadding => "0", :cellspacing => "0"} %thead diff --git a/config/locales/models/build_list.en.yml b/config/locales/models/build_list.en.yml index 0579798ed..b407f814b 100644 --- a/config/locales/models/build_list.en.yml +++ b/config/locales/models/build_list.en.yml @@ -30,6 +30,7 @@ en: duration: Build duration in seconds mass_build_id: Mass build commit_hash: Commit hash + logs: Logs build_list/item: name: Name @@ -46,8 +47,6 @@ en: layout: build_lists: - logs: Logs - no_logs: No logs filter_header: Filter current: Curent created_at_start: "Build to start on:" diff --git a/config/locales/models/build_list.ru.yml b/config/locales/models/build_list.ru.yml index 9560f121b..c18a7a057 100644 --- a/config/locales/models/build_list.ru.yml +++ b/config/locales/models/build_list.ru.yml @@ -29,6 +29,7 @@ ru: duration: Длительность билда в секундах mass_build_id: Массовая сборка commit_hash: Хэш коммита + logs: Логи build_list/item: name: Название @@ -45,8 +46,6 @@ ru: layout: build_lists: - logs: Логи - no_logs: Нет логов filter_header: Фильтр current: Текущие created_at_start: "Время постановки на сборку с:" diff --git a/config/locales/models/product_build_list.en.yml b/config/locales/models/product_build_list.en.yml index 53201b395..35e45dd80 100644 --- a/config/locales/models/product_build_list.en.yml +++ b/config/locales/models/product_build_list.en.yml @@ -2,8 +2,6 @@ en: layout: product_build_lists: logs: Logs (last 100 lines) - results: Results - no_results: No results work_env: Work environment iso_builder_folder: folder with contents of the GIT project results_folder: all files from this folder will be uploaded into the file-store @@ -44,6 +42,7 @@ en: params: Params for running script time_living: Max time for building (in minutes) arch: Arch + results: Results product_build_list/results: file_name: File name sha1: SHA1 diff --git a/config/locales/models/product_build_list.ru.yml b/config/locales/models/product_build_list.ru.yml index f762a2527..9741cd1b3 100644 --- a/config/locales/models/product_build_list.ru.yml +++ b/config/locales/models/product_build_list.ru.yml @@ -2,8 +2,6 @@ ru: layout: product_build_lists: logs: Логи (последнии 100 строк) - results: Результаты - no_results: Нет результатов work_env: Рабочее пространство iso_builder_folder: папка с содержимым GIT проекта results_folder: все файлы из этой папки будут загружены на file-store @@ -44,6 +42,7 @@ ru: params: Параметры для запуска скрипта time_living: Максимальное время сборки (в минутах) arch: Архитектура + results: Результаты product_build_list/results: file_name: Имя файла sha1: SHA1