Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions packages/components/core/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@ export const enUSLocaleData = {
to: 'to',
apply: 'Apply',
cancel: 'Cancel',
rangeLabel: 'for period',
rangeLabel: 'Period',
allTime: 'for all time',
currentQuarter: 'for the current quarter',
currentYear: 'for the current year'
currentYear: 'for the current year',
allTimeOption: 'All time',
currentQuarterOption: 'Current quarter',
currentYearOption: 'Current year'
},
durationTemplate: {
title: {
Expand Down Expand Up @@ -180,31 +183,31 @@ export const enUSLocaleData = {
LAST_PART_SEPARATOR: '',
YEARS: `{years, plural,
one {# year}
other {last # years}
other {Last # years}
}`,
MONTHS: `{months, plural,
one {last month}
other {last # months}
one {Last month}
other {Last # months}
}`,
WEEKS: `{weeks, plural,
one {last week}
other {last # weeks}
one {Last week}
other {Last # weeks}
}`,
DAYS: `{days, plural,
one {last day}
other {last # days}
one {Last day}
other {Last # days}
}`,
HOURS: `{hours, plural,
one {last hour}
other {last # hours}
one {Last hour}
other {Last # hours}
}`,
MINUTES: `{minutes, plural,
one {last minute}
other {last # minutes}
one {Last minute}
other {Last # minutes}
}`,
SECONDS: `{seconds, plural,
one {last second}
other {last # seconds}
one {Last second}
other {Last # seconds}
}`,
YEARS_FRACTION: `{years} years`,
MONTHS_FRACTION: `{months} months`
Expand Down
33 changes: 18 additions & 15 deletions packages/components/core/locales/es-LA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,13 @@ export const esLALocaleData = {
to: 'a',
apply: 'Aplicar',
cancel: 'Cancelar',
rangeLabel: 'para el período',
rangeLabel: 'Período',
allTime: 'por todo el tiempo',
currentQuarter: 'por el trimestre actual',
currentYear: 'por el año actual'
currentYear: 'por el año actual',
allTimeOption: 'Todo el tiempo',
currentQuarterOption: 'Trimestre actual',
currentYearOption: 'Año actual'
},
durationTemplate: {
title: {
Expand Down Expand Up @@ -179,31 +182,31 @@ export const esLALocaleData = {
LAST_PART_SEPARATOR: '',
YEARS: `{years, plural,
one {# año}
other {últimos # años}
other {Últimos # años}
}`,
MONTHS: `{months, plural,
one {último mes}
other {últimos # meses}
one {Último mes}
other {Últimos # meses}
}`,
WEEKS: `{weeks, plural,
one {última semana}
other {últimas # semanas}
one {Última semana}
other {Últimas # semanas}
}`,
DAYS: `{days, plural,
one {último día}
other {últimos # días}
one {Último día}
other {Últimos # días}
}`,
HOURS: `{hours, plural,
one {última hora}
other {últimas # horas}
one {Última hora}
other {Últimas # horas}
}`,
MINUTES: `{minutes, plural,
one {último minuto}
other {últimos # minutos}
one {Último minuto}
other {Últimos # minutos}
}`,
SECONDS: `{seconds, plural,
one {último segundo}
other {últimos # segundos}
one {Último segundo}
other {Últimos # segundos}
}`,
YEARS_FRACTION: `{years} años`,
MONTHS_FRACTION: `{months} meses`
Expand Down
33 changes: 18 additions & 15 deletions packages/components/core/locales/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,13 @@ export const ptBRLocaleData = {
to: 'até',
apply: 'Aplicar',
cancel: 'Cancelar',
rangeLabel: 'para o período',
rangeLabel: 'Período',
allTime: 'por todo o tempo',
currentQuarter: 'pelo trimestre atual',
currentYear: 'pelo ano atual'
currentYear: 'pelo ano atual',
allTimeOption: 'Todo o tempo',
currentQuarterOption: 'Trimestre atual',
currentYearOption: 'Ano atual'
},
durationTemplate: {
title: {
Expand Down Expand Up @@ -179,31 +182,31 @@ export const ptBRLocaleData = {
LAST_PART_SEPARATOR: '',
YEARS: `{years, plural,
one {# ano}
other {últimos # anos}
other {Últimos # anos}
}`,
MONTHS: `{months, plural,
one {último mês}
other {últimos # meses}
one {Último mês}
other {Últimos # meses}
}`,
WEEKS: `{weeks, plural,
one {última semana}
other {últimas # semanas}
one {Última semana}
other {Últimas # semanas}
}`,
DAYS: `{days, plural,
one {último dia}
other {últimos # dias}
one {Último dia}
other {Últimos # dias}
}`,
HOURS: `{hours, plural,
one {última hora}
other {últimas # horas}
one {Última hora}
other {Últimas # horas}
}`,
MINUTES: `{minutes, plural,
one {último minuto}
other {últimos # minutos}
one {Último minuto}
other {Últimos # minutos}
}`,
SECONDS: `{seconds, plural,
one {último segundo}
other {últimos # segundos}
one {Último segundo}
other {Últimos # segundos}
}`,
YEARS_FRACTION: `{years} anos`,
MONTHS_FRACTION: `{months} meses`
Expand Down
51 changes: 27 additions & 24 deletions packages/components/core/locales/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,21 @@ export const ruRULocaleData = {
to: 'по',
apply: 'Применить',
cancel: 'Отмена',
rangeLabel: 'за период',
rangeLabel: 'Период',
allTime: 'за все время',
currentQuarter: 'за текущий квартал',
currentYear: 'за текущий год'
currentYear: 'за текущий год',
allTimeOption: 'Все время',
currentQuarterOption: 'Текущий квартал',
currentYearOption: 'Текущий год'
},
durationTemplate: {
title: {
SEPARATOR: ' ',
LAST_PART_SEPARATOR: 'и',
YEARS: `{years, plural,
one {# год}
few {последние # лет}
few {последние # года}
other {последние # лет}
}`,
MONTHS: `{months, plural,
Expand Down Expand Up @@ -186,39 +189,39 @@ export const ruRULocaleData = {
SEPARATOR: ' ',
LAST_PART_SEPARATOR: 'и',
YEARS: `{years, plural,
one {последний год}
few {последние # лет}
other {последние # лет}
one {Последний год}
few {Последние # года}
other {Последние # лет}
}`,
MONTHS: `{months, plural,
one {последний месяц}
few {последние # месяца}
other {последние # месяцев}
one {Последний месяц}
few {Последние # месяца}
other {Последние # месяцев}
}`,
WEEKS: `{weeks, plural,
one {последняя неделя}
few {последние # недели}
other {последние # недель}
one {Последняя неделя}
few {Последние # недели}
other {Последние # недель}
}`,
DAYS: `{days, plural,
one {последний день}
few {последние # дня}
other {последние # дней}
one {Последний день}
few {Последние # дня}
other {Последние # дней}
}`,
HOURS: `{hours, plural,
one {последний час}
few {последние # часа}
other {последние # часов}
one {Последний час}
few {Последние # часа}
other {Последние # часов}
}`,
MINUTES: `{minutes, plural,
one {последняя минута}
few {последние # минуты}
other {последние # минут}
one {Последняя минута}
few {Последние # минуты}
other {Последние # минут}
}`,
SECONDS: `{seconds, plural,
one {последняя секунда}
few {последние # секунды}
other {последние # секунд}
one {Последняя секунда}
few {Последние # секунды}
other {Последние # секунд}
}`,
YEARS_FRACTION: `{years} лет`,
MONTHS_FRACTION: `{months} месяцев`
Expand Down
19 changes: 11 additions & 8 deletions packages/components/core/locales/tk-TM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@ export const tkTMLocaleData = {
to: 'şuňa',
apply: 'Ulanmak',
cancel: 'Ýatyrmak',
rangeLabel: 'şu döwürde',
rangeLabel: 'Döwür',
allTime: 'hemme döwür üçin',
currentQuarter: 'şu çärýek üçin',
currentYear: 'şu ýyl üçin'
currentYear: 'şu ýyl üçin',
allTimeOption: 'Hemme döwür',
currentQuarterOption: 'Şu çärýek',
currentYearOption: 'Şu ýyl'
},
durationTemplate: {
title: {
Expand Down Expand Up @@ -183,27 +186,27 @@ export const tkTMLocaleData = {
other {# ýyl}
}`,
MONTHS: `{months, plural,
one {}
one {}
other {# aý}
}`,
WEEKS: `{weeks, plural,
one {hepde}
one {Hepde}
other {# hepde}
}`,
DAYS: `{days, plural,
one {gün}
one {Gün}
other {# gün}
}`,
HOURS: `{hours, plural,
one {sagat}
one {Sagat}
other {# sagat}
}`,
MINUTES: `{minutes, plural,
one {minut}
one {Minut}
other {# minut}
}`,
SECONDS: `{seconds, plural,
one {sekunt}
one {Sekunt}
other {# sekunt}
}`,
YEARS_FRACTION: `{years} ýyl`,
Expand Down
6 changes: 6 additions & 0 deletions packages/components/core/locales/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export type KbqTimeRangeLocaleConfig = {
allTime: string;
currentQuarter: string;
currentYear: string;
/** Label for the `allTime` option in the presets list, as opposed to the trigger label in `allTime` */
allTimeOption?: string;
Comment thread
NikGurev marked this conversation as resolved.
/** Label for the `currentQuarter` option in the presets list, as opposed to the trigger label in `currentQuarter` */
currentQuarterOption?: string;
/** Label for the `currentYear` option in the presets list, as opposed to the trigger label in `currentYear` */
currentYearOption?: string;
};
durationTemplate: {
title: FormatterDurationTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`KbqTimeRange Component initialization should apply custom option templa
" Currentquarter ",
" Currentyear ",
" Alltime ",
"за период",
"Период",
]
`;

Expand All @@ -25,7 +25,7 @@ exports[`KbqTimeRange Component initialization should check range as default if

exports[`KbqTimeRange Component initialization should check selected radio if external value provided 1`] = `
{
"checkedRadio": " за текущий год ",
"checkedRadio": " Текущий год ",
"trigger": "за текущий год",
}
`;
Expand Down
6 changes: 3 additions & 3 deletions packages/components/time-range/time-range-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@
@case ('other') {
@switch (context.type) {
@case ('allTime') {
{{ localeConfig.editor.allTime }}
{{ localeConfig.editor.allTimeOption ?? localeConfig.editor.allTime }}
}
@case ('currentQuarter') {
{{ localeConfig.editor.currentQuarter }}
{{ localeConfig.editor.currentQuarterOption ?? localeConfig.editor.currentQuarter }}
}
@case ('currentYear') {
{{ localeConfig.editor.currentYear }}
{{ localeConfig.editor.currentYearOption ?? localeConfig.editor.currentYear }}
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/components/time-range/time-range.en.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
Time range selection menu. The user can choose one of the preset values or specify the range manually.
Time range selection menu. The user can choose one of the preset values or specify the time range manually.

<!-- example(time-range-overview) -->

### Trigger element

The menu can drop down from different trigger elements, and the window can have a pointer.
The component allows you to customize the trigger element. For example, it can be a button, a field, or a pseudo-link.

<!-- example(time-range-custom-trigger) -->

### Custom presets

When there are no preset values, only the From and To fields remain in the dialog:
When there are no preset values, only the start and end of the period remain in the window.

<!-- example(time-range-empty-type-list) -->

### Selection restriction

It is possible to configure the minimum and maximum date:
You can configure the minimum and maximum date. For example, a range from 2015 to 2017.
Comment thread
NikGurev marked this conversation as resolved.

<!-- example(time-range-min-max) -->

### Custom time ranges

The option to configure interval selection is available:
The component allows you to set custom time range options.

<!-- example(time-range-custom-range-types) -->
Loading