Skip to content

Commit

Permalink
[CCR] Fix form bug + add missing i18n (elastic#32544) (elastic#32557)
Browse files Browse the repository at this point in the history
* [Rollup] Fix month value in form select

* [Rollup] Add missing i18n for field types
  • Loading branch information
sebelga authored Mar 6, 2019
1 parent 53d41bf commit 02b4e6b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,18 @@ export class JobCreateUi extends Component {
)];
}

const formattedNumericFields = formatFields(numericFields, 'numeric');
const formattedKeywordFields = formatFields(keywordFields, 'keyword');
const formattedDateFields = formatFields(indexPatternDateFields, 'date');
const formattedNumericFields = formatFields(
numericFields,
i18n.translate('xpack.rollupJobs.create.numericTypeField', { defaultMessage: 'numeric' })
);
const formattedKeywordFields = formatFields(
keywordFields,
i18n.translate('xpack.rollupJobs.create.keywordTypeField', { defaultMessage: 'keyword' })
);
const formattedDateFields = formatFields(
indexPatternDateFields,
i18n.translate('xpack.rollupJobs.create.dateTypeField', { defaultMessage: 'date' })
);

function sortFields(a, b) {
const nameA = a.name.toUpperCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const dayOrdinalToDayNameMap = {
const monthOrdinalToMonthNameMap = {
0: i18n.translate('xpack.rollupJobs.util.month.january', { defaultMessage: 'January' }),
1: i18n.translate('xpack.rollupJobs.util.month.february', { defaultMessage: 'February' }),
2: i18n.translate('xpack.rollupJobs.util.month.march', { defaultMessage: 'April' }),
3: i18n.translate('xpack.rollupJobs.util.month.april', { defaultMessage: 'March' }),
2: i18n.translate('xpack.rollupJobs.util.month.march', { defaultMessage: 'March' }),
3: i18n.translate('xpack.rollupJobs.util.month.april', { defaultMessage: 'April' }),
4: i18n.translate('xpack.rollupJobs.util.month.may', { defaultMessage: 'May' }),
5: i18n.translate('xpack.rollupJobs.util.month.june', { defaultMessage: 'June' }),
6: i18n.translate('xpack.rollupJobs.util.month.july', { defaultMessage: 'July' }),
Expand Down

0 comments on commit 02b4e6b

Please sign in to comment.