Skip to content

[feat] 国際団体向け英語版物品貸出表の実装#1997

Merged
batcho0428 merged 11 commits intogm3/developfrom
feat/inaba/1992-add-eng-rental-list
Apr 8, 2026
Merged

[feat] 国際団体向け英語版物品貸出表の実装#1997
batcho0428 merged 11 commits intogm3/developfrom
feat/inaba/1992-add-eng-rental-list

Conversation

@batcho0428
Copy link
Copy Markdown
Collaborator

対応Issue

resolve #1992

概要

  • 国際団体に配布する英語版の物品貸出表出力機能を追加
  • 管理者ページにダウンロードボタンを追加
  • ファイル構成変更に合わせてapiを修正
  • 物品名の英語版対応は 国際団体物品貸出表の実装(API) #1992 で実装して、テンプレートの引数は修正する。

実装詳細

  • print_pdf_controllerを修正してGETでlocale=enの場合に英語版を出力する
  • enの場合は、is_internationalがtrueのグループのみにprint_pdf_controllerでフィルターしてから渡す。
  • 日本語文章ファイル.ja.ymlと英語文章ファイルen.ymlを/api/config/locales/all_groups_rental_itemに配置
  • テンプレートのoutput_all_groups\rental_items.pdf.erbはこれらからデータを引っ張ってくるだけ

画面スクリーンショット等

テスト項目

  • データの内容に誤りがないか
  • ファイル名等後々の拡張に影響がないか
  • 英語文章や用語に誤りがないか

備考

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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専用のダウンロードボタンとハンドラー関数を追加

Comment on lines +31 to +32
- "Check in at the headquarters when returning items."
- "Use the designated pickup and return locations."
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

英語の注意事項の順番が日本語版と違っちゃってるよ💦 日本語版は「場所を間違えない→チェックを受ける→綺麗にする」なのに、英語版は「本部でチェック→場所を守る→綺麗にする」になってて内容も微妙に変わってる😵 翻訳ミスっぽいから、日本語版と同じ順番と意味にした方がいいと思う〜✨

Suggested change
- "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."

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは対応して――

en:
print_pdf:
output_all_groups_rental_items:
title: "Participating Organization Information Management Chart"
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

英訳がちょっと違うかもっ💦 "Participating Organization Information Management Chart"って長すぎるし、元の日本語「物品貸出表」は"Rental Items List"とか"Equipment Rental Form"の方がピッタリじゃね?🤔 Managementって管理って意味だけど、この表は管理用じゃなくて貸出用だから意味がズレちゃってるよ〜😅

Suggested change
title: "Participating Organization Information Management Chart"
title: "Equipment Rental Form"

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rental Items Listでよさそう。

Comment thread api/app/controllers/print_pdf_controller.rb
Comment thread api/app/controllers/print_pdf_controller.rb
Comment thread api/app/views/print_pdf/output_all_groups_rental_items.pdf.erb
Comment thread api/app/controllers/print_pdf_controller.rb
Comment thread api/app/controllers/print_pdf_controller.rb Outdated
Copy link
Copy Markdown
Contributor

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

purhaceListの配列直したら動いたーー
出力されるpdfはよさそう~~

Comment thread api/app/controllers/print_pdf_controller.rb
● 借用および返却時は貸出場所にいる実行委員のチェックを受けてください。<br>
● 備品等は絶対に汚さないように使用し、綺麗にしてから返却してください。
<%= t('.precautions.title') %><br><br>
<% t('.precautions.items').each do |note| %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18nは配列ではなくて文字列らしいので.eachで配列処理をするとエラーになるらしい。
ので配列だよっていうのを明示しておく必要があるって。はえーって感じ。

Suggested change
<% 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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rental Items Listでよさそう。

Comment on lines +31 to +32
- "Check in at the headquarters when returning items."
- "Use the designated pickup and return locations."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは対応して――

Comment thread api/app/controllers/print_pdf_controller.rb
@hikahana
Copy link
Copy Markdown
Contributor

あ、団体のカテゴリの英語対応も必要かも

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Comment thread api/config/application.rb
# 物品貸し出し書類をまとめて出力
def output_all_groups_rental_items_pdf
@groups = Group.where(fes_year_id: params[:fes_year_id]).order(:group_category_id)
## 今後の実装によってprint_pdfにocaleの引数を持たせる
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント内の ocale がタイポなので locale に修正してください。

Suggested change
## 今後の実装によってprint_pdfにocaleの引数を持たせる
## 今後の実装によってprint_pdfにlocaleの引数を持たせる

Copilot uses AI. Check for mistakes.
Comment thread api/app/controllers/print_pdf_controller.rb
Comment thread api/app/views/print_pdf/output_all_groups_rental_items.pdf.erb
Comment thread api/app/controllers/print_pdf_controller.rb
Copy link
Copy Markdown
Contributor

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

概ね良さそう.日付取得?のだけ対応できたらヨロぴって感じで
LGTM

@batcho0428 batcho0428 requested a review from hikahana March 17, 2026 13:29
Copy link
Copy Markdown
Contributor

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@batcho0428
Copy link
Copy Markdown
Collaborator Author

@hikahana
レビューありがとうございます!
コンフリクト解消しました

@batcho0428 batcho0428 merged commit f5d7fd0 into gm3/develop Apr 8, 2026
2 checks passed
@batcho0428 batcho0428 deleted the feat/inaba/1992-add-eng-rental-list branch April 8, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

国際団体物品貸出表の実装(API)

3 participants