Skip to content

Add i18n support for date on pipeline charts

What does this MR do and why?

Page link: https://gitlab.com/gitlab-org/gitlab/-/pipelines/charts

The date string 19 Aug is compiled through constants CHART_DATE_FORMAT.

// file: app/assets/javascripts/projects/pipelines/charts/constants.js
export const CHART_DATE_FORMAT = 'dd mmm';

The order of month and day is fixed, which is not suitable for Chinese. In Chinese habit, the correct order is month-day instead of day-month.

So it is necessary to provide an extended way so that we can use different translation method.

Screenshots or screen recordings

Language Before After
English (Nothing changed)
Chinese )

After merged, remember to update crowdin about "DateFormat|dd mmm" @luzhiyuan.deer

cc JH EM @prajnamas

Edited by Zhiyuan Lu

Merge request reports