OSDN Git Service

t#30266:oplg i18n
authoryasushiito <yas@pen-chan.jp>
Wed, 12 Dec 2012 23:16:37 +0000 (08:16 +0900)
committeryasushiito <yas@pen-chan.jp>
Wed, 12 Dec 2012 23:16:37 +0000 (08:16 +0900)
23 files changed:
app/views/ground_pictures/index.html.erb
app/views/home/ground_picture.html.erb
app/views/home/panel_color.html.erb
app/views/original_picture_license_groups/_allform.html.erb
app/views/original_picture_license_groups/_form.html.erb
app/views/original_picture_license_groups/new.html.erb
app/views/original_pictures/_history_list.html.erb
app/views/original_pictures/_uploader.html.erb [deleted file]
app/views/original_pictures/edit.html.erb
app/views/original_pictures/edit.js.erb
app/views/original_pictures/history.html.erb
app/views/original_pictures/index.html.erb
app/views/original_pictures/new.html.erb
app/views/original_pictures/new.js.erb
app/views/original_pictures/show.html.erb
app/views/panel_colors/index.html.erb
app/views/panels/list.html.erb
app/views/pictures/_head.html.erb
app/views/resource_pictures/_form.html.erb
app/views/resource_pictures/index.html.erb
app/views/resource_pictures/new.html.erb
config/locales/pettanr.ja.yml
config/routes.rb

index f44803e..dc5fafc 100644 (file)
   </tr>
 
   <% @ground_pictures.each do |gp| %>
-    <tr>
-      <td><%= link_to gp.panel_id, panel_path(gp.panel_id) %></td>
-      <td><%= tag :img, gp.picture.tmb_opt_img_tag -%></td>
-      <td><%= render gp.picture.credit_template, :picture => gp.picture %></td>
-      <td><%= gp.z %></td>
-      <td><%= gp.repeat %><%= MagicNumber['ground_picture_repeat_items'][gp.repeat] %></td>
-      <td><%= gp.x %></td>
-      <td><%= gp.y %></td>
-      <td><%= distance_of_time_in_words_to_now gp.created_at %></td>
-      <td><%= distance_of_time_in_words_to_now gp.updated_at %></td>
-    </tr>
+    <%= render 'list_item', :ground_picture => gp %>
   <% end -%>
 </table>
index 32f741c..dc5fafc 100644 (file)
@@ -1,19 +1,19 @@
-<h1>Listing Ground Pictures</h1>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>id</th>
-    <th>panel_id</th>
-    <th>picture_id</th>
-    <th>z</th>
+    <th><%= t_m 'GroundPicture.panel_id' -%></th>
+    <th><%= t_m 'GroundPicture.picture_id' -%></th>
+    <th><%=   -%></th>
+    <th><%= t_m 'GroundPicture.z' -%></th>
+    <th><%= t_m 'GroundPicture.repeat' -%></th>
+    <th><%= t_m 'GroundPicture.x' -%></th>
+    <th><%= t_m 'GroundPicture.y' -%></th>
+    <th><%= t_m 'GroundPicture.created_at' -%></th>
+    <th><%= t_m 'GroundPicture.updated_at' -%></th>
   </tr>
 
-<% @ground_pictures.each do |gp| %>
-  <tr>
-    <td><%= gp.id %></td>
-    <td><%= link_to gp.panel_id, panel_path(gp.panel_id) %></td>
-    <td><%= link_to gp.picture_id, color_path(gp.picture_id) %></td>
-    <td><%= gp.z %></td>
-  </tr>
-<% end -%>
+  <% @ground_pictures.each do |gp| %>
+    <%= render 'list_item', :ground_picture => gp %>
+  <% end -%>
 </table>
index e6a9fa2..1af79fc 100644 (file)
@@ -1,19 +1,15 @@
-<h1>Listing Panel Colors</h1>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>id</th>
-    <th>panel_id</th>
-    <th>code</th>
-    <th>z</th>
+    <th><%= t_m 'PanelColor.panel_id' -%></th>
+    <th><%= t_m 'PanelColor.code' -%></th>
+    <th><%= t_m 'PanelColor.z' -%></th>
+    <th><%= t_m 'PanelColor.created_at' -%></th>
+    <th><%= t_m 'PanelColor.updated_at' -%></th>
   </tr>
 
-<% @panel_colors.each do |pc| %>
-  <tr>
-    <td><%= pc.id %></td>
-    <td><%= link_to pc.panel_id, panel_path(pc.panel_id) %></td>
-    <td><%= pc.code %><font color="<%= pc.code %>">*****</font></td>
-    <td><%= pc.z %></td>
-  </tr>
-<% end -%>
+  <% @panel_colors.each do |pc| %>
+    <%= render 'list_item', :panel_color => pc %>
+  <% end -%>
 </table>
index 0b8e7b9..f21cc9f 100644 (file)
@@ -1,15 +1,5 @@
 <%= form_for(@original_picture_license_group) do |f| %>
-  <% if @original_picture_license_group.errors.any? %>
-    <div id="error_explanation">
-      <h2><%= pluralize(@original_picture_license_group.errors.count, "error") %> prohibited this comic from being saved:</h2>
-
-      <ul>
-      <% @original_picture_license_group.errors.full_messages.each do |msg| %>
-        <li><%= msg %></li>
-      <% end %>
-      </ul>
-    </div>
-  <% end %>
+  <%= render 'system/error_explanation', :obj => @original_picture_license_group %>
 
   <div class="field">
     <%= f.label :license_group_id %><br />
index b9b850c..d0a5019 100644 (file)
@@ -3,15 +3,15 @@
 
   <table class="no-border">
     <tr>
-      <td>License Group</td>
+      <td><%= t_m 'OriginalPictureLicenseGroup.license_group_id' -%></td>
       <td><%= f.collection_select :license_group_id, LicenseGroup.list.map {|l| [l.caption, l.id] }, :last, :first %></td>
-      <td>+</td>
+      <td><%= t 'original_picture_license_groups.new.no_blank' %></td>
     </tr>
   </table>
   <%= f.hidden_field :original_picture_id %>
   <%= hidden_field_tag :original_picture_id, @original_picture.id %>
 
   <div class="actions">
-    <%= f.submit 'Next'%>
+    <%= f.submit t 'original_picture_license_groups.new.next' %>
   </div>
 <% end %>
index eccae42..0d2297b 100644 (file)
@@ -1,3 +1,3 @@
-<h1>Select License Group</h1>
+<h1><%= t '.title' -%></h1>
 <img src="<%= @original_picture.url -%>">
 <%= render 'form' %>
index ede9f66..49d9f4b 100644 (file)
@@ -1,6 +1,6 @@
 <% history.each do |picture| -%>
-  <h3>revision:<%= link_to picture.revision, picture_path(picture) %></h3>
-  <div>licensed at <%= picture.created_at %></div>
+  <h3><%= t_m 'Picture.revision' -%>:<%= link_to picture.revision, picture_path(picture) %></h3>
+  <div><%= t_m 'Picture.created_at' -%> <%= l picture.created_at %></div>
   <table class="no-border">
     <tr>
       <td>
diff --git a/app/views/original_pictures/_uploader.html.erb b/app/views/original_pictures/_uploader.html.erb
deleted file mode 100644 (file)
index f19ccfd..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<% if user_signed_in? -%>
-  <% if @author.artist? -%>
-    <%= form_tag( {:controller => 'original_pictures',:action => "create"} , { :multipart => true }) do %>
-      <label for="file">File to Upload</label> <%= file_field_tag "original_picture[file]" %>
-      <%= submit_tag 'upload' -%>
-    <% end -%>
-  <% else -%>
-    <%= render 'artist_register' %>
-  <% end -%>
-<% else -%>
-  素材を投稿するなら<%= link_to "ログイン", new_user_session_path %>
-<% end -%>
index 0e3ca5c..13e2352 100644 (file)
@@ -1 +1 @@
-$("#uploader").html("<%= escape_javascript(render('uploader')) -%>");
+$("#uploader").html("<%= escape_javascript(render('form')) -%>");
index 4a1396a..3b9e3b5 100644 (file)
@@ -1,2 +1,5 @@
-History of Original Picture <%= @original_picture.id %>
+<h1><%= t '.title' -%></h1>
+<h2>
+  <%= t_m 'OriginalPicture' -%> <%= link_to @original_picture.id, original_picture_path(@original_picture) %>
+</h2>
 <%= render 'history_list', :history => @history %>
index 3c8a214..8905130 100644 (file)
@@ -1,6 +1,6 @@
 <h1><%= t '.title' -%></h1>
 
-<%= render 'uploader' %>
+<%= render 'form' %>
 <table>
   <tr>
     <th><%= t_m 'OriginalPicture' -%></th>
@@ -36,8 +36,3 @@
     </tr>
   <% end %>
 </table>
-<%= link_to 'open form', new_original_picture_path, :remote => true %>
-  <div id="uploader">
-    ...
-  </div>
-
index e69de29..15957ef 100644 (file)
@@ -0,0 +1,3 @@
+<h1><%= t '.title' -%></h1>\r
+\r
+<%= render 'form' %>\r
index 0e3ca5c..13e2352 100644 (file)
@@ -1 +1 @@
-$("#uploader").html("<%= escape_javascript(render('uploader')) -%>");
+$("#uploader").html("<%= escape_javascript(render('form')) -%>");
index 0e480af..d24737f 100644 (file)
       </p>
 
       <h2>
-        <%= link_to 'Select License', :controller => 'original_picture_license_groups', :action => :new, :original_picture_id => @original_picture.id %>
+        <%= t 'original_pictures.show.select_license' %>
       </h2>
       <p>
-      Replace picture
+        <%= button_to t('original_pictures.show.select'), {:controller => 'original_picture_license_groups', :action => :new, :original_picture_id => @original_picture.id} %>
       </p>
+      <h2>
+        <%= t 'original_pictures.show.replace_picture' %>
+      </h2>
       <%= form_for(@original_picture, :html => { :multipart => true }) do |f| %>
-        <label for="file">File to Upload</label> <%= f.file_field "file" %>
+        <%= f.file_field "file" %>
         <div class="actions">
-          <%= f.submit 'replace' %>
+          <%= f.submit t 'original_pictures.show.replace' %>
         </div>
       <% end %>
+      <h2>
+        <%= t 'link.destroy' %>
+      </h2>
+      <%= link_to t('link.destroy'), original_picture_path(@original_picture), :method => :delete %>
     </td>
     <td>
       <h1>
-        History
+        <%= t 'original_pictures.show.history' %>
       </h1>
       <%= render 'history_list', :history => @original_picture.history %>
     </td>
   </tr>
 </table>
-<%= link_to t('link.destroy'), original_picture_path(@original_picture), :method => :delete %>
-
-<%= link_to t('link.back'), original_pictures_path %>
index 812408c..1af79fc 100644 (file)
   </tr>
 
   <% @panel_colors.each do |pc| %>
-    <tr>
-      <td><%= link_to pc.panel_id, panel_path(pc.panel_id) %></td>
-      <td style="color: #<%= format("%06x", pc.code ^ 0xffffff) -%>; background-color: #<%= format("%06x", pc.code) -%>;"><%= format("%06x", pc.code ^ 0xffffff) %></td>
-      <td><%= pc.z %></td>
-      <td><%= distance_of_time_in_words_to_now pc.created_at %></td>
-      <td><%= distance_of_time_in_words_to_now pc.updated_at %></td>
-    </tr>
+    <%= render 'list_item', :panel_color => pc %>
   <% end -%>
 </table>
index ded452e..f67cd81 100644 (file)
@@ -1,8 +1,4 @@
-<h1>Listing panels</h1>
-<%= link_to 'open form', new_panel_path, :remote => true %>
-  <div id="newpanel">
-    uploader
-  </div>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
index a4f41a8..a844293 100644 (file)
@@ -6,7 +6,6 @@
       <%= render picture.full_credit_template, :picture => picture %>
     </td>
     <td>
-      <h2>properties</h2>
       <h2>
         <%= t_m 'Picture.revision' -%>:<%= picture.revision %>
       </h2>
index f88aedb..1217b44 100644 (file)
@@ -1,4 +1,3 @@
-<h1>Confirm</h1>
 <img src="<%= @original_picture.url -%>">
 <%= form_for(@resource_picture, :url => '/resource_pictures', :method => :post) do |f| %>
 
@@ -17,6 +16,6 @@
   <%= render  :partial => @resource_picture.classname.tableize + '/attributes/confirm' %>
 
   <div class="actions">
-    <%= f.submit 'publish'  %>
+    <%= f.submit t 'resource_pictures.new.publish'  %>
   </div>
 <% end %>
index 85644d8..426f7aa 100644 (file)
@@ -1,8 +1,8 @@
 <h1><%= t '.title' -%></h1>
 <table>
   <tr>
-    <th>picture</th>
-    <th>credit</th>
+    <th</th>
+    <th></th>
     <th><%= t_m 'ResourcePicture.artist_id' -%></th>
     <th><%= t_m 'ResourcePicture.ext' -%></th>
     <th><%= t_m 'ResourcePicture.width' -%></th>
index ffacbb2..0cc7e9f 100644 (file)
@@ -1 +1,2 @@
+<h1><%= t '.title' -%></h1>
 <%= render 'resource_pictures/form' %>
index f61cb78..7044a59 100644 (file)
@@ -139,8 +139,8 @@ ja:
         classname: ライセンスクラス名
         credit: クレジット拡張データ
         settings: 拡張データ
-        created_at: 作成
-        updated_at: 更新
+        created_at: 公開日時
+        updated_at: 公開日時
       resource_picture:
         original_picture_id: 原画
         ext: 画像フォーマット
@@ -157,6 +157,11 @@ ja:
         picture_id: 実素材
         created_at: 作成
         updated_at: 更新
+      original_picture_license_group:
+        original_picture_id: 原画
+        license_group_id: ライセンスグループ
+        created_at: 作成
+        updated_at: 更新
       speech_balloon_template:
         name: 管理名
         classname: クラス名
@@ -401,12 +406,20 @@ ja:
       destroy: 削除する
     show:
       title: 原画詳細
+      select_license: 画像の公開
+      select: ライセンスグループ選択ページへ
+      replace_picture: 画像の更新
+      replace: 画像を改訂する
+      history: 公開履歴
     new:
       title: 原画投稿
     list:
       title: 原画 生一覧
     browse:
       title: 原画 生単票
+    history:
+      title: 公開履歴
+    upload: 投稿する
   pictures:
     show:
       title: 実素材詳細
@@ -429,11 +442,17 @@ ja:
     show:
       title: 素材詳細
     new: 
-      title: 素材公開(ライセンス確認)
+      title: 画像の公開(最終確認)
+      publish: 公開する
     list:
       title: 素材 生一覧
     browse:
       title: 素材 生単票
+  original_picture_license_groups:
+    new:
+      title: 画像の公開(ライセンスグループの選択)
+      next: 次へ
+      no_blank: 必須項目
   speech_balloon_templates:
     index:
       title: フキダシテンプレート一覧
index 4792387..8a91fda 100644 (file)
@@ -139,7 +139,7 @@ Pettanr::Application.routes.draw do
   end
   resources :original_picture_license_groups do
     new do
-      get :new
+      post :new
     end
     collection do
       post :create