Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from airbnb/maja-move-phrases-into-separate-file
Moves phrases out into one shared defaultPhrases file
- Loading branch information
Showing
14 changed files
with
139 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ instrumentation: | |
"public/**", | ||
"test/**", | ||
"coverage/**", | ||
"src/defaultPhrases.js" | ||
] | ||
check: | ||
global: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const closeDatePicker = 'Close'; | ||
const focusStartDate = 'Focus on start date'; | ||
const clearDate = 'Clear Date'; | ||
const clearDates = 'Clear Dates'; | ||
const jumpToPrevMonth = 'Jump to previous month'; | ||
const jumpToNextMonth = 'Jump to next month'; | ||
|
||
export default { | ||
closeDatePicker, | ||
focusStartDate, | ||
clearDate, | ||
clearDates, | ||
jumpToPrevMonth, | ||
jumpToNextMonth, | ||
}; | ||
|
||
export const DateRangePickerPhrases = { | ||
closeDatePicker, | ||
clearDates, | ||
focusStartDate, | ||
jumpToPrevMonth, | ||
jumpToNextMonth, | ||
}; | ||
|
||
export const DateRangePickerInputPhrases = { | ||
focusStartDate, | ||
clearDates, | ||
}; | ||
|
||
export const SingleDatePickerPhrases = { | ||
closeDatePicker, | ||
clearDate, | ||
jumpToPrevMonth, | ||
jumpToNextMonth, | ||
}; | ||
|
||
export const SingleDatePickerInputPhrases = { | ||
clearDate, | ||
}; | ||
|
||
export const DayPickerPhrases = { | ||
jumpToPrevMonth, | ||
jumpToNextMonth, | ||
}; | ||
|
||
export const DayPickerNavigationPhrases = { | ||
jumpToPrevMonth, | ||
jumpToNextMonth, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { PropTypes } from 'react'; | ||
|
||
export default function getPhrasePropTypes(defaultPhrases) { | ||
return Object.keys(defaultPhrases) | ||
.reduce((phrases, key) => ({ ...phrases, [key]: PropTypes.node }), {}); | ||
} |
Oops, something went wrong.