.cursorrules 1.6 KB

123456789101112131415161718
  1. # Обязательные правила для ИИ:
  2. - После каждого успешного внедрения фичи или серии правок, делай `git add .` и `git commit -m "описание"`.
  3. - Проверяй работоспособность перед коммитом.
  4. - Если мы изменяли фронтенд, то обязательно запускай npm run build и анализируй вывод.
  5. - Если мы поменяли бэкэнд, то согласовываем тесты и запускаем тесты каждый раз.
  6. - Не используй powershell, используй cmd
  7. # Localization Management Rules
  8. - **Source of Truth**: `src/locales/translations.json` is the single source of truth for all frontend translations.
  9. - **Supported Languages**: English (`en`), Montenegrin (`me`), Russian (`ru`), and Ukrainian (**`ua`**).
  10. - **Sync Command**: After updating `translations.json`, run `python scripts/manage_locales.py split` to update the individual locale files (avoid `npm run` due to PowerShell restrictions).
  11. - **No Direct Edits**: DO NOT edit `en.json`, `me.json`, `ru.json`, or `ua.json` directly.
  12. - **Backend Schema**: When adding new languages, ensure the database columns and Pydantic schemas are updated with the `_` + code suffix (e.g., `name_ua`).
  13. - **Keys Hierarchy**: Maintain the hierarchical structure in `translations.json`. Group related keys under parent objects.
  14. - **Placeholders**: Use `{{variable_name}}` for i18next-style placeholders.
  15. - **Validation**: Ensure that all keys used in the code with `t()` actually exist in `translations.json`.