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

DayPickerSingleDateController support phrases. Changed phrases state … #623

Merged
merged 3 commits into from
Jul 19, 2017

Conversation

davidskoog
Copy link
Contributor

DayPickerSingleDateController support phrases. Changed phrases state to props.

When using DayPickerSingleDateController I'm not able to use phrases for language translations.
Here is a suggestion for a solution.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.202% when pulling fd6c0d3 on davidskoog:master into 1031985 on airbnb:master.

ljharb
ljharb previously requested changes Jul 14, 2017
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Would you mind adding a regression test for this?

@@ -543,9 +543,10 @@ export default class DayPickerSingleDateController extends React.Component {
renderCalendarInfo,
isFocused,
isRTL,
phrases
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs a trailing comma

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it's done.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 86.243% when pulling 6d222e4 on davidskoog:master into 1031985 on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.243% when pulling 49ce755 on davidskoog:master into f149c68 on airbnb:master.

Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! :) This was a bit of copy/pasta breakage from the DayPickerRangeController which does have a stateful phrases object.

@ljharb
Copy link
Member

ljharb commented Jul 19, 2017

@davidskoog can you add a regression test for this? That's all I'm waiting on :-)

@ljharb ljharb dismissed their stale review July 19, 2017 19:43

Per discussion; let's bring this in now but ASAP ensure we're testing all the phrases props.

@majapw majapw merged commit 1ffa758 into react-dates:master Jul 19, 2017
@davidskoog
Copy link
Contributor Author

Hi again @ljharb. Sorry for this late reply. I'm have been on vacation for a time. I see that you merged my pull request, exciting. I don't know what a regression test is but until next time I will find out.

// David

@ljharb
Copy link
Member

ljharb commented Aug 14, 2017

@davidskoog just an automated test to prevent this specific issue from occurring in the future - i.e., from "regressing".

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

Successfully merging this pull request may close these issues.

4 participants