From 008fcb0e9450e2dfebc6aaefdb99842aefeeae7b Mon Sep 17 00:00:00 2001 From: uu59 Date: Mon, 28 Jul 2014 16:39:15 +0900 Subject: [PATCH] Clean up plugins translation --- app/views/plugins/index.html.haml | 3 --- app/views/plugins/installed.html.haml | 20 ++++++++++---------- app/views/plugins/recommended.html.haml | 8 ++++---- app/views/plugins/updated.html.haml | 14 +++++++------- config/locales/translation_en.yml | 15 ++++----------- config/locales/translation_ja.yml | 14 ++++---------- 6 files changed, 29 insertions(+), 45 deletions(-) delete mode 100644 app/views/plugins/index.html.haml diff --git a/app/views/plugins/index.html.haml b/app/views/plugins/index.html.haml deleted file mode 100644 index 3b5bfbb..0000000 --- a/app/views/plugins/index.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -= render partial: "installing" - -= render partial: "list" diff --git a/app/views/plugins/installed.html.haml b/app/views/plugins/installed.html.haml index 8d429a6..c4db3da 100644 --- a/app/views/plugins/installed.html.haml +++ b/app/views/plugins/installed.html.haml @@ -4,18 +4,18 @@ %thead %tr %th.col-lg-1 - %th.col-lg-1= t('.name') - %th{width: 160}= t('.authors') - %th{width: 320}= t('.summary') - %th.col-lg-1= t('.installed_version') - %th.col-lg-1= t('.latest_version') + %th.col-lg-1= t('plugins.common.name') + %th{width: 160}= t('plugins.common.authors') + %th{width: 320}= t('plugins.common.summary') + %th.col-lg-1= t('plugins.common.installed_version') + %th.col-lg-1= t('plugins.common.latest_version') %th.col-lg-1 %tbody - @plugins.each do |plugin| %tr %td %button{class: "btn btn-danger", data: {toggle: "modal", target:" #plugin-modal-#{plugin.gem_name}"}} - = t ".uninstall" + = t "terms.uninstall" .modal.fade{id: "plugin-modal-#{plugin.gem_name}"} .modal-dialog .modal-content @@ -25,13 +25,13 @@ %h4.modal-title = plugin.gem_name .modal-body - = t('.confirm_body', action: t('.uninstall')) + = t('terms.confirm_body', action: t('terms.uninstall')) .modal-footer = form_tag(uninstall_plugins_path, method: :patch) do %button.btn.btn-default{"data-dismiss" => "modal"} Close = hidden_field_tag("plugins[]", plugin.gem_name) - = submit_tag t('.uninstall'), class: "btn btn-danger" + = submit_tag t('terms.uninstall'), class: "btn btn-danger" %td %label{for: "plugin_#{plugin.gem_name}"} = plugin.gem_name @@ -45,12 +45,12 @@ = plugin.latest_version %td - if plugin.latest_version? - = t('.latest_version') + = t('plugins.common.latest_version') - else = form_tag(upgrade_plugins_path, method: :patch) do = hidden_field_tag("plugins[name]", plugin.gem_name) = hidden_field_tag("plugins[version]", plugin.latest_version) - = submit_tag t('.install_latest_version'), class: "btn btn-primary" + = submit_tag t('plugins.common.install_latest_version'), class: "btn btn-primary" :javascript $(document).ready(function() { diff --git a/app/views/plugins/recommended.html.haml b/app/views/plugins/recommended.html.haml index 662ef8b..9e477b5 100644 --- a/app/views/plugins/recommended.html.haml +++ b/app/views/plugins/recommended.html.haml @@ -4,9 +4,9 @@ %thead %tr %th{width: "24"} - %th= t('.name') - %th= t('.category') - %th= t('.status') + %th= t('plugins.common.name') + %th= t('plugins.common.category') + %th= t('plugins.common.status') %th %tbody - @plugins.each do |plugin| @@ -21,7 +21,7 @@ = plugin.category %td - if plugin.installed? - = t(".installed") + = t("plugins.common.installed") - else = t(".not_installed") %td diff --git a/app/views/plugins/updated.html.haml b/app/views/plugins/updated.html.haml index 0eba8a1..6d2944a 100644 --- a/app/views/plugins/updated.html.haml +++ b/app/views/plugins/updated.html.haml @@ -1,16 +1,16 @@ - page_title t('.page_title') - unless @plugins.present? - = t('.no_updates') + = t('plugins.common.no_updates') - else = form_tag(bulk_upgrade_plugins_path, method: :patch) do %table{class: "table table-striped table-hover"} %tr - %th.col-lg-2= t('.name') - %th.col-lg-2= t('.authors') - %th.col-lg-6= t('.summary') - %th.col-lg-1= t('.installed_version') - %th.col-lg-1= t('.latest_version') + %th.col-lg-2= t('plugins.common.name') + %th.col-lg-2= t('plugins.common.authors') + %th.col-lg-6= t('plugins.common.summary') + %th.col-lg-1= t('plugins.common.installed_version') + %th.col-lg-1= t('plugins.common.latest_version') - @plugins.each do |plugin| %tr %td @@ -25,5 +25,5 @@ = plugin.installed_version %td = plugin.latest_version - = submit_tag t(".install_latest"), class: "btn btn-primary" + = submit_tag t("plugins.common.install_latest"), class: "btn btn-primary" diff --git a/config/locales/translation_en.yml b/config/locales/translation_en.yml index 0096472..3f52419 100644 --- a/config/locales/translation_en.yml +++ b/config/locales/translation_en.yml @@ -47,8 +47,7 @@ en: plugins: view_on_rubygems_org: View on rubygems.org - common: &plugin_common - <<: *terms + common: name: Plugin Name status: Status authors: Authors @@ -60,18 +59,12 @@ en: install_latest_version: Install latest version no_updates: No updates available no_installed: No installed plugins - installed: &installed Installed Plugins - recommended: &recommended Recommened Plugins - updated: &updated Updated Plugins installed: - <<: *plugin_common - page_title: *installed + page_title: Installed Plugins recommended: - <<: *plugin_common - page_title: *recommended + page_title: Recommened Plugins updated: - <<: *plugin_common - page_title: *updated + page_title: Updated Plugins users: &users show: diff --git a/config/locales/translation_ja.yml b/config/locales/translation_ja.yml index de69c38..55812f4 100644 --- a/config/locales/translation_ja.yml +++ b/config/locales/translation_ja.yml @@ -47,7 +47,7 @@ ja: plugins: view_on_rubygems_org: rubygems.orgで見る - common: &plugin_common + common: <<: *terms name: プラグイン名 status: 状態 @@ -60,18 +60,12 @@ ja: install_latest_version: 最新バージョンをインストール no_updates: 更新されたプラグインはありません no_installed: インストールされたプラグインはありません - installed: &installed インストール済みプラグイン - recommended: &recommended おすすめプラグイン - updated: &updated 更新のあったプラグイン installed: - <<: *plugin_common - page_title: *installed + page_title: インストール済みプラグイン recommended: - <<: *plugin_common - page_title: *recommended + page_title: おすすめプラグイン updated: - <<: *plugin_common - page_title: *updated + page_title: 更新のあったプラグイン users: &users show: