Skip to content

Commit

Permalink
[locales] Use penultimate digit for russian in footer row selected (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
dastan-akhmetov-scity committed Nov 27, 2023
1 parent bef51fa commit 4f316ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/grid/x-data-grid/src/locales/ruRU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ const ruRUGrid: Partial<GridLocaleText> = {
// Rows selected footer text
footerRowSelected: (count) => {
let pluralForm = 'строк выбрано';
const penultimateDigit = Math.floor(count / 10) % 10;
const lastDigit = count % 10;
if (lastDigit > 1 && lastDigit < 5) {
if (penultimateDigit !== 1 && lastDigit > 1 && lastDigit < 5) {
pluralForm = 'строки выбраны';
} else if (lastDigit === 1) {
} else if (penultimateDigit !== 1 && lastDigit === 1) {
pluralForm = 'строка выбрана';
}
return `${count} ${pluralForm}`;
Expand Down

0 comments on commit 4f316ac

Please sign in to comment.