Repository navigation
feat: add russian machine translation - #331
neolegshishov wants to merge 2 commits into
Conversation
Reviewer's GuideData structuresRegister Russian in the locale catalogs and metadata so the application can recognize it as a supported locale.
ImplementationAdd Russian to the language-name mapping used by the AI service.
UIAdd Russian translations across all 17 frontend message namespaces so users can view the application in Russian.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Thanks for your first pull request to Wardrowbe! Please make sure you've read the CONTRIBUTING guide, especially the PR title format section. A maintainer will review this soon. |
There was a problem hiding this comment.
Hey - I've found 8 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Russian AI descriptions use English**
When the backend locale-parity test runs or a Russian user's item image is analyzed, `DESCRIPTION_LANGUAGES` has no `ru` entry, so `analyze_image` falls back to English and the locale-parity test fails; Russian users receive English descriptions.
Add a Russian entry to `DESCRIPTION_LANGUAGES` so Russian descriptions are generated and every supported locale has a mapping.
</issue_to_address>
### Comment 2
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Never-worn insight fails to render**
When a Russian never-worn insight is formatted with a count that has no matching plural option, `insightNeverWorn` uses `другие` instead of the required ICU `other` selector, so formatting fails and the insight is not displayed.
Replace the `другие` plural selector in `insightNeverWorn` with the ICU `other` selector.
</issue_to_address>
### Comment 3
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Russian counts use incorrect word forms**
When a Russian pluralized message formats a count in the `few` or `many` category, russian plural messages generally define only `one` and `other`, so counts in `few` or `many` use the `other` wording and display incorrect noun forms, such as `2 предметов` instead of `2 предмета`.
Add appropriate `few` and `many` forms to the Russian plural messages.
</issue_to_address>
### Comment 4
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Russian analytics labels mislead users**
When a Russian user views analytics, the Russian labels for `neverWorn.title`, `totalWears.title`, and `outfitsGenerated.title` are mistranslated, so users see meanings such as “Never gave birth,” “Total socks,” and “Generated forms” instead of accurate analytics labels.
Correct the Russian translations for the never-worn, total-wears, and outfits-generated analytics titles.
</issue_to_address>
### Comment 5
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Russian setup instructions are corrupted**
When a Russian user opens login while no authentication method is configured, the Russian unconfigured-login message replaces the `<code>` tags and environment-variable names with `KEEP` markers and spaced text, so users see unusable setup instructions instead of the required configuration values.
Restore the exact environment-variable names and wrap them in the corresponding `<code>` tags in the Russian message.
</issue_to_address>
### Comment 6
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Development warning loses security meaning**
When a Russian user sees the development login form, the Russian `devMode` text says “Development Mode - All accepted documents,” rather than warning that any credentials are accepted. Russian users therefore do not receive the warning's authentication meaning on the development login form.
Translate the warning to explicitly state that any credentials are accepted.
</issue_to_address>
### Comment 7
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Login progress says “subscribing”**
When a Russian user submits the login form and sign-in is in progress, the Russian `signingIn` text means “subscribing,” not “signing in.” While authentication is in progress, the login button therefore tells Russian users that they are subscribing.
Replace the text with a Russian phrase meaning “Signing in…”.
</issue_to_address>
### Comment 8
<location path="frontend/lib/i18n/locales.ts" line_range="23" />
<code_context>
fr: { name: 'French', nativeName: 'Français', dir: 'ltr' },
de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' },
it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' },
+ ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' },
};
</code_context>
<issue_to_address>
**Russian home page loses product name**
When a Russian visitor opens the home page, the Russian `auth.brandName` translates the product name as `гардероб`, while the navigation translation retains `wardrowbe`. The home page uses `auth.brandName` as its visible heading and logo alt text, so Russian visitors see a generic word instead of the product name.
Keep the product name unchanged in `auth.brandName`, consistently with the navigation translation.
</issue_to_address>Sourcery assessment
Approval pending. 8 findings to address first.
Blocking findings: frontend/lib/i18n/locales.ts:23, frontend/lib/i18n/locales.ts:23, frontend/lib/i18n/locales.ts:23, frontend/lib/i18n/locales.ts:23, frontend/lib/i18n/locales.ts:23, and 3 more
| fr: { name: 'French', nativeName: 'Français', dir: 'ltr' }, | ||
| de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' }, | ||
| it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' }, | ||
| ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' }, |
There was a problem hiding this comment.
🟠 High · Never-worn insight fails to render
When a Russian never-worn insight is formatted with a count that has no matching plural option, insightNeverWorn uses другие instead of the required ICU other selector, so formatting fails and the insight is not displayed.
Replace the другие plural selector in insightNeverWorn with the ICU other selector.
Prompt for AI agents
In `frontend/lib/i18n/locales.ts` at line 23:
**Never-worn insight fails to render**
When a Russian never-worn insight is formatted with a count that has no matching plural option, `insightNeverWorn` uses `другие` instead of the required ICU `other` selector, so formatting fails and the insight is not displayed.
Replace the `другие` plural selector in `insightNeverWorn` with the ICU `other` selector.| fr: { name: 'French', nativeName: 'Français', dir: 'ltr' }, | ||
| de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' }, | ||
| it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' }, | ||
| ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' }, |
There was a problem hiding this comment.
🟠 High · Russian counts use incorrect word forms
When a Russian pluralized message formats a count in the few or many category, russian plural messages generally define only one and other, so counts in few or many use the other wording and display incorrect noun forms, such as 2 предметов instead of 2 предмета.
Add appropriate few and many forms to the Russian plural messages.
Prompt for AI agents
In `frontend/lib/i18n/locales.ts` at line 23:
**Russian counts use incorrect word forms**
When a Russian pluralized message formats a count in the `few` or `many` category, russian plural messages generally define only `one` and `other`, so counts in `few` or `many` use the `other` wording and display incorrect noun forms, such as `2 предметов` instead of `2 предмета`.
Add appropriate `few` and `many` forms to the Russian plural messages.| fr: { name: 'French', nativeName: 'Français', dir: 'ltr' }, | ||
| de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' }, | ||
| it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' }, | ||
| ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' }, |
There was a problem hiding this comment.
🟡 Medium · Russian analytics labels mislead users
When a Russian user views analytics, the Russian labels for neverWorn.title, totalWears.title, and outfitsGenerated.title are mistranslated, so users see meanings such as “Never gave birth,” “Total socks,” and “Generated forms” instead of accurate analytics labels.
Correct the Russian translations for the never-worn, total-wears, and outfits-generated analytics titles.
Prompt for AI agents
In `frontend/lib/i18n/locales.ts` at line 23:
**Russian analytics labels mislead users**
When a Russian user views analytics, the Russian labels for `neverWorn.title`, `totalWears.title`, and `outfitsGenerated.title` are mistranslated, so users see meanings such as “Never gave birth,” “Total socks,” and “Generated forms” instead of accurate analytics labels.
Correct the Russian translations for the never-worn, total-wears, and outfits-generated analytics titles.| fr: { name: 'French', nativeName: 'Français', dir: 'ltr' }, | ||
| de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' }, | ||
| it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' }, | ||
| ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' }, |
There was a problem hiding this comment.
🟡 Medium · Russian setup instructions are corrupted
When a Russian user opens login while no authentication method is configured, the Russian unconfigured-login message replaces the <code> tags and environment-variable names with KEEP markers and spaced text, so users see unusable setup instructions instead of the required configuration values.
Restore the exact environment-variable names and wrap them in the corresponding <code> tags in the Russian message.
Prompt for AI agents
In `frontend/lib/i18n/locales.ts` at line 23:
**Russian setup instructions are corrupted**
When a Russian user opens login while no authentication method is configured, the Russian unconfigured-login message replaces the `<code>` tags and environment-variable names with `KEEP` markers and spaced text, so users see unusable setup instructions instead of the required configuration values.
Restore the exact environment-variable names and wrap them in the corresponding `<code>` tags in the Russian message.| fr: { name: 'French', nativeName: 'Français', dir: 'ltr' }, | ||
| de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' }, | ||
| it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' }, | ||
| ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' }, |
There was a problem hiding this comment.
🟡 Medium · Development warning loses security meaning
When a Russian user sees the development login form, the Russian devMode text says “Development Mode - All accepted documents,” rather than warning that any credentials are accepted. Russian users therefore do not receive the warning's authentication meaning on the development login form.
Translate the warning to explicitly state that any credentials are accepted.
Prompt for AI agents
In `frontend/lib/i18n/locales.ts` at line 23:
**Development warning loses security meaning**
When a Russian user sees the development login form, the Russian `devMode` text says “Development Mode - All accepted documents,” rather than warning that any credentials are accepted. Russian users therefore do not receive the warning's authentication meaning on the development login form.
Translate the warning to explicitly state that any credentials are accepted.| fr: { name: 'French', nativeName: 'Français', dir: 'ltr' }, | ||
| de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' }, | ||
| it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' }, | ||
| ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' }, |
There was a problem hiding this comment.
🟡 Medium · Login progress says “subscribing”
When a Russian user submits the login form and sign-in is in progress, the Russian signingIn text means “subscribing,” not “signing in.” While authentication is in progress, the login button therefore tells Russian users that they are subscribing.
Replace the text with a Russian phrase meaning “Signing in…”.
Prompt for AI agents
In `frontend/lib/i18n/locales.ts` at line 23:
**Login progress says “subscribing”**
When a Russian user submits the login form and sign-in is in progress, the Russian `signingIn` text means “subscribing,” not “signing in.” While authentication is in progress, the login button therefore tells Russian users that they are subscribing.
Replace the text with a Russian phrase meaning “Signing in…”.| fr: { name: 'French', nativeName: 'Français', dir: 'ltr' }, | ||
| de: { name: 'German', nativeName: 'Deutsch', dir: 'ltr' }, | ||
| it: { name: 'Italian', nativeName: 'Italiano', dir: 'ltr' }, | ||
| ru: { name: 'Russian', nativeName: 'Русский', dir: 'ltr' }, |
There was a problem hiding this comment.
🟡 Medium · Russian home page loses product name
When a Russian visitor opens the home page, the Russian auth.brandName translates the product name as гардероб, while the navigation translation retains wardrowbe. The home page uses auth.brandName as its visible heading and logo alt text, so Russian visitors see a generic word instead of the product name.
Keep the product name unchanged in auth.brandName, consistently with the navigation translation.
Prompt for AI agents
In `frontend/lib/i18n/locales.ts` at line 23:
**Russian home page loses product name**
When a Russian visitor opens the home page, the Russian `auth.brandName` translates the product name as `гардероб`, while the navigation translation retains `wardrowbe`. The home page uses `auth.brandName` as its visible heading and logo alt text, so Russian visitors see a generic word instead of the product name.
Keep the product name unchanged in `auth.brandName`, consistently with the navigation translation.
Description
Add comprehensive Russian (
ru) locale translations to the frontend i18n catalog.Related Issue
Type of Change
Checklist
Testing
Test Environment
Tests Performed
npm run i18n:keys— OK: everyt()call resolves (1420 keys in catalog, 1038 referenced from source)npm run i18n:parity— OK: 9 locales checked, all ICU placeholders preserved, no missing or extra keysnpm run i18n:scan— 5 hardcoded strings in source code only (not translation issues):app/layout.tsx,components/ui/dialog.tsx,lib/auth.tsScreenshots (if applicable)
Additional Notes
pluralformat expressions are correctly translated with proper Russian grammar rulesi18n:scanreports 5 hardcoded strings in TSX/TS source — these are not translation file issuesSummary by Sourcery
Add comprehensive Russian localization across the frontend and localized AI responses.
New Features: