Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Package seems to cause translation errors in other packages

オープン
#59 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
laravel, php

調査の方向性

validation/src/Laravel/ValidationServiceProvider.php から始め、特に boot() と getErrorMessage() を確認してから、報告されている locale の挙動について、リンクされている Laravel Nova の issue を確認します。PHP 8、Laravel 9.26.1、Nova 4.13.0、intervention/validation 3.2.0 で再現してください。翻訳エラーが発生しなくなり、バリデーションメッセージを壊していなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

investigation-needed patch-release

It seems that this package causes translation errors in Laravel Nova (see this issue https://github.com/laravel/nova-issues/issues/4192).

By calling a translation in a constructor the incorrect locale is set for the App (https://github.com/laravel/nova-issues/issues/4192#issuecomment-1120249039)

I think this is what is happening with this package in the file validation/src/Laravel/ValidationServiceProvider.php.

From the boot() function $this->getErrorMessage() is called and this calls
return $this->app['translator']->get('validation::validation.' . $rulename);. (https://github.com/Intervention/validation/blob/master/src/Laravel/ValidationServiceProvider.php#L48)

When I comment this out or replace it with return ''; the translation errors in Laravel Nova disappear.

I am using php8, laravel/framework 9.26.1, laravel/nova 4.13.0, intervention/validation 3.2.0

主要言語
PHP
スター
678
フォーク
68
平均マージ
9分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Intervention/validation のほかの issue

Intervention/validation の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。