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] Add Norwegian nynorsk (nn-NO) locale and improve Norwegian bokmål (nb-NO) locale #13588

Merged
merged 6 commits into from
Jul 22, 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
10 changes: 9 additions & 1 deletion docs/data/data-grid/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid/src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
60 changes: 30 additions & 30 deletions packages/x-data-grid/src/locales/nbNO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const nbNOGrid: Partial<GridLocaleText> = {
// 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`,
Expand Down Expand Up @@ -49,7 +49,7 @@ const nbNOGrid: Partial<GridLocaleText> = {
filterPanelRemoveAll: 'Fjern alle',
filterPanelDeleteIconLabel: 'Slett',
filterPanelLogicOperator: 'Logisk operator',
filterPanelOperator: 'Operatører',
filterPanelOperator: 'Operator',
filterPanelOperatorAnd: 'Og',
filterPanelOperatorOr: 'Eller',
filterPanelColumns: 'Kolonner',
Expand All @@ -70,33 +70,33 @@ const nbNOGrid: Partial<GridLocaleText> = {
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',
Expand Down Expand Up @@ -131,7 +131,7 @@ const nbNOGrid: Partial<GridLocaleText> = {
`${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',
Expand All @@ -157,15 +157,15 @@ const nbNOGrid: Partial<GridLocaleText> = {
// 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',
expandDetailPanel: 'Utvid',
collapseDetailPanel: 'Kollaps',

// Row reordering text
rowReorderingHeaderName: 'Rad reorganisering',
rowReorderingHeaderName: 'Radreorganisering',

// Aggregation
aggregationMenuItemHeader: 'Aggregering',
Expand Down
179 changes: 179 additions & 0 deletions packages/x-data-grid/src/locales/nnNO.ts
Original file line number Diff line number Diff line change
@@ -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<GridLocaleText> = {
// 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);
1 change: 1 addition & 0 deletions scripts/localeNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading