Replies: 1 comment 1 reply
-
I agree. It does not make sense to have uppercase and lowercase placeholders. The word means the same... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I'm a Japanese engineer.
I'm not good at English, but like you, I want to make Laravel better.
Proposal
Change the method of replacing placeholders in the message.
Background
I created a Japanese language file using
laravel-lang/lang v13.2.5
, but I noticed that the:Other
placeholder was not replaced when a validation error message was displayed.However,
:attribute
and:Attribute
have been replaced.When I investigated the source code, I found that
:other
must be all lowercase letters to be replaced.:attribute
has different results depending on the case of the placeholder.The same goes for placeholder replacement using the
trans()
helper.This is currently an issue with the
laravel-lang/lang
language file.However,
:other
is a placeholder that can be replaced with the attribute name, just like:attribute
.I think it would lead to confusion if these replacement methods are different, so I would like to suggest changing the replacement method so that it is the same as the
:attribute
replacement method.Also, to maintain consistency, I think
:min
,:date
, etc. should be replaced with:Min
,:DATE
as well. (Although the replacement result remains the same)However, this change may be redundant since
:min
,:max
, etc. are replaced with numerical values.Please let me know your opinions on my thoughts.
Beta Was this translation helpful? Give feedback.
All reactions