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 Catalan (ca-ES) locale #12856

Merged
merged 2 commits 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 @@ -19,7 +19,7 @@
"languageTag": "ca-ES",
"importName": "caES",
"localeName": "Catalan",
"missingKeysCount": 14,
"missingKeysCount": 0,
"totalKeysCount": 50,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/caES.ts"
},
Expand Down
52 changes: 26 additions & 26 deletions packages/x-date-pickers/src/locales/caES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@ import { getPickersLocalization } from './utils/getPickersLocalization';
import { TimeViewWithMeridiem } from '../internals/models';

const views: Record<TimeViewWithMeridiem, string> = {
hours: 'les hores',
minutes: 'els minuts',
seconds: 'els segons',
meridiem: 'meridiem',
hours: 'Hores',
minutes: 'Minuts',
seconds: 'Segons',
meridiem: 'Meridià',
};

const caESPickers: Partial<PickersLocaleText<any>> = {
// Calendar navigation
previousMonth: 'Últim mes',
nextMonth: 'Pròxim mes',
previousMonth: 'Mes anterior',
nextMonth: 'Mes següent',

// View navigation
openPreviousView: "Obrir l'última vista",
openNextView: 'obrir la següent vista',
openNextView: 'Obrir la següent vista',
calendarViewSwitchingButtonAriaLabel: (view) =>
view === 'year'
? "la vista de l'any està oberta, canvie a la vista de calendari"
: "la vista de calendari està oberta, canvie a la vista de l'any",
? 'la vista anual està oberta, canvia a la vista de calendari'
: 'la vista de calendari està oberta, canvia a la vista anual',

// DateRange labels
start: 'Començar',
end: 'Terminar',
// startDate: 'Start date',
// startTime: 'Start time',
// endDate: 'End date',
// endTime: 'End time',
startDate: 'Data inicial',
startTime: 'Hora inicial',
endDate: 'Data final',
endTime: 'Hora final',

// Action bar
cancelButtonLabel: 'Cancel·lar',
clearButtonLabel: 'Netejar',
okButtonLabel: 'OK',
todayButtonLabel: 'Hui',
todayButtonLabel: 'Avuí',

// Toolbar titles
datePickerToolbarTitle: 'Seleccionar data',
Expand All @@ -44,7 +44,7 @@ const caESPickers: Partial<PickersLocaleText<any>> = {

// Clock labels
clockLabelText: (view, time, adapter) =>
`Seleccione ${views[view]}. ${time === null ? 'Sense temps seleccionat' : `El temps seleccionat és ${adapter.format(time, 'fullTime')}`}`,
`Selecciona ${views[view]}. ${time === null ? 'Hora no seleccionada' : `L'hora seleccionada és ${adapter.format(time, 'fullTime')}`}`,
hoursClockNumberText: (hours) => `${hours} hores`,
minutesClockNumberText: (minutes) => `${minutes} minuts`,
secondsClockNumberText: (seconds) => `${seconds} segons`,
Expand All @@ -53,7 +53,7 @@ const caESPickers: Partial<PickersLocaleText<any>> = {
selectViewText: (view) => `Seleccionar ${views[view]}`,

// Calendar labels
calendarWeekNumberHeaderLabel: 'Número de setmana',
calendarWeekNumberHeaderLabel: 'Número de la setmana',
calendarWeekNumberHeaderText: '#',
calendarWeekNumberAriaLabelText: (weekNumber) => `Setmana ${weekNumber}`,
calendarWeekNumberText: (weekNumber) => `${weekNumber}`,
Expand All @@ -67,7 +67,7 @@ const caESPickers: Partial<PickersLocaleText<any>> = {
value !== null && utils.isValid(value)
? `Tria l'hora, l'hora triada és ${utils.format(value, 'fullTime')}`
: "Tria l'hora",
// fieldClearLabel: 'Clear value',
fieldClearLabel: 'Netega el valor',

// Table labels
timeTableLabel: 'tria la data',
Expand All @@ -84,17 +84,17 @@ const caESPickers: 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: 'Any',
month: 'Mes',
day: 'Dia',
weekDay: 'Dia de la setmana',
hours: 'Hores',
minutes: 'Minuts',
seconds: 'Segons',
meridiem: 'Meridià',

// Common
// empty: 'Empty',
empty: 'Buit',
};

export const caES = getPickersLocalization(caESPickers);
Loading