-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: localize attributes properly #2016
Changes from 20 commits
613f789
7812dfc
9a8db06
e67e5cc
8d023c5
501dc17
389f03b
c35464c
c7db448
1bdee8a
08b6b78
e5f47a5
46a82ed
ec40713
ebfe295
50e0363
3d4c31c
2ceac1e
4bd5052
eab5bab
212be19
7bb3abf
ca830d5
6dd8016
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,14 @@ | |
'definition.*' => 'nullable|string', | ||
]; | ||
} | ||
|
||
public function attributes(): array | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this file is used anymore. I think we can delete it. Can you confirm? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't seems like it, though I think this may be used later? We should confirm with @greatislander |
||
{ | ||
return [ | ||
'term' => __('term'), | ||
'term.*' => __('term'), | ||
'definition' => __('definition'), | ||
'definition.*' => __('definition'), | ||
]; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -28,6 +28,13 @@ public function rules(): array | |||||||||||||||||
]; | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
public function attributes(): array | ||||||||||||||||||
{ | ||||||||||||||||||
return [ | ||||||||||||||||||
'type' => __('organization type'), | ||||||||||||||||||
]; | ||||||||||||||||||
Comment on lines
+33
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
/** | ||||||||||||||||||
* Get the error messages for the defined validation rules. | ||||||||||||||||||
*/ | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,6 +19,14 @@ public function rules(): array | |||||
]; | ||||||
} | ||||||
|
||||||
public function attributes(): array | ||||||
{ | ||||||
return [ | ||||||
'context' => __('project context'), | ||||||
'ancestor' => __('previous project'), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's another idea, although I don't know which is better really.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We currently use both terms previous project and original project in other messages, and there are 2 usages of previous project, and one usage of original project. I think we should always be consistent throughout the messages. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If they are used for the same purpose, I'd agree that they should be consistent. |
||||||
]; | ||||||
} | ||||||
|
||||||
public function messages(): array | ||||||
{ | ||||||
return [ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice in at least one other location that we've used
__('email')
instead. If it makes sense, can we make these consistent?