From e3a716b7dba22a5f522eb1d7e754cc5bbcdf59b9 Mon Sep 17 00:00:00 2001 From: "konstantin.grabar" Date: Fri, 20 Jan 2012 15:29:32 +0400 Subject: [PATCH] [refs #105] Fix some translations --- app/controllers/platforms_controller.rb | 2 +- app/views/devise/shared/_links.haml | 12 ++++++------ .../user_mailer/issue_assign_notification.en.haml | 7 +++++++ ...cation.haml => issue_assign_notification.ru.haml} | 0 .../user_mailer/new_comment_notification.en.haml | 9 +++++++++ ...ication.haml => new_comment_notification.ru.haml} | 0 .../new_comment_reply_notification.en.haml | 9 +++++++++ ...n.haml => new_comment_reply_notification.ru.haml} | 0 app/views/user_mailer/new_issue_notification.en.haml | 7 +++++++ ...ification.haml => new_issue_notification.ru.haml} | 0 app/views/user_mailer/new_user_notification.en.haml | 12 ++++++++++++ ...tification.haml => new_user_notification.ru.haml} | 0 config/locales/en.yml | 11 ++++++++++- config/locales/ru.yml | 10 ++++++++++ 14 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 app/views/user_mailer/issue_assign_notification.en.haml rename app/views/user_mailer/{issue_assign_notification.haml => issue_assign_notification.ru.haml} (100%) create mode 100644 app/views/user_mailer/new_comment_notification.en.haml rename app/views/user_mailer/{new_comment_notification.haml => new_comment_notification.ru.haml} (100%) create mode 100644 app/views/user_mailer/new_comment_reply_notification.en.haml rename app/views/user_mailer/{new_comment_reply_notification.haml => new_comment_reply_notification.ru.haml} (100%) create mode 100644 app/views/user_mailer/new_issue_notification.en.haml rename app/views/user_mailer/{new_issue_notification.haml => new_issue_notification.ru.haml} (100%) create mode 100644 app/views/user_mailer/new_user_notification.en.haml rename app/views/user_mailer/{new_user_notification.haml => new_user_notification.ru.haml} (100%) diff --git a/app/controllers/platforms_controller.rb b/app/controllers/platforms_controller.rb index 3ce47f9a7..9c9563e02 100644 --- a/app/controllers/platforms_controller.rb +++ b/app/controllers/platforms_controller.rb @@ -113,7 +113,7 @@ class PlatformsController < ApplicationController @cloned = @platform.make_clone(:name => params[:platform]['name'], :description => params[:platform]['description'], :owner_id => current_user.id, :owner_type => current_user.class.to_s) if @cloned.persisted? - flash[:notice] = 'Клонирование успешно' + flash[:notice] = I18n.t("flash.platform.clone_success") redirect_to @cloned else flash[:error] = @cloned.errors.full_messages.join('. ') diff --git a/app/views/devise/shared/_links.haml b/app/views/devise/shared/_links.haml index f3c6883ac..958f5ec3c 100644 --- a/app/views/devise/shared/_links.haml +++ b/app/views/devise/shared/_links.haml @@ -1,13 +1,13 @@ - if controller_name != 'sessions' - = link_to "Войти", new_session_path(resource_name), :class => "text_button_padding link_button" + = link_to t("layout.devise.shared_links.sign_in"), new_session_path(resource_name), :class => "text_button_padding link_button" - if devise_mapping.registerable? && controller_name != 'registrations' - = link_to "Зарегистрироваться", new_registration_path(resource_name), :class => "text_button_padding link_button" + = link_to t("layout.devise.shared_links.sign_up"), new_registration_path(resource_name), :class => "text_button_padding link_button" - if devise_mapping.recoverable? && controller_name != 'passwords' - = link_to "Забыли пароль?", new_password_path(resource_name), :class => "text_button_padding link_button" + = link_to t("layout.devise.shared_links.forgot_password"), new_password_path(resource_name), :class => "text_button_padding link_button" - if devise_mapping.confirmable? && controller_name != 'confirmations' - = link_to "Не получили инструкции по подтверждению?", new_confirmation_path(resource_name), :class => "text_button_padding link_button" + = link_to t("layout.devise.shared_links.confirm_again"), new_confirmation_path(resource_name), :class => "text_button_padding link_button" - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' - = link_to "Не получили инструкции по разблокировке?", new_unlock_path(resource_name), :class => "text_button_padding link_button" + = link_to t("layout.devise.shared_links.unlock"), new_unlock_path(resource_name), :class => "text_button_padding link_button" - if devise_mapping.omniauthable? - resource_class.omniauth_providers.each do |provider| - = link_to "Войти через #{provider.to_s.classify}", omniauth_authorize_path(resource_name, provider), :class => "text_button_padding link_button" \ No newline at end of file + = link_to t("layout.devise.shared_links.sign_in_through", :provider => provider.to_s.classify), omniauth_authorize_path(resource_name, provider), :class => "text_button_padding link_button" diff --git a/app/views/user_mailer/issue_assign_notification.en.haml b/app/views/user_mailer/issue_assign_notification.en.haml new file mode 100644 index 000000000..83c33e8ac --- /dev/null +++ b/app/views/user_mailer/issue_assign_notification.en.haml @@ -0,0 +1,7 @@ +%p== Hello, #{@user.name}. + + +%p You have been assigned to issue #{ link_to @issue.title, [@issue.project, @issue] } + + +%p== Support team «ROSA Build System» diff --git a/app/views/user_mailer/issue_assign_notification.haml b/app/views/user_mailer/issue_assign_notification.ru.haml similarity index 100% rename from app/views/user_mailer/issue_assign_notification.haml rename to app/views/user_mailer/issue_assign_notification.ru.haml diff --git a/app/views/user_mailer/new_comment_notification.en.haml b/app/views/user_mailer/new_comment_notification.en.haml new file mode 100644 index 000000000..7c02852bc --- /dev/null +++ b/app/views/user_mailer/new_comment_notification.en.haml @@ -0,0 +1,9 @@ +%p== Hello, #{@user.name}. + + +%p To the issue #{ link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable] } added a comment. + +%p "#{ @comment.body }" + + +%p== Support team «ROSA Build System» diff --git a/app/views/user_mailer/new_comment_notification.haml b/app/views/user_mailer/new_comment_notification.ru.haml similarity index 100% rename from app/views/user_mailer/new_comment_notification.haml rename to app/views/user_mailer/new_comment_notification.ru.haml diff --git a/app/views/user_mailer/new_comment_reply_notification.en.haml b/app/views/user_mailer/new_comment_reply_notification.en.haml new file mode 100644 index 000000000..9324062f2 --- /dev/null +++ b/app/views/user_mailer/new_comment_reply_notification.en.haml @@ -0,0 +1,9 @@ +%p== Hello, #{@user.name}. + + +%p Your comment into issue #{ link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable] } has been answered. + +%p "#{ @comment.body }" + + +%p== Support team «ROSA Build System» diff --git a/app/views/user_mailer/new_comment_reply_notification.haml b/app/views/user_mailer/new_comment_reply_notification.ru.haml similarity index 100% rename from app/views/user_mailer/new_comment_reply_notification.haml rename to app/views/user_mailer/new_comment_reply_notification.ru.haml diff --git a/app/views/user_mailer/new_issue_notification.en.haml b/app/views/user_mailer/new_issue_notification.en.haml new file mode 100644 index 000000000..f814fa617 --- /dev/null +++ b/app/views/user_mailer/new_issue_notification.en.haml @@ -0,0 +1,7 @@ +%p== Hello, #{@user.name}. + + +%p To project #{ link_to @issue.project.name, project_path(@issue.project) } has been added an issue #{ link_to @issue.title, [@issue.project, @issue] } + + +%p== Support team «ROSA Build System» diff --git a/app/views/user_mailer/new_issue_notification.haml b/app/views/user_mailer/new_issue_notification.ru.haml similarity index 100% rename from app/views/user_mailer/new_issue_notification.haml rename to app/views/user_mailer/new_issue_notification.ru.haml diff --git a/app/views/user_mailer/new_user_notification.en.haml b/app/views/user_mailer/new_user_notification.en.haml new file mode 100644 index 000000000..d1a0722bf --- /dev/null +++ b/app/views/user_mailer/new_user_notification.en.haml @@ -0,0 +1,12 @@ +%p== Hello, #{@user.name}. + + +%p You have been sign up to project «ROSA Build System» and now can sign in. + + +%p + ==Your email : #{@user.email} + %br/ + ==Your password: #{@user.password} + +%p== Support team «ROSA Build System» diff --git a/app/views/user_mailer/new_user_notification.haml b/app/views/user_mailer/new_user_notification.ru.haml similarity index 100% rename from app/views/user_mailer/new_user_notification.haml rename to app/views/user_mailer/new_user_notification.ru.haml diff --git a/config/locales/en.yml b/config/locales/en.yml index 4fa4edbc8..6e3bc7268 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -46,6 +46,15 @@ en: edit_header: Notifier setting processing: working ... + devise: + shared_links: + sign_in: Sign in + sign_up: Sign up + forgot_password: Forgot your password? + confirm_again: Do not receive the confirmation link? + unlock: Do not receive unlock instructions? + sign_in_through: Sign in by %{provider} + downloads: title: Downloads statistic message: Automatically updated every 5 minutes @@ -690,4 +699,4 @@ en: new_comment_notification: New comment to your task new_issue_notification: New task added to project new_user_notification: Registered on project «%{ project_name }» - issue_assign_notification: New task assigned \ No newline at end of file + issue_assign_notification: New task assigned diff --git a/config/locales/ru.yml b/config/locales/ru.yml index a6c7c7229..2e1453965 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -46,6 +46,15 @@ ru: edit_header: Настройки оповещений processing: Обрабатывается... + devise: + shared_links: + sign_in: Войти + sign_up: Зарегистрироваться + forgot_password: Забыли пароль? + confirm_again: Не получили инструкции по подтверждению? + unlock: Не получили инструкции по разблокировке? + sign_in_through: Войти через %{provider} + downloads: title: Статистика закачек пакетов message: Обновляется автоматически каждые 5 минут @@ -451,6 +460,7 @@ ru: unfreeze_error: Не удалось разморозить платформу, попробуйте еще раз destroyed: Платформа успешно удалена build_all_success: Все проекты успешно отправлены на сборку + clone_success: Клонирование успешно build_list: saved: Билд лист для версии '%{project_version}', платформы '%{bpl}' и архитектуры '%{arch}' создан успешно