Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lowercase attributes #44

Closed
sotten opened this issue Jul 15, 2022 · 2 comments
Closed

lowercase attributes #44

sotten opened this issue Jul 15, 2022 · 2 comments

Comments

@sotten
Copy link

sotten commented Jul 15, 2022

  • Laravel-Lang Attributes Version: 2.0.4
  • PHP Version: 8.1.3

Description:

Was it intended to write all attributes in lower case or is this a script error?

Steps To Reproduce:

@andrey-helldar
Copy link
Member

No, not a mistake. The fact is that in the English version, the validator sentences begin with the word "The". Thus, if we capitalize attribute names, we get something like The Name must be accepted. instead of The name must be accepted..

But if we write with a small letter, then the sentence will look correct.

At the same time, Laravel has a word conversion mechanism:

__('The :attribute must be accepted.', ['attribute' => 'name']) // The name
__('The :Attribute must be accepted.', ['attribute' => 'name']) // The Name
__('The :ATTRIBUTE must be accepted.', ['attribute' => 'name']) // The NAME

__('The :attribute must be accepted.', ['attribute' => 'NAME']) // The NAME
__('The :Attribute must be accepted.', ['attribute' => 'NAME']) // The NAME
__('The :ATTRIBUTE must be accepted.', ['attribute' => 'NAME']) // The NAME

@andrey-helldar
Copy link
Member

At the same time, the script does not change the words written by the developer, since, for example, in German, nouns can begin with a capital letter.

If you ask why all the names in the locales/de/php.json file are with a small letter, then here I made them with a small letter when I updated all the states. For this I apologize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants