{"record":{"id":"c64f6cb3392938bd","repo":"marmelab/react-admin","slug":"a-message-contains-more-than-two-plural-forms-so-w","errorCode":null,"errorMessage":"A message contains more than two plural forms so we can not convert it to i18next format automatically. You should provide your own translations for this language.","messagePattern":"A message contains more than two plural forms so we can not convert it to i18next format automatically\\. You should provide your own translations for this language\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/ra-i18n-i18next/src/convertRaTranslationsToI18next.ts","lineNumber":51,"sourceCode":"    return Object.keys(raMessages).reduce((acc, key) => {\n        if (typeof acc[key] === 'object') {\n            acc[key] = convertRaTranslationsToI18next(acc[key], {\n                prefix,\n                suffix,\n            });\n            return acc;\n        }\n\n        const message = acc[key] as string;\n\n        if (message.indexOf(' |||| ') > -1) {\n            const pluralVariants = message.split(' |||| ');\n\n            if (\n                pluralVariants.length > 2 &&\n                process.env.NODE_ENV === 'development'\n            ) {\n                console.warn(\n                    'A message contains more than two plural forms so we can not convert it to i18next format automatically. You should provide your own translations for this language.'\n                );\n            }\n            acc[`${key}_one`] = convertRaTranslationToI18next(\n                pluralVariants[0],\n                {\n                    prefix,\n                    suffix,\n                }\n            );\n            acc[`${key}_other`] = convertRaTranslationToI18next(\n                pluralVariants[1],\n                {\n                    prefix,\n                    suffix,\n                }\n            );\n            delete acc[key];","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/marmelab/react-admin/blob/051f511bb0afb5ea565c2d3728bf4dab0a6fa5e0/packages/ra-i18n-i18next/src/convertRaTranslationsToI18next.ts#L33-L69","documentation":"convertRaTranslationsToI18next converts react-admin's ' |||| ' plural syntax to i18next's _one/_other keys, which supports at most two variants. When a message contains three or more plural forms (common in Slavic languages with plural cases), automatic conversion is impossible and the converter warns, keeping only the first two variants.","triggerScenarios":"Running convertRaTranslationsToI18next on a translation file whose messages contain 'a |||| b |||| c' (three-plus segments separated by ' |||| ').","commonSituations":"Migrating a Russian, Polish, Ukrainian, Czech, etc. translation package from ra-language-* to the i18next provider.","solutions":["Provide your own i18next-format translations for that language instead of auto-converting.","Manually split multi-form messages into _one/_other/_few keys in i18next format with proper plural rules.","Preprocess the source JSON to reduce messages to two variants before conversion if approximation is acceptable."],"exampleFix":"// before (source message)\n\"%{smart_count} comment |||| %{smart_count} comments |||| %{smart_count} komentarzy\"\n// after (hand-written i18next)\n\"comments_one\": \"%{smart_count} comment\",\n\"comments_other\": \"%{smart_count} comments\" // plus custom plural rule for the language","handlingStrategy":"validation","validationCode":"const messages = require('./ru.json');\nconst bad = Object.entries(messages).filter(([, v]) => String(v).split(' |||| ').length > 2);\nif (bad.length) console.warn('Manual i18next translation needed for:', bad.map(([k]) => k));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Audit translation files for ' |||| ' occurrences before running the converter.","For languages with >2 plural forms, ship hand-written i18next translations.","Write a build script that fails CI when multi-plural messages are detected."],"tags":["i18n","translations","pluralization"],"backgroundTag":"unsupported-plural-forms","analyzedSha":"051f511bb0afb5ea565c2d3728bf4dab0a6fa5e0","analyzedAt":"2026-08-30T02:28:14.926Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}