[feat] 国際団体向け英語版物品貸出表の実装#1997
Conversation
There was a problem hiding this comment.
Pull request overview
このPRは国際団体向けの英語版物品貸出表PDF出力機能を実装してるよ〜✨ 管理者画面から英語版をダウンロードできるようにして、国際団体のみをフィルタリングして出力する機能が追加されてるっ💪
Changes:
- Rails i18nを使った英語・日本語の多言語対応(locale切り替え機能)
locale=enパラメータで国際団体(is_international: true)のみフィルタリング- 管理画面に英語版PDF専用ダウンロードボタンを追加
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| api/config/locales/all_groups_rental_items/ja.yml | 日本語版の翻訳ファイル新規追加 - テンプレートで使用する文言を定義 |
| api/config/locales/all_groups_rental_items/en.yml | 英語版の翻訳ファイル新規追加 - 国際団体向け英訳を定義 |
| api/app/views/print_pdf/output_all_groups_rental_items.pdf.erb | ハードコードされた日本語文字列をi18nのt()ヘルパーに置き換え、時間表記と単位記号の修正も含む |
| api/app/controllers/print_pdf_controller.rb | localeパラメータ処理と国際団体フィルタリング、I18n.with_localeでのレンダリング制御を追加 |
| api/app/views/print_pdf/output_rental_items_pdf.css | CSSネスト記法からフラットなセレクタに修正(技術的な改善) |
| admin_view/nuxt-project/pages/print/index.vue | 英語版PDF専用のダウンロードボタンとハンドラー関数を追加 |
| - "Check in at the headquarters when returning items." | ||
| - "Use the designated pickup and return locations." |
There was a problem hiding this comment.
英語の注意事項の順番が日本語版と違っちゃってるよ💦 日本語版は「場所を間違えない→チェックを受ける→綺麗にする」なのに、英語版は「本部でチェック→場所を守る→綺麗にする」になってて内容も微妙に変わってる😵 翻訳ミスっぽいから、日本語版と同じ順番と意味にした方がいいと思う〜✨
| - "Check in at the headquarters when returning items." | |
| - "Use the designated pickup and return locations." | |
| - "Use the designated pickup and return locations." | |
| - "Check in at the headquarters when returning items." |
| en: | ||
| print_pdf: | ||
| output_all_groups_rental_items: | ||
| title: "Participating Organization Information Management Chart" |
There was a problem hiding this comment.
英訳がちょっと違うかもっ💦 "Participating Organization Information Management Chart"って長すぎるし、元の日本語「物品貸出表」は"Rental Items List"とか"Equipment Rental Form"の方がピッタリじゃね?🤔 Managementって管理って意味だけど、この表は管理用じゃなくて貸出用だから意味がズレちゃってるよ〜😅
| title: "Participating Organization Information Management Chart" | |
| title: "Equipment Rental Form" |
hikahana
left a comment
There was a problem hiding this comment.
purhaceListの配列直したら動いたーー
出力されるpdfはよさそう~~
| ● 借用および返却時は貸出場所にいる実行委員のチェックを受けてください。<br> | ||
| ● 備品等は絶対に汚さないように使用し、綺麗にしてから返却してください。 | ||
| <%= t('.precautions.title') %><br><br> | ||
| <% t('.precautions.items').each do |note| %> |
There was a problem hiding this comment.
i18nは配列ではなくて文字列らしいので.eachで配列処理をするとエラーになるらしい。
ので配列だよっていうのを明示しておく必要があるって。はえーって感じ。
| <% t('.precautions.items').each do |note| %> | |
| <% Array(t('.precautions.items')).each do |note| %> |
一応印刷したやつ載せとくーー
物品貸し出し表まとめ(国際団体・英語版) (4).pdf
| en: | ||
| print_pdf: | ||
| output_all_groups_rental_items: | ||
| title: "Participating Organization Information Management Chart" |
| - "Check in at the headquarters when returning items." | ||
| - "Use the designated pickup and return locations." |
|
あ、団体のカテゴリの英語対応も必要かも |
| # 物品貸し出し書類をまとめて出力 | ||
| def output_all_groups_rental_items_pdf | ||
| @groups = Group.where(fes_year_id: params[:fes_year_id]).order(:group_category_id) | ||
| ## 今後の実装によってprint_pdfにocaleの引数を持たせる |
There was a problem hiding this comment.
コメント内の ocale がタイポなので locale に修正してください。
| ## 今後の実装によってprint_pdfにocaleの引数を持たせる | |
| ## 今後の実装によってprint_pdfにlocaleの引数を持たせる |
hikahana
left a comment
There was a problem hiding this comment.
概ね良さそう.日付取得?のだけ対応できたらヨロぴって感じで
LGTM
|
@hikahana |
対応Issue
resolve #1992
概要
実装詳細
画面スクリーンショット等
テスト項目
備考