Files
2026-08-07 21:39:30 +02:00

331 lines
15 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { getGridLocalization, formatNumber } from "../utils/getGridLocalization.mjs";
function getPluralForm(count, options) {
const penultimateDigit = Math.floor(count / 10) % 10;
const lastDigit = count % 10;
let pluralForm = options.many;
if (penultimateDigit !== 1 && lastDigit > 1 && lastDigit < 5) {
pluralForm = options.few;
} else if (penultimateDigit !== 1 && lastDigit === 1) {
pluralForm = options.one;
}
return `${count} ${pluralForm}`;
}
const ukUAGrid = {
// Root
noRowsLabel: 'Немає рядків',
noResultsOverlayLabel: 'Дані не знайдено.',
noColumnsOverlayLabel: 'Немає стовпців',
noColumnsOverlayManageColumns: 'Керування стовпцями',
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
// Density selector toolbar button text
toolbarDensity: 'Висота рядка',
toolbarDensityLabel: 'Висота рядка',
toolbarDensityCompact: 'Компактний',
toolbarDensityStandard: 'Стандартний',
toolbarDensityComfortable: 'Комфортний',
// Undo/redo toolbar button text
toolbarUndo: 'Скасувати',
toolbarRedo: 'Повторити',
// Columns selector toolbar button text
toolbarColumns: 'Стовпці',
toolbarColumnsLabel: 'Виділіть стовпці',
// Filters toolbar button text
toolbarFilters: 'Фільтри',
toolbarFiltersLabel: 'Показати фільтри',
toolbarFiltersTooltipHide: 'Приховати фільтри',
toolbarFiltersTooltipShow: 'Показати фільтри',
toolbarFiltersTooltipActive: count => getPluralForm(count, {
one: 'активний фільтр',
few: 'активні фільтри',
many: 'активних фільтрів'
}),
// Quick filter toolbar field
toolbarQuickFilterPlaceholder: 'Пошук…',
toolbarQuickFilterLabel: 'Пошук',
toolbarQuickFilterDeleteIconLabel: 'Очистити',
// Export selector toolbar button text
toolbarExport: 'Експорт',
toolbarExportLabel: 'Експорт',
toolbarExportCSV: 'Завантажити у форматі CSV',
toolbarExportPrint: 'Друк',
toolbarExportExcel: 'Завантажити у форматі Excel',
// Toolbar pivot button
// toolbarPivot: 'Pivot',
// Toolbar charts button
// toolbarCharts: 'Charts',
// Toolbar AI Assistant button
// toolbarAssistant: 'AI Assistant',
// Columns management text
columnsManagementSearchTitle: 'Пошук',
columnsManagementNoColumns: 'Немає стовпців',
columnsManagementShowHideAllText: 'Показати/Приховати всі',
columnsManagementReset: 'Скинути',
columnsManagementDeleteIconLabel: 'Очистити',
// Filter panel text
filterPanelAddFilter: 'Додати фільтр',
filterPanelRemoveAll: 'Видалити всі',
filterPanelDeleteIconLabel: 'Видалити',
filterPanelLogicOperator: 'Логічна функція',
filterPanelOperator: 'Оператори',
filterPanelOperatorAnd: 'І',
filterPanelOperatorOr: 'Або',
filterPanelColumn: 'Стовпці',
filterPanelInputLabel: 'Значення',
filterPanelInputPlaceholder: 'Значення фільтра',
// Filter operators text
filterOperatorContains: 'містить',
filterOperatorDoesNotContain: 'не містить',
filterOperatorEquals: 'дорівнює',
filterOperatorDoesNotEqual: 'не дорівнює',
filterOperatorStartsWith: 'починається з',
filterOperatorEndsWith: 'закінчується на',
filterOperatorIs: 'дорівнює',
filterOperatorNot: 'не дорівнює',
filterOperatorAfter: 'більше ніж',
filterOperatorOnOrAfter: 'більше або дорівнює',
filterOperatorBefore: 'менше ніж',
filterOperatorOnOrBefore: 'менше або дорівнює',
filterOperatorIsEmpty: 'порожній',
filterOperatorIsNotEmpty: 'не порожній',
filterOperatorIsAnyOf: 'будь-що із',
'filterOperator=': '=',
'filterOperator!=': '!=',
'filterOperator>': '>',
'filterOperator>=': '>=',
'filterOperator<': '<',
'filterOperator<=': '<=',
// Header filter operators text
headerFilterOperatorContains: 'Містить',
headerFilterOperatorDoesNotContain: 'Не містить',
headerFilterOperatorEquals: 'Дорівнює',
headerFilterOperatorDoesNotEqual: 'Не дорівнює',
headerFilterOperatorStartsWith: 'Починається з',
headerFilterOperatorEndsWith: 'Закінчується на',
headerFilterOperatorIs: 'Дорівнює',
headerFilterOperatorNot: 'Не дорівнює',
headerFilterOperatorAfter: 'Після',
headerFilterOperatorOnOrAfter: 'Після (включаючи)',
headerFilterOperatorBefore: 'Раніше',
headerFilterOperatorOnOrBefore: 'Раніше (включаючи)',
headerFilterOperatorIsEmpty: 'Порожнє',
headerFilterOperatorIsNotEmpty: 'Не порожнє',
headerFilterOperatorIsAnyOf: 'Будь-що із',
'headerFilterOperator=': 'Дорівнює',
'headerFilterOperator!=': 'Не дорівнює',
'headerFilterOperator>': 'Більше ніж',
'headerFilterOperator>=': 'Більше або дорівнює',
'headerFilterOperator<': 'Менше ніж',
'headerFilterOperator<=': 'Менше або дорівнює',
headerFilterClear: 'Очистити фільтр',
// Filter values text
filterValueAny: 'будь-який',
filterValueTrue: 'так',
filterValueFalse: 'ні',
// Column menu text
columnMenuLabel: 'Меню',
// columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
columnMenuShowColumns: 'Показати стовпці',
columnMenuManageColumns: 'Керування стовпцями',
columnMenuFilter: 'Фільтр',
columnMenuHideColumn: 'Приховати',
columnMenuUnsort: 'Скасувати сортування',
columnMenuSortAsc: 'Сортувати за зростанням',
columnMenuSortDesc: 'Сортувати за спаданням',
// columnMenuManagePivot: 'Manage pivot',
// columnMenuManageCharts: 'Manage charts',
// Column header text
columnHeaderFiltersTooltipActive: count => getPluralForm(count, {
one: 'активний фільтр',
few: 'активні фільтри',
many: 'активних фільтрів'
}),
columnHeaderFiltersLabel: 'Показати фільтри',
columnHeaderSortIconLabel: 'Сортувати',
// Rows selected footer text
footerRowSelected: count => getPluralForm(count, {
one: 'вибраний рядок',
few: 'вибрані рядки',
many: 'вибраних рядків'
}),
// Total row amount footer text
footerTotalRows: 'Усього рядків:',
// Total visible row amount footer text
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} з ${totalCount.toLocaleString()}`,
// Checkbox selection text
checkboxSelectionHeaderName: 'Вибір прапорця',
checkboxSelectionSelectAllRows: 'Вибрати всі рядки',
checkboxSelectionUnselectAllRows: 'Скасувати вибір всіх рядків',
checkboxSelectionSelectRow: 'Вибрати рядок',
checkboxSelectionUnselectRow: 'Скасувати вибір рядка',
// Boolean cell text
booleanCellTrueLabel: 'так',
booleanCellFalseLabel: 'ні',
// Long text cell
longTextCellExpandLabel: 'Показати',
longTextCellCollapseLabel: 'Приховати',
// Actions cell more text
actionsCellMore: 'більше',
// Column pinning text
pinToLeft: 'Закріпити ліворуч',
pinToRight: 'Закріпити праворуч',
unpin: 'Відкріпити',
// Tree Data
treeDataGroupingHeaderName: 'Група',
treeDataExpand: 'показати дочірні елементи',
treeDataCollapse: 'приховати дочірні елементи',
// Grouping columns
groupingColumnHeaderName: 'Група',
groupColumn: name => `Групувати за ${name}`,
unGroupColumn: name => `Відмінити групування за ${name}`,
// Master/detail
detailPanelToggle: 'Перемикач панелі деталей',
expandDetailPanel: 'Показати',
collapseDetailPanel: 'Приховати',
// Pagination
paginationRowsPerPage: 'Рядків на сторінці:',
paginationDisplayedRows: ({
from,
to,
count,
estimated
}) => {
const unknownRowCount = count == null || count === -1;
if (!estimated) {
return `${formatNumber(from)}–${formatNumber(to)} з ${!unknownRowCount ? formatNumber(count) : `більше ніж ${formatNumber(to)}`}`;
}
const estimatedLabel = estimated && estimated > to ? `близько ${formatNumber(estimated)}` : `більше ніж ${formatNumber(to)}`;
return `${formatNumber(from)}–${formatNumber(to)} з ${!unknownRowCount ? formatNumber(count) : estimatedLabel}`;
},
paginationItemAriaLabel: type => {
if (type === 'first') {
return 'Перейти на першу сторінку';
}
if (type === 'last') {
return 'Перейти на останню сторінку';
}
if (type === 'next') {
return 'Перейти на наступну сторінку';
}
// if (type === 'previous') {
return 'Перейти на попередню сторінку';
},
// Row reordering text
rowReorderingHeaderName: 'Порядок рядків',
// Aggregation
aggregationMenuItemHeader: 'Агрегація',
// aggregationFunctionLabelNone: 'none',
aggregationFunctionLabelSum: 'сума',
aggregationFunctionLabelAvg: 'сер',
aggregationFunctionLabelMin: 'мін',
aggregationFunctionLabelMax: 'макс',
aggregationFunctionLabelSize: 'кількість',
// Pivot panel
// pivotToggleLabel: 'Pivot',
// pivotRows: 'Rows',
// pivotColumns: 'Columns',
// pivotValues: 'Values',
// pivotCloseButton: 'Close pivot settings',
// pivotSearchButton: 'Search fields',
// pivotSearchControlPlaceholder: 'Search fields',
// pivotSearchControlLabel: 'Search fields',
// pivotSearchControlClear: 'Clear search',
// pivotNoFields: 'No fields',
// pivotMenuMoveUp: 'Move up',
// pivotMenuMoveDown: 'Move down',
// pivotMenuMoveToTop: 'Move to top',
// pivotMenuMoveToBottom: 'Move to bottom',
// pivotMenuRows: 'Rows',
// pivotMenuColumns: 'Columns',
// pivotMenuValues: 'Values',
// pivotMenuOptions: 'Field options',
// pivotMenuAddToRows: 'Add to Rows',
// pivotMenuAddToColumns: 'Add to Columns',
// pivotMenuAddToValues: 'Add to Values',
// pivotMenuRemove: 'Remove',
// pivotDragToRows: 'Drag here to create rows',
// pivotDragToColumns: 'Drag here to create columns',
// pivotDragToValues: 'Drag here to create values',
// pivotYearColumnHeaderName: '(Year)',
// pivotQuarterColumnHeaderName: '(Quarter)',
// Charts configuration panel
// chartsNoCharts: 'There are no charts available',
// chartsChartNotSelected: 'Select a chart type to configure its options',
// chartsTabChart: 'Chart',
// chartsTabFields: 'Fields',
// chartsTabCustomize: 'Customize',
// chartsCloseButton: 'Close charts configuration',
// chartsSyncButtonLabel: 'Sync chart',
// chartsSearchPlaceholder: 'Search fields',
// chartsSearchLabel: 'Search fields',
// chartsSearchClear: 'Clear search',
// chartsNoFields: 'No fields',
// chartsFieldBlocked: 'This field cannot be added to any section',
// chartsCategories: 'Categories',
// chartsSeries: 'Series',
// chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
// chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
// chartsMenuMoveUp: 'Move up',
// chartsMenuMoveDown: 'Move down',
// chartsMenuMoveToTop: 'Move to top',
// chartsMenuMoveToBottom: 'Move to bottom',
// chartsMenuOptions: 'Field options',
// chartsMenuRemove: 'Remove',
// chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
// chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
// AI Assistant panel
// aiAssistantPanelTitle: 'AI Assistant',
// aiAssistantPanelClose: 'Close AI Assistant',
// aiAssistantPanelNewConversation: 'New conversation',
// aiAssistantPanelConversationHistory: 'Conversation history',
// aiAssistantPanelEmptyConversation: 'No prompt history',
// aiAssistantSuggestions: 'Suggestions',
// Prompt field
promptFieldLabel: 'Введення запиту',
promptFieldPlaceholder: 'Введіть запит…',
promptFieldPlaceholderWithRecording: 'Введіть або запишіть запит…',
promptFieldPlaceholderListening: 'Прослуховування запиту…',
// promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
promptFieldSend: 'Надіслати',
promptFieldRecord: 'Запис',
promptFieldStopRecording: 'Зупинити запис'
// Prompt
// promptRerun: 'Run again',
// promptProcessing: 'Processing…',
// promptAppliedChanges: 'Applied changes',
// Prompt changes
// promptChangeGroupDescription: (column: string) => `Group by ${column}`,
// promptChangeAggregationLabel: (column: string, aggregation: string) => `${column} (${aggregation})`,
// promptChangeAggregationDescription: (column: string, aggregation: string) => `Aggregate ${column} (${aggregation})`,
// promptChangeFilterLabel: (column: string, operator: string, value: string) => {
// if (operator === 'is any of') {
// return `${column} is any of: ${value}`;
// }
// return `${column} ${operator} ${value}`;
// },
// promptChangeFilterDescription: (column: string, operator: string, value: string) => {
// if (operator === 'is any of') {
// return `Filter where ${column} is any of: ${value}`;
// }
// return `Filter where ${column} ${operator} ${value}`;
// },
// promptChangeSortDescription: (column: string, direction: string) => `Sort by ${column} (${direction})`,
// promptChangePivotEnableLabel: 'Pivot',
// promptChangePivotEnableDescription: 'Enable pivot',
// promptChangePivotColumnsLabel: (count: number) => `Columns (${count})`,
// promptChangePivotColumnsDescription: (column: string, direction: string) => `${column}${direction ? ` (${direction})` : ''}`,
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
};
export const ukUA = getGridLocalization(ukUAGrid);