From 9d1713e2396b344f66fd1e4b313cd3d54a09a40a Mon Sep 17 00:00:00 2001 From: Anders Lund <61545005+AnderzL7@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:33:59 +0200 Subject: [PATCH] =?UTF-8?q?[l10n]=20Add=20Norwegian=20nynorsk=20(nn-NO)=20?= =?UTF-8?q?locale=20and=20improve=20Norwegian=20bokm=C3=A5l=20(nb-NO)=20lo?= =?UTF-8?q?cale=20(#13588)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Lund <61545005+AnderzL7@users.noreply.github.com> --- docs/data/data-grid/localization/data.json | 10 +- packages/x-data-grid/src/locales/index.ts | 1 + packages/x-data-grid/src/locales/nbNO.ts | 60 +++---- packages/x-data-grid/src/locales/nnNO.ts | 179 +++++++++++++++++++++ scripts/localeNames.js | 1 + 5 files changed, 220 insertions(+), 31 deletions(-) create mode 100644 packages/x-data-grid/src/locales/nnNO.ts diff --git a/docs/data/data-grid/localization/data.json b/docs/data/data-grid/localization/data.json index b4887857a77b..f5356d9b7b57 100644 --- a/docs/data/data-grid/localization/data.json +++ b/docs/data/data-grid/localization/data.json @@ -155,10 +155,18 @@ "languageTag": "nb-NO", "importName": "nbNO", "localeName": "Norwegian (Bokmål)", - "missingKeysCount": 25, + "missingKeysCount": 0, "totalKeysCount": 118, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/nbNO.ts" }, + { + "languageTag": "nn-NO", + "importName": "nnNO", + "localeName": "Norwegian (Nynorsk)", + "missingKeysCount": 0, + "totalKeysCount": 118, + "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/nnNO.ts" + }, { "languageTag": "fa-IR", "importName": "faIR", diff --git a/packages/x-data-grid/src/locales/index.ts b/packages/x-data-grid/src/locales/index.ts index fbc7613b5603..4589950af741 100644 --- a/packages/x-data-grid/src/locales/index.ts +++ b/packages/x-data-grid/src/locales/index.ts @@ -18,6 +18,7 @@ export * from './jaJP'; export * from './koKR'; export * from './nbNO'; export * from './nlNL'; +export * from './nnNO'; export * from './plPL'; export * from './ptBR'; export * from './roRO'; diff --git a/packages/x-data-grid/src/locales/nbNO.ts b/packages/x-data-grid/src/locales/nbNO.ts index 67c0e100dc7b..16de342b6999 100644 --- a/packages/x-data-grid/src/locales/nbNO.ts +++ b/packages/x-data-grid/src/locales/nbNO.ts @@ -21,7 +21,7 @@ const nbNOGrid: Partial = { // Filters toolbar button text toolbarFilters: 'Filter', toolbarFiltersLabel: 'Vis filter', - toolbarFiltersTooltipHide: 'Skjul fitler', + toolbarFiltersTooltipHide: 'Skjul filter', toolbarFiltersTooltipShow: 'Vis filter', toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`, @@ -49,7 +49,7 @@ const nbNOGrid: Partial = { filterPanelRemoveAll: 'Fjern alle', filterPanelDeleteIconLabel: 'Slett', filterPanelLogicOperator: 'Logisk operator', - filterPanelOperator: 'Operatører', + filterPanelOperator: 'Operator', filterPanelOperatorAnd: 'Og', filterPanelOperatorOr: 'Eller', filterPanelColumns: 'Kolonner', @@ -70,33 +70,33 @@ const nbNOGrid: Partial = { filterOperatorIsEmpty: 'er tom', filterOperatorIsNotEmpty: 'er ikke tom', filterOperatorIsAnyOf: 'er en av', - // 'filterOperator=': '=', - // 'filterOperator!=': '!=', - // 'filterOperator>': '>', - // 'filterOperator>=': '>=', - // 'filterOperator<': '<', - // 'filterOperator<=': '<=', + 'filterOperator=': '=', + 'filterOperator!=': '!=', + 'filterOperator>': '>', + 'filterOperator>=': '>=', + 'filterOperator<': '<', + 'filterOperator<=': '<=', // Header filter operators text - // headerFilterOperatorContains: 'Contains', - // headerFilterOperatorEquals: 'Equals', - // headerFilterOperatorStartsWith: 'Starts with', - // headerFilterOperatorEndsWith: 'Ends with', - // headerFilterOperatorIs: 'Is', - // headerFilterOperatorNot: 'Is not', - // headerFilterOperatorAfter: 'Is after', - // headerFilterOperatorOnOrAfter: 'Is on or after', - // headerFilterOperatorBefore: 'Is before', - // headerFilterOperatorOnOrBefore: 'Is on or before', - // headerFilterOperatorIsEmpty: 'Is empty', - // headerFilterOperatorIsNotEmpty: 'Is not empty', - // headerFilterOperatorIsAnyOf: 'Is any of', - // 'headerFilterOperator=': 'Equals', - // 'headerFilterOperator!=': 'Not equals', - // 'headerFilterOperator>': 'Greater than', - // 'headerFilterOperator>=': 'Greater than or equal to', - // 'headerFilterOperator<': 'Less than', - // 'headerFilterOperator<=': 'Less than or equal to', + headerFilterOperatorContains: 'Inneholder', + headerFilterOperatorEquals: 'Lik', + headerFilterOperatorStartsWith: 'Starter på', + headerFilterOperatorEndsWith: 'Slutter på', + headerFilterOperatorIs: 'Er', + headerFilterOperatorNot: 'Er ikke', + headerFilterOperatorAfter: 'Er etter', + headerFilterOperatorOnOrAfter: 'Er på eller etter', + headerFilterOperatorBefore: 'Er før', + headerFilterOperatorOnOrBefore: 'Er på eller før', + headerFilterOperatorIsEmpty: 'Er tom', + headerFilterOperatorIsNotEmpty: 'Er ikke tom', + headerFilterOperatorIsAnyOf: 'Er en av', + 'headerFilterOperator=': 'Lik', + 'headerFilterOperator!=': 'Ikke lik', + 'headerFilterOperator>': 'Større enn', + 'headerFilterOperator>=': 'Større enn eller lik', + 'headerFilterOperator<': 'Mindre enn', + 'headerFilterOperator<=': 'Mindre enn eller lik', // Filter values text filterValueAny: 'noen', @@ -131,7 +131,7 @@ const nbNOGrid: Partial = { `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`, // Checkbox selection text - checkboxSelectionHeaderName: 'Avmerkingsboks valgt', + checkboxSelectionHeaderName: 'Avmerkingsboks', checkboxSelectionSelectAllRows: 'Velg alle rader', checkboxSelectionUnselectAllRows: 'Velg bort alle rader', checkboxSelectionSelectRow: 'Velg rad', @@ -157,7 +157,7 @@ const nbNOGrid: Partial = { // Grouping columns groupingColumnHeaderName: 'Grupper', groupColumn: (name) => `Grupper på ${name}`, - unGroupColumn: (name) => `Stopp å grupper på ${name}`, + unGroupColumn: (name) => `Slutt å grupper på ${name}`, // Master/detail detailPanelToggle: 'Utvid/kollaps detalj panel', @@ -165,7 +165,7 @@ const nbNOGrid: Partial = { collapseDetailPanel: 'Kollaps', // Row reordering text - rowReorderingHeaderName: 'Rad reorganisering', + rowReorderingHeaderName: 'Radreorganisering', // Aggregation aggregationMenuItemHeader: 'Aggregering', diff --git a/packages/x-data-grid/src/locales/nnNO.ts b/packages/x-data-grid/src/locales/nnNO.ts new file mode 100644 index 000000000000..8ef20a566b6c --- /dev/null +++ b/packages/x-data-grid/src/locales/nnNO.ts @@ -0,0 +1,179 @@ +import { nnNO as nnNOCore } from '@mui/material/locale'; +import { GridLocaleText } from '../models/api/gridLocaleTextApi'; +import { getGridLocalization, Localization } from '../utils/getGridLocalization'; + +const nnNOGrid: Partial = { + // Root + noRowsLabel: 'Ingen rader', + noResultsOverlayLabel: 'Fann ingen resultat.', + + // Density selector toolbar button text + toolbarDensity: 'Tettheit', + toolbarDensityLabel: 'Tettheit', + toolbarDensityCompact: 'Kompakt', + toolbarDensityStandard: 'Standard', + toolbarDensityComfortable: 'Komfortabelt', + + // Columns selector toolbar button text + toolbarColumns: 'Kolonner', + toolbarColumnsLabel: 'Vel kolonner', + + // Filters toolbar button text + toolbarFilters: 'Filter', + toolbarFiltersLabel: 'Vis filter', + toolbarFiltersTooltipHide: 'Skjul filter', + toolbarFiltersTooltipShow: 'Vis filter', + toolbarFiltersTooltipActive: (count) => + count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`, + + // Quick filter toolbar field + toolbarQuickFilterPlaceholder: 'Søk…', + toolbarQuickFilterLabel: 'Søk', + toolbarQuickFilterDeleteIconLabel: 'Slett', + + // Export selector toolbar button text + toolbarExport: 'Eksporter', + toolbarExportLabel: 'Eksporter', + toolbarExportCSV: 'Last ned som CSV', + toolbarExportPrint: 'Skriv ut', + toolbarExportExcel: 'Last ned som Excel', + + // Columns management text + columnsManagementSearchTitle: 'Søk', + columnsManagementNoColumns: 'Ingen kolonner', + columnsManagementShowHideAllText: 'Vis/skjul alle', + columnsManagementReset: 'Nullstill', + + // Filter panel text + filterPanelAddFilter: 'Legg til filter', + filterPanelRemoveAll: 'Fjern alle', + filterPanelDeleteIconLabel: 'Slett', + filterPanelLogicOperator: 'Logisk operator', + filterPanelOperator: 'Operator', + filterPanelOperatorAnd: 'Og', + filterPanelOperatorOr: 'Eller', + filterPanelColumns: 'Kolonner', + filterPanelInputLabel: 'Verdi', + filterPanelInputPlaceholder: 'Filter verdi', + + // Filter operators text + filterOperatorContains: 'inneheld', + filterOperatorEquals: 'er lik', + filterOperatorStartsWith: 'startar med', + filterOperatorEndsWith: 'sluttar med', + filterOperatorIs: 'er', + filterOperatorNot: 'er ikkje', + filterOperatorAfter: 'er etter', + filterOperatorOnOrAfter: 'er på eller etter', + filterOperatorBefore: 'er før', + filterOperatorOnOrBefore: 'er på eller før', + filterOperatorIsEmpty: 'er tom', + filterOperatorIsNotEmpty: 'er ikkje tom', + filterOperatorIsAnyOf: 'er ein av', + 'filterOperator=': '=', + 'filterOperator!=': '!=', + 'filterOperator>': '>', + 'filterOperator>=': '>=', + 'filterOperator<': '<', + 'filterOperator<=': '<=', + + // Header filter operators text + headerFilterOperatorContains: 'Inneheld', + headerFilterOperatorEquals: 'Lik', + headerFilterOperatorStartsWith: 'Startar på', + headerFilterOperatorEndsWith: 'Sluttar på', + headerFilterOperatorIs: 'Er', + headerFilterOperatorNot: 'Er ikkje', + headerFilterOperatorAfter: 'Er etter', + headerFilterOperatorOnOrAfter: 'Er på eller etter', + headerFilterOperatorBefore: 'Er før', + headerFilterOperatorOnOrBefore: 'Er på eller før', + headerFilterOperatorIsEmpty: 'Er tom', + headerFilterOperatorIsNotEmpty: 'Er ikkje tom', + headerFilterOperatorIsAnyOf: 'Er ein av', + 'headerFilterOperator=': 'Lik', + 'headerFilterOperator!=': 'Ikkje lik', + 'headerFilterOperator>': 'Større enn', + 'headerFilterOperator>=': 'Større enn eller lik', + 'headerFilterOperator<': 'Mindre enn', + 'headerFilterOperator<=': 'Mindre enn eller lik', + + // Filter values text + filterValueAny: 'nokon', + filterValueTrue: 'sant', + filterValueFalse: 'usant', + + // Column menu text + columnMenuLabel: 'Meny', + columnMenuShowColumns: 'Vis kolonner', + columnMenuManageColumns: 'Administrer kolonner', + columnMenuFilter: 'Filter', + columnMenuHideColumn: 'Skjul', + columnMenuUnsort: 'Usorter', + columnMenuSortAsc: 'Sorter AUKANDE', + columnMenuSortDesc: 'Sorter SYNKANDE', + + // Column header text + columnHeaderFiltersTooltipActive: (count) => + count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`, + columnHeaderFiltersLabel: 'Vis filter', + columnHeaderSortIconLabel: 'Sorter', + + // Rows selected footer text + footerRowSelected: (count) => + count !== 1 ? `${count.toLocaleString()} rader valt` : `${count.toLocaleString()} rad valt`, + + // Total row amount footer text + footerTotalRows: 'Totalt tal rader:', + + // Total visible row amount footer text + footerTotalVisibleRows: (visibleCount, totalCount) => + `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`, + + // Checkbox selection text + checkboxSelectionHeaderName: 'Avmerkingsboks', + checkboxSelectionSelectAllRows: 'Vel alle rader', + checkboxSelectionUnselectAllRows: 'Vel vekk alle rader', + checkboxSelectionSelectRow: 'Vel rad', + checkboxSelectionUnselectRow: 'Vel vekk rad', + + // Boolean cell text + booleanCellTrueLabel: 'sant', + booleanCellFalseLabel: 'usant', + + // Actions cell more text + actionsCellMore: 'meir', + + // Column pinning text + pinToLeft: 'Fest til venstre', + pinToRight: 'Fest til høgre', + unpin: 'Lausne', + + // Tree Data + treeDataGroupingHeaderName: 'Grupper', + treeDataExpand: 'vis barn', + treeDataCollapse: 'skjul barn', + + // Grouping columns + groupingColumnHeaderName: 'Grupper', + groupColumn: (name) => `Grupper på ${name}`, + unGroupColumn: (name) => `Slutt å grupper på ${name}`, + + // Master/detail + detailPanelToggle: 'Utvid/kollaps detalj panel', + expandDetailPanel: 'Utvid', + collapseDetailPanel: 'Kolaps', + + // Row reordering text + rowReorderingHeaderName: 'Radreorganisering', + + // Aggregation + aggregationMenuItemHeader: 'Aggregering', + aggregationFunctionLabelSum: 'sum', + aggregationFunctionLabelAvg: 'snitt', + aggregationFunctionLabelMin: 'min', + aggregationFunctionLabelMax: 'maks', + aggregationFunctionLabelSize: 'størrelse', +}; + +export const nnNO: Localization = getGridLocalization(nnNOGrid, nnNOCore); diff --git a/scripts/localeNames.js b/scripts/localeNames.js index 08757be676e0..5b0b0a23398f 100644 --- a/scripts/localeNames.js +++ b/scripts/localeNames.js @@ -35,6 +35,7 @@ module.exports = { 'ko-KR': 'Korean', mk: 'Macedonian', 'nb-NO': 'Norwegian (Bokmål)', + 'nn-NO': 'Norwegian (Nynorsk)', 'fa-IR': 'Persian', 'pl-PL': 'Polish', 'pt-PT': 'Portuguese',