-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[l10n] Add Catalan (Spain) (ca-ES) and improve Spanish (es-ES) locales (
#8498) Co-authored-by: Adrian Bustos Paz <abuspaz2@uv.es> Co-authored-by: alexandre <alex.fauquette@gmail.com>
- Loading branch information
Showing
3 changed files
with
103 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { PickersLocaleText } from './utils/pickersLocaleTextApi'; | ||
import { getPickersLocalization } from './utils/getPickersLocalization'; | ||
|
||
const views = { | ||
hours: 'les hores', | ||
minutes: 'els minuts', | ||
seconds: 'els segons', | ||
}; | ||
|
||
const caESPickers: Partial<PickersLocaleText<any>> = { | ||
// Calendar navigation | ||
previousMonth: 'Últim mes', | ||
nextMonth: 'Pròxim mes', | ||
|
||
// View navigation | ||
openPreviousView: "obrir l'última 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", | ||
|
||
// DateRange placeholders | ||
start: 'Començar', | ||
end: 'Terminar', | ||
|
||
// Action bar | ||
cancelButtonLabel: 'Cancel·lar', | ||
clearButtonLabel: 'Netejar', | ||
okButtonLabel: 'OK', | ||
todayButtonLabel: 'Hui', | ||
|
||
// Toolbar titles | ||
datePickerToolbarTitle: 'Seleccionar data', | ||
dateTimePickerToolbarTitle: 'Seleccionar data i hora', | ||
timePickerToolbarTitle: 'Seleccionar hora', | ||
dateRangePickerToolbarTitle: 'Seleccionar rang de dates', | ||
|
||
// Clock labels | ||
clockLabelText: (view, time, adapter) => | ||
`Seleccione ${views[view]}. ${ | ||
time === null | ||
? 'Sense temps seleccionat' | ||
: `El temps seleccionat és ${adapter.format(time, 'fullTime')}` | ||
}`, | ||
hoursClockNumberText: (hours) => `${hours} hores`, | ||
minutesClockNumberText: (minutes) => `${minutes} minuts`, | ||
secondsClockNumberText: (seconds) => `${seconds} segons`, | ||
|
||
// Calendar labels | ||
calendarWeekNumberHeaderLabel: 'Número de setmana', | ||
calendarWeekNumberHeaderText: '#', | ||
calendarWeekNumberAriaLabelText: (weekNumber) => `Setmana ${weekNumber}`, | ||
calendarWeekNumberText: (weekNumber) => `${weekNumber}`, | ||
|
||
// Open picker labels | ||
openDatePickerDialogue: (value, utils) => | ||
value !== null && utils.isValid(value) | ||
? `Tria la data, la data triada és ${utils.format(value, 'fullDate')}` | ||
: 'Tria la data', | ||
openTimePickerDialogue: (value, utils) => | ||
value !== null && utils.isValid(value) | ||
? `Tria l'hora, l'hora triada és ${utils.format(value, 'fullTime')}` | ||
: "Tria l'hora", | ||
|
||
// Table labels | ||
timeTableLabel: 'tria la data', | ||
dateTableLabel: "tria l'hora", | ||
|
||
// Field section placeholders | ||
fieldYearPlaceholder: (params) => 'Y'.repeat(params.digitAmount), | ||
fieldMonthPlaceholder: (params) => (params.contentType === 'letter' ? 'MMMM' : 'MM'), | ||
fieldDayPlaceholder: () => 'DD', | ||
fieldWeekDayPlaceholder: (params) => (params.contentType === 'letter' ? 'EEEE' : 'EE'), | ||
fieldHoursPlaceholder: () => 'hh', | ||
fieldMinutesPlaceholder: () => 'mm', | ||
fieldSecondsPlaceholder: () => 'ss', | ||
fieldMeridiemPlaceholder: () => 'aa', | ||
}; | ||
|
||
export const caES = getPickersLocalization(caESPickers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters