Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[l10n] Improve Spanish (es-ES) locale #12858

Merged
merged 1 commit into from
Apr 19, 2024
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
2 changes: 1 addition & 1 deletion docs/data/date-pickers/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"languageTag": "es-ES",
"importName": "esES",
"localeName": "Spanish",
"missingKeysCount": 13,
"missingKeysCount": 0,
"totalKeysCount": 50,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/esES.ts"
},
Expand Down
42 changes: 21 additions & 21 deletions packages/x-date-pickers/src/locales/esES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ import { getPickersLocalization } from './utils/getPickersLocalization';
import { TimeViewWithMeridiem } from '../internals/models';

const views: Record<TimeViewWithMeridiem, string> = {
hours: 'las horas',
minutes: 'los minutos',
seconds: 'los segundos',
meridiem: 'meridiano',
hours: 'Horas',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Technically having this word start in lowercase seems a bit more appropriate, given that it is used mid-sentence.
But that's not a problem now, because those cases are only used on aria-label attributes that will not be visible, just read by screen readers. 👌

minutes: 'Minutos',
seconds: 'Segundos',
meridiem: 'Meridiano',
};

const esESPickers: Partial<PickersLocaleText<any>> = {
// Calendar navigation
previousMonth: 'Último mes',
nextMonth: 'Próximo mes',
previousMonth: 'Mes anterior',
nextMonth: 'Mes siguiente',

// View navigation
openPreviousView: 'Abrir la última vista',
openNextView: 'Abrir la siguiente vista',
calendarViewSwitchingButtonAriaLabel: (view) =>
view === 'year'
? 'la vista del año está abierta, cambie a la vista de calendario'
: 'la vista de calendario está abierta, cambie a la vista del año',
? 'la vista anual está abierta, cambie a la vista de calendario'
: 'la vista de calendario está abierta, cambie a la vista anual',

// DateRange labels
start: 'Empezar',
end: 'Terminar',
// startDate: 'Start date',
// startTime: 'Start time',
// endDate: 'End date',
// endTime: 'End time',
startDate: 'Fecha inicio',
startTime: 'Hora inicio',
endDate: 'Fecha final',
endTime: 'Hora final',

// Action bar
cancelButtonLabel: 'Cancelar',
Expand Down Expand Up @@ -84,17 +84,17 @@ const esESPickers: Partial<PickersLocaleText<any>> = {
fieldMeridiemPlaceholder: () => 'aa',

// View names
// year: 'Year',
// month: 'Month',
// day: 'Day',
// weekDay: 'Week day',
// hours: 'Hours',
// minutes: 'Minutes',
// seconds: 'Seconds',
// meridiem: 'Meridiem',
year: 'Año',
month: 'Mes',
day: 'Dia',
weekDay: 'Dia de la semana',
hours: 'Horas',
minutes: 'Minutos',
seconds: 'Segundos',
meridiem: 'Meridiano',

// Common
// empty: 'Empty',
empty: 'Vacío',
};

export const esES = getPickersLocalization(esESPickers);
Loading