Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into aggregation-footer-…
Browse files Browse the repository at this point in the history
…is-auto-generated
  • Loading branch information
m4theushw committed Jan 23, 2023
2 parents 0346c6b + 930f3ca commit a256728
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 9 deletions.
8 changes: 8 additions & 0 deletions docs/data/date-pickers/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
"totalKeysCount": 24,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/zhCN.ts/"
},
{
"languageTag": "cs-CZ",
"importName": "csCZ",
"localeName": "Czech",
"missingKeysCount": 0,
"totalKeysCount": 24,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/csCZ.ts/"
},
{
"languageTag": "nl-NL",
"importName": "nlNL",
Expand Down
74 changes: 74 additions & 0 deletions packages/x-date-pickers/src/locales/csCZ.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { PickersLocaleText } from './utils/pickersLocaleTextApi';
import { getPickersLocalization } from './utils/getPickersLocalization';

// maps ClockPickerView to its translation
const timeViews = {
hours: 'Hodiny',
minutes: 'Minuty',
seconds: 'Sekundy',
};

// maps PickersToolbar["viewType"] to its translation
const pickerViews = {
calendar: 'kalendáře',
clock: 'času',
};

const csCZPickers: PickersLocaleText<any> = {
// Calendar navigation
previousMonth: 'Další měsíc',
nextMonth: 'Předchozí month',

// View navigation
openPreviousView: 'otevřít předchozí zobrazení',
openNextView: 'otevřít další zobrazení',
calendarViewSwitchingButtonAriaLabel: (view) =>
view === 'year'
? 'roční zobrazení otevřeno, přepněte do zobrazení kalendáře'
: 'zobrazení kalendáře otevřeno, přepněte do zobrazení roku',
inputModeToggleButtonAriaLabel: (isKeyboardInputOpen: boolean, viewType: 'calendar' | 'clock') =>
isKeyboardInputOpen
? `Zobrazení pro zadávání textu je otevřené, přepněte do zobrazení ${pickerViews[viewType]}`
: `Zobrazení ${pickerViews[viewType]} je otevřené, přepněte do zobrazení textového pole`,

// DateRange placeholders
start: 'Začátek',
end: 'Konec',

// Action bar
cancelButtonLabel: 'Zrušit',
clearButtonLabel: 'Vymazat',
okButtonLabel: 'Potvrdit',
todayButtonLabel: 'Dnes',

// Toolbar titles
datePickerDefaultToolbarTitle: 'Vyberte datum',
dateTimePickerDefaultToolbarTitle: 'Vyberte datum a čas',
timePickerDefaultToolbarTitle: 'Vyberte čas',
dateRangePickerDefaultToolbarTitle: 'Vyberete rozmezí dat',

// Clock labels
clockLabelText: (view, time, adapter) =>
`${timeViews[view] ?? view} vybrány. ${
time === null ? 'Není vybrán čas' : `Vybraný čas je ${adapter.format(time, 'fullTime')}`
}`,
hoursClockNumberText: (hours) => `${hours} hodin`,
minutesClockNumberText: (minutes) => `${minutes} minut`,
secondsClockNumberText: (seconds) => `${seconds} sekund`,

// Open picker labels
openDatePickerDialogue: (value, utils) =>
value !== null && utils.isValid(value)
? `Vybrané datum, vybrané datum je ${utils.format(value, 'fullDate')}`
: 'Vyberte datum',
openTimePickerDialogue: (value, utils) =>
value !== null && utils.isValid(value)
? `Vybrané čas, vybraný čas je ${utils.format(value, 'fullTime')}`
: 'Vyberte čas',

// Table labels
timeTableLabel: 'vyberte čas',
dateTableLabel: 'vyberte datum',
};

export const csCZ = getPickersLocalization(csCZPickers);
1 change: 1 addition & 0 deletions packages/x-date-pickers/src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export * from './deDE';
export * from './esES';
export * from './faIR';
export * from './fiFI';
export * from './csCZ';
export * from './frFR';
export * from './enUS';
export * from './nbNO';
Expand Down
1 change: 1 addition & 0 deletions scripts/x-date-pickers-pro.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{ "name": "ClockPointerClassKey", "kind": "TypeAlias" },
{ "name": "ClockPointerProps", "kind": "Interface" },
{ "name": "ClockProps", "kind": "Interface" },
{ "name": "csCZ", "kind": "Variable" },
{ "name": "DatePicker", "kind": "Variable" },
{ "name": "DatePickerProps", "kind": "Interface" },
{ "name": "datePickerToolbarClasses", "kind": "Variable" },
Expand Down
1 change: 1 addition & 0 deletions scripts/x-date-pickers.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{ "name": "ClockPointerClassKey", "kind": "TypeAlias" },
{ "name": "ClockPointerProps", "kind": "Interface" },
{ "name": "ClockProps", "kind": "Interface" },
{ "name": "csCZ", "kind": "Variable" },
{ "name": "DatePicker", "kind": "Variable" },
{ "name": "DatePickerProps", "kind": "Interface" },
{ "name": "datePickerToolbarClasses", "kind": "Variable" },
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5267,15 +5267,10 @@ camelize@^1.0.0:
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"
integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=

caniuse-lite@^1.0.30001370, caniuse-lite@^1.0.30001373:
version "1.0.30001373"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz#2dc3bc3bfcb5d5a929bec11300883040d7b4b4be"
integrity sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ==

caniuse-lite@^1.0.30001406:
version "1.0.30001431"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz#e7c59bd1bc518fae03a4656be442ce6c4887a795"
integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==
caniuse-lite@^1.0.30001370, caniuse-lite@^1.0.30001373, caniuse-lite@^1.0.30001406:
version "1.0.30001447"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001447.tgz"
integrity sha512-bdKU1BQDPeEXe9A39xJnGtY0uRq/z5osrnXUw0TcK+EYno45Y+U7QU9HhHEyzvMDffpYadFXi3idnSNkcwLkTw==

caseless@~0.12.0:
version "0.12.0"
Expand Down

0 comments on commit a256728

Please sign in to comment.