前提・実現したいこと
railsで英語の部分を日本語にしようとしているのですが、うまく訳せずに詰まっております。
en.ymlに問題があるのではないかと思っているのですが、わかる方がいらっしぃましたらご教授いただければ幸いです。
発生している問題・エラーメッセージ
該当のソースコード
en.yml
ja: layouts: application: user name: ユーザー名 edit user: ユーザー情報の編集 sign out: サインアウト lists: new: new post: 新規投稿 name: 店舗名 taste: 味 price: 金額 service: サービス memo: メモ image: 写真 total: 総合点 back: 投稿一覧 edit: edit post: 投稿の編集 name: 店舗名 taste: 味 price: 金額 service: サービス memo: メモ image: 写真 total: 総合点 back: 投稿一覧 index: post list: 投稿一覧 name: 店舗名 taste: 味 price: 金額 service: サービス memo: メモ image: 写真 total: 総合点 show: 詳細 edit: 編集 delete: 削除 confirm: 本当に削除しますか? new post: 新規投稿 show: name: 店舗名 taste: 味 price: 金額 service: サービス memo: メモ image: 写真 total: 総合点 edit: 編集 back: 投稿一覧
index.html
<h1>t('.post list')</h1> <table class="table table-striped"> <thead> <th><%= t('.name') %></th> <th><%= t('.taste') %></th> <th><%= t('.price') %></th> <th><%= t('.service') %></th> <th><%= t('.memo') %></th> <th><%= t('.image') %></th> <th><%= t('.total') %></th> </thead> <tbody> <% @lists.each do |list| %> <tr> <td><%= list.name %></td> <td><%= list.taste %></td> <td><%= list.price %></td> <td><%= list.service %></td> <td><%= list.memo %></td> <td><%= list.image %></td> <td><%= list.total %></td> <td><%= link_to t('.show'), list, class: 'btn btn-info' %></td> <td><%= link_to t('.edit'), edit_list_path(list), class: "btn-flat-border rounded-pill" %></td> <td><%= link_to t('.delete'), list_path(list), method: :delete, data: { confirm: '本当に削除しますか?' }, class: "btn-flat-border rounded-pill" %></td> </tr> <% end %> </tbody> </table> <%= link_to t('.new post'), new_list_path, class: "btn-flat-border rounded-pill" %>
補足情報(FW/ツールのバージョンなど)
rails 5.2.3
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。