OSDN Git Service

follow i18n
authoryasushiito <yas@pen-chan.jp>
Sun, 9 Dec 2012 00:07:34 +0000 (09:07 +0900)
committeryasushiito <yas@pen-chan.jp>
Sun, 9 Dec 2012 00:07:34 +0000 (09:07 +0900)
30 files changed:
app/controllers/providers_controller.rb
app/models/provider.rb
app/views/demander_statuses/_basic.html.erb
app/views/demander_statuses/_demander.html.erb
app/views/demander_statuses/_form.html.erb
app/views/demander_statuses/edit.html.erb
app/views/demander_statuses/index.html.erb
app/views/demander_statuses/show.html.erb
app/views/demanders/_form.html.erb
app/views/demanders/edit.html.erb
app/views/demanders/index.html.erb
app/views/demanders/new.html.erb
app/views/demanders/show.html.erb
app/views/layouts/test.html.erb
app/views/provider_sources/_ng.html.erb
app/views/provider_sources/_ok.html.erb
app/views/provider_sources/import.html.erb
app/views/provider_sources/index.html.erb
app/views/provider_statuses/_basic.html.erb
app/views/provider_statuses/_form.html.erb
app/views/provider_statuses/_provider.html.erb
app/views/provider_statuses/edit.html.erb
app/views/provider_statuses/index.html.erb
app/views/provider_statuses/show.html.erb
app/views/providers/index.html.erb
app/views/providers/show.html.erb
config/locales/ja.yml
config/locales/pettanr.ja.yml
config/magic_number.yml
config/routes.rb

index d229d28..161e5d7 100644 (file)
@@ -1,6 +1,6 @@
 class ProvidersController < ApplicationController
   layout 'test' if MagicNumber['test_layout']
-  before_filter :authenticate_admin!, :only => [:index, :show]
+  before_filter :authenticate_admin!, :only => [:index, :show, :destroy]
 
   def index
     @page = Provider.page params[:page]
@@ -27,4 +27,7 @@ class ProvidersController < ApplicationController
     end
   end
 
+  def destroy
+  end
+  
 end
index b7936b6..f06602d 100644 (file)
@@ -3,10 +3,10 @@ class Provider < ActiveRecord::Base
   
   validates :name, :presence => true, :length => {:maximum => 50}, :uniqueness => true
   validates :caption, :presence => true, :length => {:maximum => 30}
-  validates :url, :presence => true, :length => {:maximum => 200}, :url => true
+  validates :url, :presence => true, :length => {:maximum => 200}, :url => {:message => I18n.t('errors.messages.url')}
   validates :description, :presence => true
-  validates :demander_url, :presence => true, :length => {:maximum => 200}, :url => true
-  validates :provider_status_id, :presence => true, :numericality => true, :existence => true
+  validates :demander_url, :presence => true, :length => {:maximum => 200}, :url => {:message => I18n.t('errors.messages.url')}
+  validates :provider_status_id, :presence => true, :numericality => true, :existence => {:both => false}
 
   def supply_default
     self.provider_status_id = nil
index 6cf7319..c3ba211 100644 (file)
@@ -1,16 +1,16 @@
 <p>
-requested_at
-<%= (demander_status.requested_at) if demander_status.requested_at %>
+  <%= t_m 'DemanderStatus.requested_at' -%>
+  <%= l(demander_status.requested_at) if demander_status.requested_at %>
 </p>
 <p>
-rejected_at
-<%= (demander_status.rejected_at) if demander_status.rejected_at %>
+  <%= t_m 'DemanderStatus.rejected_at' -%>
+  <%= l(demander_status.rejected_at) if demander_status.rejected_at %>
 </p>
 <p>
-approved_at
-<%= (demander_status.approved_at) if demander_status.approved_at %>
+  <%= t_m 'DemanderStatus.approved_at' -%>
+  <%= l(demander_status.approved_at) if demander_status.approved_at %>
 </p>
 <p>
-token
-<%= (demander_status.demander.demand_user.authentication_token) if demander_status.demander.demand_user.authentication_token %>
+  <%= t_m 'DemandUser.authentication_token' -%>
+  <%= (demander_status.demander.demand_user.authentication_token) if demander_status.demander.demand_user.authentication_token %>
 </p>
index e7c077e..f558fd2 100644 (file)
@@ -1,16 +1,16 @@
 <p>
-caption
-<%= h(demander.caption) %>
+  <%= t_m 'Demander.caption' -%>
+  <%= h(demander.caption) %>
 </p>
 <p>
-name
-<%= h(demander.name) %>
+  <%= t_m 'Demander.name' -%>
+  <%= h(demander.name) %>
 </p>
 <p>
-description
-<%= h(demander.description) %>
+  <%= t_m 'Demander.description' -%>
+  <%= h(demander.description) %>
 </p>
 <p>
-status
-<%= h(MagicNumber['demander_status_items'][demander.demander_status.status].first) %>
+  <%= t 'demander_statuses.status' -%>
+  <%= t(MagicNumber['demander_status_status_items'][demander.demander_status.status].first) %>
 </p>
index e9234e6..e4f5b42 100644 (file)
@@ -1,15 +1,5 @@
 <%= form_for(@demander_status) do |f| %>
-  <% if @demander_status.errors.any? %>
-    <div id="error_explanation">
-      <h2><%= pluralize(@demander_status.errors.count, "error") %> prohibited this comic from being saved:</h2>
-
-      <ul>
-      <% @demander_status.errors.full_messages.each do |msg| %>
-        <li><%= msg %></li>
-      <% end %>
-      </ul>
-    </div>
-  <% end %>
+  <%= render 'system/error_explanation', :obj => @demander_status %>
 
   <div class="field">
     <p>
index 99ca4db..03bf861 100644 (file)
@@ -1,4 +1,4 @@
-<h1>貸与状況</h1>
+<h1><%= t('.title') %></h1>
 <p id="notice"><%= notice %></p>
 
 <%= render 'demander', :demander => @demander_status.demander %>
index 16251c5..de9eabc 100644 (file)
@@ -1,15 +1,17 @@
-<h1>貸与状況一覧</h1>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
+
 <table>
   <tr>
-    <th>caption</th>
-    <th>name</th>
-    <th>status</th>
-    <th>requested_at</th>
-    <th>rejected_at</th>
-    <th>approved_at</th>
-    <th>receive_hour1</th>
-    <th>receive_hour2</th>
-    <th>開く</th>
+    <th><%= t_m 'Demander.caption' -%></th>
+    <th><%= t_m 'Demander.name' -%></th>
+    <th><%= t 'demander_statuses.status' -%></th>
+    <th><%= t_m 'DemanderStatus.requested_at' -%></th>
+    <th><%= t_m 'DemanderStatus.rejected_at' -%></th>
+    <th><%= t_m 'DemanderStatus.approved_at' -%></th>
+    <th><%= t_m 'DemanderStatus.receive_hour1' -%></th>
+    <th><%= t_m 'DemanderStatus.receive_hour2' -%></th>
+    <th><%= t('demander_statuses.open') -%></th>
   </tr>
   
   <% @demander_statuses.each do |demander_status| %>
         <%= h(truncate(demander_status.demander.name, :length => 12)) %>
       </td>
       <td>
-        <%= h(MagicNumber['demander_status_items'][demander_status.status].first) %>
+        <%= t(MagicNumber['demander_status_status_items'][demander_status.status].first) %>
       </td>
       <td>
-        <%=  (demander_status.requested_at) if demander_status.requested_at  %>
+        <%= l(demander_status.requested_at) if demander_status.requested_at  %>
       </td>
       <td>
-        <%=  (demander_status.rejected_at) if demander_status.rejected_at  %>
+        <%= l(demander_status.rejected_at) if demander_status.rejected_at  %>
       </td>
       <td>
-        <%= (demander_status.approved_at) if demander_status.approved_at  %>
+        <%= l(demander_status.approved_at) if demander_status.approved_at  %>
       </td>
       <td>
-        <%=  (demander_status.receive_hour1) if demander_status.receive_hour1 %>
+        <%= h(demander_status.receive_hour1) if demander_status.receive_hour1 %>
       </td>
       <td>
-        <%=  (demander_status.receive_hour2) if demander_status.receive_hour2 %>
+        <%= h(demander_status.receive_hour2) if demander_status.receive_hour2 %>
       </td>
       <td>
-        <%= link_to '開く', demander_status.demander.url %>
+        <%= link_to t('demander_statuses.open'), demander_status.demander.url %>
       </td>
     </tr>
   <% end %>
 </table>
 <div>
 <% if @hide.blank? %>
-  <%= link_to '申請中の借手の貸与状況だけを表示する', demander_statuses_path(:hide => 1) %>
+  <%= link_to t('demander_statuses.wait'), demander_statuses_path(:hide => 1) %>
 <% else %>
-  <%= link_to 'すべての借手の貸与状況を表示する', demander_statuses_path %>
+  <%= link_to t('demander_statuses.all'), demander_statuses_path %>
 <% end %>
 </div>
index 92eefbc..b2443c6 100644 (file)
@@ -1,36 +1,36 @@
-<h1>貸与状況</h1>
+<h1><%= t('.title') %></h1>
 <p id="notice"><%= notice %></p>
 
 <%= render 'demander', :demander => @demander_status.demander %>
 <%= render 'basic', :demander_status => @demander_status %>
 
 <p>
-receive_hour1
-<%= h(@demander_status.receive_hour1) if @demander_status.receive_hour1 %>
+  <%= t_m 'DemanderStatus.receive_hour1' -%>
+  <%= h(@demander_status.receive_hour1) if @demander_status.receive_hour1 %>
 </p>
 <p>
-receive_hour2
-<%= h(@demander_status.receive_hour2) if @demander_status.receive_hour2 %>
+  <%= t_m 'DemanderStatus.receive_hour2' -%>
+  <%= h(@demander_status.receive_hour2) if @demander_status.receive_hour2 %>
 </p>
 
 <p>
-  <%= link_to 'サイトを開く', @demander_status.demander.url %>
+  <%= link_to t('demander_statuses.show.demander_open'), @demander_status.demander.url %>
 </p>
 
 <p>
   <% case @demander_status.status %>
   <% when 0 %>
   <% when 1 %>
-    <%= link_to 'この借手の否決を覆して貸与する', edit_demander_status_path(@demander_status) %>
+    <%= link_to t('demander_statuses.show.reapprove'), edit_demander_status_path(@demander_status) %>
   <% when 2 %>
     <p>
-      借受申請に対して返答してください
+      <%= t('demander_statuses.show.approve_announce') %>
     </p>
-    <%= link_to 'この借手に貸与を開始する', edit_demander_status_path(@demander_status) %>
-    <%= link_to 'この借手には貸与しない', demander_status_path(@demander_status), :method => :delete %>
+    <%= link_to t('demander_statuses.show.approve'), edit_demander_status_path(@demander_status) %>
+    <%= link_to t('demander_statuses.show.reject'), demander_status_path(@demander_status), :method => :delete %>
   <% when 3 %>
-    <%= link_to 'この借手の貸与を停止する', demander_status_path(@demander_status), :method => :delete %>
+    <%= link_to t('demander_statuses.show.stop'), demander_status_path(@demander_status), :method => :delete %>
   <% end %>
 </p>
-<%= link_to 'Back', demander_statuses_path %>
+<%= link_to t('link.back'), demander_statuses_path %>
 
index 3322316..deb7594 100644 (file)
@@ -1,15 +1,5 @@
 <%= form_for(@demander) do |f| %>
-  <% if @demander.errors.any? %>
-    <div id="error_explanation">
-      <h2><%= pluralize(@demander.errors.count, "error") %> prohibited this comic from being saved:</h2>
-
-      <ul>
-      <% @demander.errors.full_messages.each do |msg| %>
-        <li><%= msg %></li>
-      <% end %>
-      </ul>
-    </div>
-  <% end %>
+  <%= render 'system/error_explanation', :obj => @demander %>
 
   <div class="field">
     <%= f.label :name %><br />
index 7bb4aa7..a84f7fb 100644 (file)
@@ -1,4 +1,5 @@
-<h1>edit Demander</h1>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
 
 <%= render 'form' %>
-<%= link_to 'Back', demanders_path %>
+<%= link_to t('link.back'), demanders_path %>
index f778c69..763fce2 100644 (file)
@@ -1,37 +1,38 @@
-<h1>借手メニュー</h1>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
 
 <p>
-caption
-<%= h(@demander.caption) %>
+  <%= t_m 'Demander.caption' -%>
+  <%= h(@demander.caption) %>
 </p>
 <p>
-name
-<%= h(@demander.name) %>
+  <%= t_m 'Demander.name' -%>
+  <%= h(@demander.name) %>
 </p>
 <p>
-status
-<%= h(MagicNumber['demander_status_items'][@demander.demander_status.status].first) %>
+  <%= t 'demanders.status' -%>
+  <%= t(MagicNumber['demander_status_status_items'][@demander.demander_status.status].first) %>
 </p>
 <% if @demander.status == 3 %>
   <p>
-  receive_hour1
-  <%= (@demander.demander_status.receive_hour1) %>
+    <%= t_m 'DemanderStatus.receive_hour1' -%>
+    <%= h(@demander.demander_status.receive_hour1) %>
   </p>
   <p>
-  receive_hour2
-  <%= (@demander.demander_status.receive_hour2) %>
+    <%= t_m 'DemanderStatus.receive_hour2' -%>
+    <%= h(@demander.demander_status.receive_hour2) %>
   </p>
 <% end %>
 
 <div>
-  <%= link_to 'サイトプロフィールを表示する', demander_path(@demander) %>
+  <%= link_to t('demanders.index.to_show'), demander_path(@demander) %>
   <% case @demander.status %>
   <% when 0, 1 %>
     <%= form_tag(:action => :req) do %>
-      <%= submit_tag 'request' -%>
+      <%= submit_tag t('demanders.index.request') -%>
     <% end -%>
   <% when 2 %>
   <% when 3 %>
-    <%= link_to '借受を中止する', demander_path(@demander), :method => :delete %>
+    <%= link_to t('demanders.index.stop'), demander_path(@demander), :method => :delete %>
   <% end -%>
 </div>
index a433bc5..a870e65 100644 (file)
@@ -1,5 +1,6 @@
-<h1>New Demander</h1>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
 
 <%= render 'form' %>
 
-<%= link_to 'Back', demanders_path %>
+<%= link_to t('link.back'), demanders_path %>
index ca052a8..0f2f070 100644 (file)
@@ -1,32 +1,32 @@
-<h1>借手</h1>
+<h1><%= t('.title') %></h1>
 <p id="notice"><%= notice %></p>
 
 <p>
-caption
-<%= h(@demander.caption) %>
+  <%= t_m 'Demander.caption' -%>
+  <%= h(@demander.caption) %>
 </p>
 <p>
-name
-<%= h(@demander.name) %>
+  <%= t_m 'Demander.name' -%>
+  <%= h(@demander.name) %>
 </p>
 <p>
-url
-<%= @demander.url %>
+  <%= t_m 'Demander.url' -%>
+  <%= @demander.url %>
 </p>
 <p>
-description 
-<%= h(@demander.description) %>
+  <%= t_m 'Demander.description' -%>
+  <%= h(@demander.description) %>
 </p>
 <p>
-demander_url
-<%= @demander.demander_url %>
+  <%= t_m 'Demander.demander_url' -%>
+  <%= @demander.demander_url %>
 </p>
 
 <p>
-status
-<%= h(MagicNumber['demander_status_items'][@demander.demander_status.status].first) %>
+  <%= t 'demanders.status' -%>
+  <%= t(MagicNumber['demander_status_status_items'][@demander.demander_status.status].first) %>
 </p>
 
 <%= link_to 'Edit', edit_demander_path(@demander) %>
-<%= link_to 'Back', demanders_path %>
+<%= link_to t('link.back'), demanders_path %>
 
index 7c3cd07..7023dfd 100644 (file)
   <% end %>\r
 </div>\r
 <%= yield %>\r
-<div>\r
-  demanders\r
+<div width="100%" style="background-color: #faddfa; padding: 5px;">\r
+  <%= link_to t('tab.demander.title'), main_app.demanders_path %>\r
   <% if demand_user_signed_in? %>\r
-    <%= link_to "demanders", main_app.demanders_path %>\r
-    <%= link_to "sign out", main_app.destroy_demand_user_session_path, :method => :delete %>\r
+    <%= link_to t_m('Demander'), main_app.demanders_path %>\r
+    <%= link_to t('home.sign_out.title'), main_app.destroy_demand_user_session_path, :method => :delete %>\r
   <% else %>\r
-    <%= link_to "sign in", main_app.new_demand_user_session_path %>\r
+    <%= link_to t('home.sign_in.title'), main_app.new_demand_user_session_path %>\r
   <% end %>\r
 </div>\r
 <div width="100%" style="background-color: #ddddfa; padding: 5px;">\r
+  <%= link_to t('tab.system.title'), '/system' %>\r
   <% if admin_signed_in? %>\r
-    <%= link_to t('tab.system.title'), '/system' %>\r
-    <%= link_to "browse", '/system/browse' %>\r
-    <%= link_to "approve", '/system/waiting_list' %>\r
-    <%= link_to "token", '/system/auth_token' %>\r
-    layout:\r
-    <%= link_to "test", '/system/test_layout' %>\r
-    <%= link_to "production", '/system/production_layout' %>\r
-    <%= link_to "sign out", main_app.destroy_admin_session_path, :method => :delete %>\r
+    <%= link_to t('tab.system.browse'), '/system/browse' %>\r
+    <%= link_to t('tab.system.approve'), '/system/waiting_list' %>\r
+    <%= link_to t('tab.system.port'), '/system/import' %>\r
+    <%= link_to t('tab.system.token'), '/system/auth_token' %>\r
+    <%= t('tab.system.layout') %>:\r
+    <%= link_to t('tab.system.test'), '/system/test_layout' %>\r
+    <%= link_to t('tab.system.production'), '/system/production_layout' %>\r
+    <%= link_to t('home.sign_out.title'), main_app.destroy_admin_session_path, :method => :delete %>\r
   <% else %>\r
-    <%= link_to "sign in", main_app.new_admin_session_path %>\r
+    <%= link_to t('home.sign_in.title'), main_app.new_admin_session_path %>\r
   <% end %>\r
 </div>\r
 <%= javascript_tag 'var server_result=' + @server_result.to_json + ';' %>\r
index 24ab5bb..f78ebb9 100644 (file)
@@ -1,12 +1,9 @@
 <h3>
-  貸手文献の読み込みに失敗しました
+  <%= t('provider_sources.import.ng') %>
 </h3>
 <p>
-  貸手文献がない、貸手文献を管理しているサーバが応答しない、ネットに接続されていない、などの理由が考えられます。
+  <%= t('provider_sources.import.ng_reason') %>
 </p>
 <p>
   <%= exception[:message] %>
 </p>
-<p>
-  <%= exception[:location] %>
-</p>
index 7a986a4..75e6d37 100644 (file)
@@ -1,23 +1,16 @@
 <% if validations.empty? %>
   <h3>
-    この貸手文献は正常にインポートされました
+    <%= t('provider_sources.import.ok') %>
   </h3>
 <% else %>
   <h3>
-    この貸手文献でインポートできなかった貸手があります
+    <%= t('provider_sources.import.ok_but') %>
   </h3>
   <p>
-    貸手文献が壊れている、サーバの設定が正しくない、などの理由が考えられます。
+    <%= t('provider_sources.import.ok_reason') %>
   </p>
   <% validations.each do |provider| %>
     <%= h provider.name -%>(<%= h provider.caption -%>)
-    <div id="error_explanation">
-      <h2><%= pluralize(provider.errors.count, "error") %></h2>
-      <ul>
-      <% provider.errors.full_messages.each do |msg| %>
-        <li><%= msg %></li>
-      <% end %>
-      </ul>
-    </div>
+    <%= render 'system/error_explanation', :obj => provider %>
   <% end %>
 <% end %>
index c7f5a7f..6f508e1 100644 (file)
@@ -1,5 +1,7 @@
-<h1>Result Importing</h1>
-<%= @results.size %>件の貸手文献をインポートしました。
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
+<%= @results.size -%>
+<%= t('provider_sources.import.result') %>
 
 <% @results.each do |url, result| %>
   <h2>
@@ -13,3 +15,5 @@
     Undefined result
   <% end %>
 <% end %>
+<%= link_to t('provider_sources.import.to_providers'), providers_path %>
+<%= link_to t('provider_sources.import.to_provider_sources'), provider_sources_path %>
index 900b2e1..314f728 100644 (file)
@@ -1,8 +1,9 @@
-<h1>Listing Provider Sources</h1>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
 
 <table>
   <tr>
-    <th>url</th>
+    <th><%= t('provider_sources.index.url') %></th>
   </tr>
   <% @urls.each do |url| %>
     <tr>
@@ -10,6 +11,4 @@
     </tr>
   <% end %>
 </table>
-<%= form_tag({:controller => 'provider_sources',:action => "import"}, {:method => :post}) do %>
-  <%= submit_tag 'import' -%>
-<% end -%>
+<%= button_to t('provider_sources.index.submit'), import_provider_sources_path %>
index a82e895..2e4f9fa 100644 (file)
@@ -1,4 +1,4 @@
 <p>
-received_at
-<%= l(provider_status.received_at) if provider_status.received_at %>
+  <%= t_m 'ProviderStatus.received_at' -%>
+  <%= l(provider_status.received_at) if provider_status.received_at %>
 </p>
index fd02b24..f23d794 100644 (file)
@@ -1,15 +1,5 @@
 <%= form_for(@provider_status) do |f| %>
-  <% if @provider_status.errors.any? %>
-    <div id="error_explanation">
-      <h2><%= pluralize(@provider_status.errors.count, "error") %> prohibited this comic from being saved:</h2>
-
-      <ul>
-      <% @provider_status.errors.full_messages.each do |msg| %>
-        <li><%= msg %></li>
-      <% end %>
-      </ul>
-    </div>
-  <% end %>
+  <%= render 'system/error_explanation', :obj => @provider_status %>
 
   <div class="field">
     <p>
index 113f18c..0adccab 100644 (file)
@@ -1,16 +1,16 @@
 <p>
-caption
-<%= h(provider.caption) %>
+  <%= t_m 'Provider.caption' -%>
+  <%= h(provider.caption) %>
 </p>
 <p>
-name
-<%= h(provider.name) %>
+  <%= t_m 'Provider.name' -%>
+  <%= h(provider.name) %>
 </p>
 <p>
-description
-<%= h(provider.description) %>
+  <%= t_m 'Provider.description' -%>
+  <%= h(provider.description) %>
 </p>
 <p>
-status
-<%= h(MagicNumber['provider_status_items'][provider.provider_status.status].first) %>
+  <%= t 'providers.status' -%>
+  <%= t(MagicNumber['provider_status_status_items'][provider.provider_status.status].first) %>
 </p>
index a525d00..19042d2 100644 (file)
@@ -1,4 +1,4 @@
-<h1>借受</h1>
+<h1><%= t('.title') %></h1>
 <p id="notice"><%= notice %></p>
 
 <%= render 'provider', :provider => @provider_status.provider %>
index 1347e58..f3ee0c1 100644 (file)
@@ -1,13 +1,15 @@
-<h1>借受状況一覧</h1>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
+
 <table>
   <tr>
-    <th>caption</th>
-    <th>name</th>
-    <th>status</th>
-    <th>received_at</th>
-    <th>receive_hour1</th>
-    <th>receive_hour2</th>
-    <th>開く</th>
+    <th><%= t_m 'Provider.caption' -%></th>
+    <th><%= t_m 'Provider.name' -%></th>
+    <th><%= t 'provider_statuses.status' -%></th>
+    <th><%= t_m 'ProviderStatus.received_at' -%></th>
+    <th><%= t_m 'ProviderStatus.receive_hour1' -%></th>
+    <th><%= t_m 'ProviderStatus.receive_hour2' -%></th>
+    <th><%= t 'provider_statuses.open' -%></th>
   </tr>
   
   <% @provider_statuses.each do |provider_status| %>
         <%= h(truncate(provider_status.provider.name, :length => 12)) %>
       </td>
       <td>
-        <%= h(MagicNumber['provider_status_items'][provider_status.status].first) %>
+        <%= t(MagicNumber['provider_status_status_items'][provider_status.status].first) %>
       </td>
       <td>
         <%= l(provider_status.received_at) if provider_status.received_at  %>
       </td>
       <td>
-        <%= l(provider_status.receive_hour1) if provider_status.receive_hour1 %>
+        <%= h(provider_status.receive_hour1) if provider_status.receive_hour1 %>
       </td>
       <td>
-        <%= l(provider_status.receive_hour2) if provider_status.receive_hour2 %>
+        <%= h(provider_status.receive_hour2) if provider_status.receive_hour2 %>
       </td>
       <td>
-        <%= link_to '開く', provider_status.provider.demander_url %>
+        <%= link_to t('provider_statuses.open'), provider_status.provider.demander_url %>
       </td>
     </tr>
   <% end %>
 </table>
 <div>
 <% if @hide.blank? %>
-  <%= link_to '待機中の貸手の借受状況だけを表示する', provider_statuses_path(:hide => 1) %>
+  <%= link_to t('provider_statuses.wait'), provider_statuses_path(:hide => 1) %>
 <% else %>
-  <%= link_to 'すべての貸手の借受状況を表示する', provider_statuses_path %>
+  <%= link_to t('provider_statuses.all'), provider_statuses_path %>
 <% end %>
 </div>
 <div>
-  <%= link_to '貸手に切り替える', providers_path(:page => @page, :page_size => @page_size, :hide => @hide) %>
+  <%= link_to t('provider_statuses.to_provider'), providers_path(:page => @page, :page_size => @page_size, :hide => @hide) %>
 </div>
index 8775a6e..4edf450 100644 (file)
@@ -1,38 +1,41 @@
-<h1>借受状況</h1>
+<h1><%= t('.title') %></h1>
 <p id="notice"><%= notice %></p>
 
 <%= render 'provider', :provider => @provider_status.provider %>
 <%= render 'basic', :provider_status => @provider_status %>
 
 <p>
-token
-<%= h(@provider_status.token) %>
+  <%= t_m 'ProviderStatus.token' -%>
+  <%= h(@provider_status.token) %>
 </p>
 <p>
-receive_hour1
-<%= h(@provider_status.receive_hour1) if @provider_status.receive_hour1 %>
+  <%= t_m 'ProviderStatus.receive_hour1' -%>
+  <%= h(@provider_status.receive_hour1) if @provider_status.receive_hour1 %>
 </p>
 <p>
-receive_hour2
+  <%= t_m 'ProviderStatus.receive_hour2' -%>
 <%= h(@provider_status.receive_hour2) if @provider_status.receive_hour2 %>
 </p>
 <p>
-  <%= link_to '貸手', providers_path(@provider_status.provider) %>
+  <%= link_to t('provider_statuses.show.to_provider'), providers_path(@provider_status.provider) %>
 </p>
 
 <p>
-  <%= link_to 'サイトの借手向けページを開く', @provider_status.provider.demander_url %>
+  <%= link_to t('provider_statuses.show.user_open'), @provider_status.provider.url %>
 </p>
+<p>
+  <%= link_to t('provider_statuses.show.demander_open'), @provider_status.provider.demander_url %>
+<p>
 
 <p>
-  借受するには借手となって借受申請する。 
+  <%= t('provider_statuses.show.receive_announce') %>
 </p>
 <p>
   <% if @provider_status.status == 0 %>
-    <%= link_to 'この貸手からの借受を開始する', edit_provider_status_path(@provider_status) %>
+    <%= link_to t('provider_statuses.show.receive_start'), edit_provider_status_path(@provider_status) %>
   <% else %>
-    <%= link_to '借受を停止する', provider_status_path(@provider_status), :method => :delete %>
+    <%= link_to t('provider_statuses.show.receive_stop'), provider_status_path(@provider_status), :method => :delete %>
   <% end %>
 </p>
-<%= link_to 'Back', provider_statuses_path %>
+<%= link_to t('link.back'), provider_statuses_path %>
 
index e55ff37..1fc213e 100644 (file)
@@ -1,11 +1,13 @@
-<h1>貸手一覧</h1>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
+
 <table>
   <tr>
-    <th>caption</th>
-    <th>name</th>
-    <th>description</th>
-    <th>status</th>
-    <th>開く</th>
+    <th><%= t_m 'Provider.caption' -%></th>
+    <th><%= t_m 'Provider.name' -%></th>
+    <th><%= t_m 'Provider.description' -%></th>
+    <th><%= t 'providers.status' -%></th>
+    <th><%= t 'providers.open' -%></th>
   </tr>
   
   <% @providers.each do |provider| %>
         <%= h(truncate(provider.description, :length => 30)) %>
       </td>
       <td>
-        <%= link_to h(MagicNumber['provider_status_items'][provider.status].first), provider_status_path(provider.provider_status) %>
+        <%= link_to t(MagicNumber['provider_status_status_items'][provider.status].first), provider_status_path(provider.provider_status) %>
       </td>
       <td>
-        <%= link_to '開く', provider.url %>
+        <%= link_to t('providers.open'), provider.url %>
       </td>
     </tr>
   <% end %>
 </table>
 <div>
 <% if @hide.blank? %>
-  <%= link_to '待機中の貸手だけを表示する', providers_path(:hide => 1) %>
+  <%= link_to t('providers.wait'), providers_path(:hide => 1) %>
 <% else %>
-  <%= link_to 'すべての貸手を表示する', providers_path %>
+  <%= link_to t('providers.all'), providers_path %>
 <% end %>
 </div>
 <div>
-  <%= link_to '借受状況に切り替える', provider_statuses_path(:page => @page, :page_size => @page_size, :hide => @hide) %>
+  <%= link_to t('providers.to_provider_status'), provider_statuses_path(:page => @page, :page_size => @page_size, :hide => @hide) %>
 </div>
index 2d0a458..a4ebf00 100644 (file)
@@ -1,42 +1,42 @@
-<h1>貸手</h1>
+<h1><%= t('.title') %></h1>
 <p id="notice"><%= notice %></p>
 
 <p>
-caption
-<%= h(@provider.caption) %>
+  <%= t_m 'Provider.caption' -%>
+  <%= h(@provider.caption) %>
 </p>
 <p>
-name
-<%= h(@provider.name) %>
+  <%= t_m 'Provider.name' -%>
+  <%= h(@provider.name) %>
 </p>
 <p>
-url
-<%= @provider.url %>
+  <%= t_m 'Provider.url' -%>
+  <%= @provider.url %>
 </p>
 <p>
-status
-<%= h(MagicNumber['provider_status_items'][@provider.provider_status.status].first) %>
+  <%= t_m 'Provider.description' -%> 
+  <%= h(@provider.description) %>
 </p>
 <p>
-description 
-<%= h(@provider.description) %>
+  <%= t 'providers.status' -%>
+  <%= t(MagicNumber['provider_status_status_items'][@provider.provider_status.status].first) %>
 </p>
 
 <p>
-  <%= link_to 'サイトを開く', @provider.url %>
+  <%= link_to t('providers.show.user_open'), @provider.url %>
 </p>
 <p>
-  <%= link_to '貸手を開く', @provider.demander_url %>
+  <%= link_to t('providers.show.demander_open'), @provider.demander_url %>
 </p>
 <p>
-  <%= link_to '借受状況', provider_status_path(@provider.provider_status) %>
+  <%= link_to t('providers.show.to_provider_status'), provider_status_path(@provider.provider_status) %>
 </p>
 <p>
   <% if @provider.status == 0 %>
-    <%= link_to '貸手を削除する', providers_path %>
+    <%= link_to t('providers.show.destroy'), provider_path(@provider), :method => :delete %>
   <% else %>
   <% end %>
 </p>
 
-<%= link_to 'Back', providers_path %>
+<%= link_to t('link.back'), providers_path %>
 
index ec25b8d..d212534 100644 (file)
@@ -119,6 +119,8 @@ ja:
       too_long: は%{count}文字以内で入力してください。
       too_short: は%{count}文字以上で入力してください。
       wrong_length: は%{count}文字で入力してください。
+      existence: は存在しません。
+      url: はurlの書式で入力してください。
     template:
       body: 次の項目を確認してください。
       header:
index f61cb78..5747107 100644 (file)
@@ -22,6 +22,13 @@ ja:
       artist: 絵師
       system_picture: システム画像
       color: 色
+      provider: 貸手
+      provider_status: 借受状況
+      demander: 借手
+      demander_status: 貸与状況
+      provider_license: ライセンス対照表
+      provider_artist: 絵師対照表
+      provider_original_picture: 原画対照表
     attributes:
       user:
         name: ペンネーム
@@ -30,6 +37,14 @@ ja:
         password_confirmation: 確認パスワード
         current_password: 現在のパスワード
         remember_me: 次回から自動でログイン
+        authentication_token: 認証トークン
+      demand_user:
+        email: メールアドレス
+        password: パスワード
+        password_confirmation: 確認パスワード
+        current_password: 現在のパスワード
+        remember_me: 次回から自動でログイン
+        authentication_token: 認証トークン
       comic:
         title: タイトル
         visible: 公開
@@ -206,6 +221,50 @@ ja:
         t: 並び順
         created_at: 作成
         updated_at: 更新
+      provider:
+        provider_status_id: 借受状況
+        name: 管理名
+        caption: サイト名
+        url: サイトトップページurl
+        description: サイト紹介文
+        demander_url: 借手ページurl
+        created_at: 作成
+        updated_at: 更新
+      provider_status:
+        token: トークン
+        receive_hour1: 巡回時1
+        receive_hour2: 巡回時2
+        received_at: 前回巡回日時
+        stopped_at: 停止日時
+        created_at: 作成
+        updated_at: 更新
+      demander:
+        demand_user_id: 借手アカウント
+        name: サイト管理名
+        caption: サイト名
+        url: サイトトップページurl
+        description: サイト紹介文
+        demander_url: 借手ページurl
+        demander_status_id: 貸与状況
+        created_at: 作成
+        updated_at: 更新
+      demander_status:
+        requested_at: 申請日時
+        rejected_at: 否決日時
+        approved_at: 可決日時
+        receive_hour1: 巡回時1
+        receive_hour2: 巡回時2
+        created_at: 作成
+        updated_at: 更新
+      provider_license:
+        created_at: 作成
+        updated_at: 更新
+      provider_artist:
+        created_at: 作成
+        updated_at: 更新
+      provider_original_picture:
+        created_at: 作成
+        updated_at: 更新
   select_items:
     comic:
       visible:
@@ -221,6 +280,16 @@ ja:
         x: 横方向
         y: 縦方向
         no: なし
+    provider_status:
+      status:
+        waiting: 待機中
+        receiving: 申請中
+    demander_status:
+      status:
+        waiting: 待機中
+        rejected: 否決・停止中
+        requesting: 申請中
+        approved: 貸与中
   users:
     shared:
       signin: ログイン
@@ -279,6 +348,8 @@ ja:
       about_artist: 絵師になると素材を公開できます
     sign_out:
       title: ログアウト
+    sign_in:
+      title: ログイン
   comics:
     index:
       title: コミック一覧
@@ -506,6 +577,107 @@ ja:
       title: 色 生一覧
     browse:
       title: 色 生単票
+  provider_sources:
+    index:
+      title: 貸手文献一覧
+      url: 貸手文献url
+      submit: インポート
+    import:
+      title: 貸手文献のインポート
+      result: 件の貸手文献をインポートしました。
+      ok: この貸手文献は正常にインポートされました。
+      ok_but: この貸手文献でインポートできなかった貸手があります
+      ok_reason: 貸手文献が壊れている、サーバの設定が正しくない、などの理由が考えられます。
+      ng: 貸手文献の読み込みに失敗しました。
+      ng_reason: 貸手文献がない、貸手文献を管理しているサーバが応答しない、ネットに接続されていない、などの理由が考えられます。
+      to_providers: 貸手を一覧する
+      to_provider_sources: 貸手文献一覧へ戻る
+  providers:
+    index:
+      title: 貸手一覧
+      submit: インポート
+    show:
+      title: 貸手詳細
+      user_open: サイトを開く
+      demander_open: 貸手を開く
+      to_provider_status: 借受状況
+      destroy: 貸手を削除する
+    new:
+      title: 貸手登録
+    edit:
+      title: 貸手編集
+    status: 状態
+    open: 開く
+    wait: 待機中の貸手だけを表示する
+    all: すべての貸手を表示する
+    to_provider_status: 借受状況に切り替える
+  provider_statuses:
+    index:
+      title: 借受状況一覧
+    show:
+      title: 借受状況詳細
+      user_open: サイトを開く
+      demander_open: サイトの借手向けページを開く
+      to_provider: 貸手
+      receive_announce: 借受するには借手となって借受申請する。
+      receive_start: この貸手からの借受を開始する
+      receive_stop: 借受を停止する
+    new:
+      title: 借受状況登録
+    edit:
+      title: 借受状況編集
+    status: 状態
+    open: 開く
+    to_provider: 貸手に切り替える
+    wait: 待機中の貸手の借受状況だけを表示する
+    all: すべての貸手の借受状況を表示する
+  demanders:
+    index:
+      title: 借手一覧
+      to_show: サイトプロフィールを表示する
+      request: この貸手に借受申請する
+      stop: 借受を中止する
+    show:
+      title: 借手詳細
+    new:
+      title: 借手登録
+    edit:
+      title: 借手編集
+    status: 状態
+  demander_statuses:
+    index:
+      title: 貸与状況一覧
+    show:
+      title: 貸与状況詳細
+      demander_open: サイトを開く
+      approve_announce: 借受申請に対して返答してください。
+      approve: この借手に貸与を開始する
+      reject: この借手には貸与しない
+      stop: この借手の貸与を停止する
+      reapprove: この借手の否決を覆して貸与する
+    new:
+      title: 貸与状況登録
+    edit:
+      title: 貸与状況編集
+    status: 状態
+    open: 開く
+    wait: 申請中の借手の貸与状況だけを表示する
+    all: すべての借手の貸与状況を表示する
+  provider_licenses:
+    index:
+      title: ライセンス対照表一覧
+    show:
+      title: ライセンス対照表詳細
+  provider_artists:
+    index:
+      title: 絵師対照表一覧
+    show:
+      title: 絵師対照表詳細
+  provider_original_pictures:
+    index:
+      title: 原画対照表一覧
+    show:
+      title: 原画対照表詳細
   link:
     edit: 編集
     destroy: 削除
@@ -519,5 +691,14 @@ ja:
       picture: 原画
     reader:
       title: 読む・探す
+    demander:
+      title: 借り受ける
     system:
       title: 管理者メンテナンス
+      browse: 生データ
+      approve: 管理者承認
+      port: 素材貸借
+      token: トークン
+      layout: レイアウト
+      test: テスト版
+      production: 製品版
index 6ee6c5a..cdee7f7 100644 (file)
@@ -3,8 +3,8 @@
   thumbnail_width: 64
   thumbnail_height: 64
 
-  provider_status_items: [['waiting', 0], ['receiving', 1]]
-  demander_status_items: [['waiting', 0], ['rejected', 1], ['requesting', 2], ['approved', 3]]
+  provider_status_status_items: [['select_items.provider_status.status.waiting', 0], ['select_items.provider_status.status.receiving', 1]]
+  demander_status_status_items: [['select_items.demander_status.status.waiting', 0], ['select_items.demander_status.status.rejected', 1], ['select_items.demander_status.status.requesting', 2], ['select_items.demander_status.status.approved', 3]]
   
   comic_visible_items: [['select_items.comic.visible.private', 0], ['select_items.comic.visible.public', 1]]
   panel_visible_items: [['select_items.panel.visible.private', 0], ['select_items.panel.visible.public', 1]]
index 337f3f3..0bbd8ad 100644 (file)
@@ -284,6 +284,7 @@ Pettanr::Application.routes.draw do
       get :browse
     end
     member do
+      delete :destroy
     end
   end
   resources :provider_statuses do