Skip to content

Commit

Permalink
[pickers][fields] Improve clear action label (#14243)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Sep 11, 2024
1 parent a246244 commit 5cef050
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/beBY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const beBYPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Абраць час, абрыны час ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Абраць час',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'абраць час',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/csCZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const csCZPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Vyberte čas, vybraný čas je ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Vyberte čas',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'vyberte čas',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/elGR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const elGRPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Επιλέξτε ώρα, η επιλεγμένη ώρα είναι ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Επιλέξτε ώρα',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'επιλέξτε ώρα',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/enUS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const enUSPickers: PickersLocaleText<any> = {
? `Choose time, selected time is ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Choose time',

fieldClearLabel: 'Clear value',
fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'pick time',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/isIS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const isISPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Velja tíma, valinn tími er ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Velja tíma',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'velja tíma',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/kzKZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const kzKZPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Уақытты таңдаңыз, таңдалған уақыт ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Уақытты таңдаңыз',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'уақытты таңдау',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/nbNO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const nbNOPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Velg tid, valgt tid er ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Velg tid',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'velg tid',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/plPL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const plPLPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Wybierz czas, obecnie wybrany czas to ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Wybierz czas',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'wybierz czas',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/ptBR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const ptBRPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Escolha uma hora, hora selecionada ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Escolha uma hora',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'escolha uma hora',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/skSK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const skSKPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Vyberte čas, vybraný čas je ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Vyberte čas',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'vyberte čas',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/trTR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const trTRPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `Saat seçin, seçilen saat: ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'Saat seç',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'saat seç',
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/urPK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const urPKPickers: Partial<PickersLocaleText<any>> = {
formattedTime || (value !== null && utils.isValid(value))
? `وقت منتخب کریں، منتخب شدہ وقت ہے ${formattedTime ?? utils.format(value, 'fullTime')}`
: 'وقت منتخب کریں',
// fieldClearLabel: 'Clear value',
// fieldClearLabel: 'Clear',

// Table labels
timeTableLabel: 'وقت منتخب کریں',
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ async function initializeEnvironment(

const monthSection = page.getByRole('spinbutton', { name: 'Month' });
await monthSection.press('2');
await page.getByRole('button', { name: 'Clear value' }).click();
await page.getByRole('button', { name: 'Clear' }).click();

expect(await page.evaluate(() => document.activeElement?.textContent)).to.equal('MM');
});
Expand All @@ -720,7 +720,7 @@ async function initializeEnvironment(
// locator.fill('2') does not work reliably for this case in all browsers
await textbox.focus();
await textbox.press('2');
await page.getByRole('button', { name: 'Clear value' }).click();
await page.getByRole('button', { name: 'Clear' }).click();

// firefox does not support document.getSelection().toString() on input elements
if (browserType.name() === 'firefox') {
Expand Down

0 comments on commit 5cef050

Please sign in to comment.