-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add translations + prevent error when adding field #13
Conversation
riasvdv
commented
May 14, 2017
- Adds translations for "Opening Time" and "Closing Time"
- Prevents an error when adding the field to a Global Section
src/templates/input.html
Outdated
@@ -2,7 +2,7 @@ | |||
{% from "_includes/forms" import time %} | |||
<tr> | |||
<th> | |||
{{ craft.i18n.getLocaleData().getWeekDayName(day) }} | |||
{{ craft.i18n.getLocaleData().getWeekDayName(day) | ucfirst }} |
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.
Is there a place where this was necessary? Week day names should already be correctly capitalized.
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 guess officially in Dutch they're not capitalised but I thought it looked nicer, didn't mean to add this to the PR!
src/fields/StoreHoursField.php
Outdated
@@ -57,6 +57,10 @@ public function getInputHtml($value, ElementInterface $element = null): string | |||
*/ | |||
public function serializeValue($value, ElementInterface $element = null) | |||
{ | |||
if (!$value) { | |||
return null; |
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.
Let’s move this to a separate PR. Each PR should be focussed on a single feature/enhancement/bugfix. Thanks!
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.
Will do! I'll update the PR tomorrow