Skip to content

Conversation

@gagarinyury
Copy link

@gagarinyury gagarinyury commented Jan 7, 2026

Overview

This PR removes all hardcoded user-facing strings from the TaskCreationWizard component and replaces them with i18n translation keys, enabling proper localization.

Related Issue

Contributes to #733 - Standardize Frontend i18n Implementation

Changes

Translation Keys Added (11 new keys in tasks.creation):

  1. dialogDescription - Main dialog description text
  2. descriptionLabel - "Description" label
  3. descriptionPlaceholder - Long description field placeholder
  4. descriptionHelp - Help text for drag & drop
  5. titleLabel - "Task Title" label
  6. titleOptional - "(optional)" suffix
  7. titlePlaceholder - Title field placeholder
  8. titleHelp - Auto-generation help text
  9. draftRestored - Draft restoration notification
  10. startFresh - Start fresh button
  11. classificationOptional - Classification section label

Files Modified:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx - Replaced 11 hardcoded strings with t() calls
  • apps/frontend/src/shared/i18n/locales/en/tasks.json - Added English translations
  • apps/frontend/src/shared/i18n/locales/fr/tasks.json - Added French translations

Before/After

Before:

<DialogTitle>Create New Task</DialogTitle>
<DialogDescription>
  Describe what you want to build. The AI will analyze your request...
</DialogDescription>
<Label>Description <span>*</span></Label>
<Textarea placeholder="Describe the feature, bug fix, or improvement..." />

After:

<DialogTitle>{t('creation.title')}</DialogTitle>
<DialogDescription>
  {t('creation.dialogDescription')}
</DialogDescription>
<Label>{t('creation.descriptionLabel')} <span>*</span></Label>
<Textarea placeholder={t('creation.descriptionPlaceholder')} />

Testing

  • ✅ Verified component still renders correctly in English
  • ✅ Verified French translations display properly when locale is switched
  • ✅ No breaking changes to functionality
  • ✅ All translation keys are defined and accessible

Impact

Next Steps

This is part of the larger effort in #733. The same pattern can be applied to the remaining 187 components with hardcoded strings.


Translation coverage: English ✅ | French ✅
Component tested: TaskCreationWizard ✅

Summary by CodeRabbit

  • New Features
    • Task creation wizard now supports English and French languages
    • All UI text, labels, placeholders, and help text are properly localized for multi-language support

✏️ Tip: You can customize this high-level summary in your review settings.

Replace all hardcoded user-facing strings with i18n translation keys.

Changes:
- Added 11 new translation keys to tasks.creation section
- Replaced hardcoded strings in TaskCreationWizard component
- Updated both English and French translations

Strings replaced:
- Dialog title and description
- Field labels (Description, Task Title)
- Placeholders and help text
- Draft restoration messages
- Classification section label

Contributes to AndyMik90#733 - Standardize Frontend i18n Implementation

Signed-off-by: gagarinyury <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Jan 7, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

The TaskCreationWizard component is being refactored to retrieve all user-facing text strings from i18n translations instead of hard-coded English literals. Corresponding translation keys are added to both English and French locale files for dialog titles, button labels, placeholders, help text, and field labels.

Changes

Cohort / File(s) Summary
Component Localization
apps/frontend/src/renderer/components/TaskCreationWizard.tsx
Replace hard-coded English strings with t('creation...') i18n calls for dialog title, button labels, descriptions, title fields, classification toggle, and draft restoration UI text
English Locale Strings
apps/frontend/src/shared/i18n/locales/en/tasks.json
Add 11 new creation locale keys: dialogDescription, descriptionLabel, descriptionPlaceholder, descriptionHelp, titleLabel, titleOptional, titlePlaceholder, titleHelp, draftRestored, startFresh, classificationOptional; modify existing creation.placeholder
French Locale Strings
apps/frontend/src/shared/i18n/locales/fr/tasks.json
Add the same 11 creation locale keys as English locale file for French language support

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #739: Also refactors TaskCreationWizard UI and i18n locale files to replace hard-coded strings with translation keys in task creation workflows.

Suggested labels

area/frontend, 🔄 Checking, size/S

Suggested reviewers

  • AndyMik90
  • MikeeBuilds

Poem

🐰 Strings take flight to distant lands,
Each locale now has helping hands,
Task creation speaks in tongues so fair,
i18n magic floating through the air!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: removing hardcoded strings from TaskCreationWizard component to enable i18n localization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a47354b and ab8fad4.

📒 Files selected for processing (3)
  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
  • apps/frontend/src/shared/i18n/locales/en/tasks.json
  • apps/frontend/src/shared/i18n/locales/fr/tasks.json
🧰 Additional context used
📓 Path-based instructions (4)
apps/frontend/src/**/*.{ts,tsx,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings

Files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
apps/frontend/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use useTranslation() hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components

Files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
apps/frontend/**/*.{ts,tsx}

⚙️ CodeRabbit configuration file

apps/frontend/**/*.{ts,tsx}: Review React patterns and TypeScript type safety.
Check for proper state management and component composition.

Files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
apps/frontend/src/shared/i18n/locales/**/*.json

📄 CodeRabbit inference engine (CLAUDE.md)

apps/frontend/src/shared/i18n/locales/**/*.json: Store translation strings in namespace-organized JSON files at apps/frontend/src/shared/i18n/locales/{lang}/*.json for each supported language
When implementing new frontend features, add translation keys to all language files (minimum: en/.json and fr/.json)

Files:

  • apps/frontend/src/shared/i18n/locales/fr/tasks.json
  • apps/frontend/src/shared/i18n/locales/en/tasks.json
🧠 Learnings (6)
📓 Common learnings
Learnt from: MikeeBuilds
Repo: AndyMik90/Auto-Claude PR: 661
File: apps/frontend/src/renderer/components/onboarding/OllamaModelSelector.tsx:176-189
Timestamp: 2026-01-04T23:59:45.209Z
Learning: In the AndyMik90/Auto-Claude repository, pre-existing i18n issues (hardcoded user-facing strings that should be localized) can be deferred to future i18n cleanup passes rather than requiring immediate fixes in PRs that don't introduce new i18n violations.
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : When implementing new frontend features, add translation keys to all language files (minimum: en/*.json and fr/*.json)
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/**/*.{ts,tsx,jsx} : Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/**/*.{ts,tsx,jsx} : Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings

Applied to files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : When implementing new frontend features, add translation keys to all language files (minimum: en/*.json and fr/*.json)

Applied to files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
  • apps/frontend/src/shared/i18n/locales/fr/tasks.json
  • apps/frontend/src/shared/i18n/locales/en/tasks.json
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/**/*.{ts,tsx} : Use `useTranslation()` hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components

Applied to files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : Store translation strings in namespace-organized JSON files at `apps/frontend/src/shared/i18n/locales/{lang}/*.json` for each supported language

Applied to files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
  • apps/frontend/src/shared/i18n/locales/en/tasks.json
📚 Learning: 2026-01-04T23:59:45.209Z
Learnt from: MikeeBuilds
Repo: AndyMik90/Auto-Claude PR: 661
File: apps/frontend/src/renderer/components/onboarding/OllamaModelSelector.tsx:176-189
Timestamp: 2026-01-04T23:59:45.209Z
Learning: In the AndyMik90/Auto-Claude repository, pre-existing i18n issues (hardcoded user-facing strings) can be deferred for future i18n cleanup passes. Do not fix such issues in PRs that do not introduce new i18n violations, especially in frontend TSX components (e.g., apps/frontend/**/*.tsx). If a PR adds new i18n violations, address them in that PR.

Applied to files:

  • apps/frontend/src/renderer/components/TaskCreationWizard.tsx
🧬 Code graph analysis (1)
apps/frontend/src/renderer/components/TaskCreationWizard.tsx (1)
apps/frontend/src/renderer/components/ui/dialog.tsx (3)
  • DialogTitle (124-124)
  • DialogDescription (125-125)
  • DialogHeader (122-122)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CodeQL (javascript-typescript)
  • GitHub Check: CodeQL (python)
🔇 Additional comments (3)
apps/frontend/src/renderer/components/TaskCreationWizard.tsx (1)

735-930: LGTM! i18n implementation is correct and complete.

All 11 user-facing strings have been successfully replaced with translation keys from the tasks.creation namespace. The implementation follows react-i18next best practices with proper namespace scoping via useTranslation('tasks') and correctly structured translation key access.

The changes cover:

  • Dialog title and description
  • Draft restoration UI elements
  • Description field (label, placeholder, help text)
  • Title field (label, optional indicator, placeholder, help text)
  • Classification toggle label

All translation keys are defined in both English and French locale files. This is solid progress toward standardizing i18n across the frontend (#733).

As per coding guidelines and learnings: The remaining hardcoded strings in this component (e.g., Category labels, Git options, button text) are pre-existing and can be addressed in future i18n cleanup passes.

apps/frontend/src/shared/i18n/locales/fr/tasks.json (1)

46-56: LGTM! French translations are complete and accurate.

All 11 required translation keys have been added under the creation namespace. The French translations are semantically correct and maintain appropriate tone and formality:

  • Technical terms like "Description" are properly translated
  • "(facultatif)" correctly translates "(optional)"
  • Help text and placeholders provide clear guidance in French
  • Consistent with existing translation style in the file

As per coding guidelines: Translation keys successfully added to all required language files (en and fr).

apps/frontend/src/shared/i18n/locales/en/tasks.json (1)

46-56: LGTM! English translations are complete and properly structured.

All 11 required translation keys have been successfully added under the creation namespace. The translations accurately preserve the original user-facing text while enabling localization support:

  • Keys properly nested under creation namespace
  • Text is clear, concise, and user-friendly
  • Consistent with existing translation structure
  • All keys synchronized with French locale and component usage

As per coding guidelines: Translation strings successfully stored in namespace-organized JSON structure at the correct location.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @gagarinyury, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the internationalization capabilities of the application by localizing the TaskCreationWizard component. By replacing static text with dynamic translation keys, it ensures that the component's user interface can be easily adapted for different languages, improving accessibility and maintainability. This change is a step towards a more globally-ready and consistent user experience.

Highlights

  • Internationalization (i18n): All hardcoded user-facing strings within the TaskCreationWizard component have been replaced with i18n translation keys to enable proper localization.
  • New Translation Keys: Eleven new translation keys have been added under the tasks.creation namespace in both English and French locale files, covering various UI elements like dialog descriptions, labels, placeholders, and help texts.
  • Component Localization: The TaskCreationWizard component is now fully translatable, contributing to the broader effort of standardizing frontend i18n implementation across the application.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a great step towards fully internationalizing the TaskCreationWizard component. The changes correctly replace several hardcoded strings with translation keys.

However, the component still contains a number of user-facing hardcoded strings. To fully achieve the goal of this PR, these should also be moved to the i18n resource files. Since I cannot comment on these lines directly as they are not part of the diff, I'm listing them here for your convenience:

  • Image added successfully! (L914)
  • Labels in advanced options like Category (L945), Priority (L968), etc.
  • Placeholders like Select category (L953), Select priority (L976), etc.
  • Help text for advanced options: These labels help organize... (L1036)
  • Review requirement label and description (L1055, L1058)
  • Git options labels and help texts (L1077, L1096, L1118)
  • The Use project default... string in the branch selector (L1104, L1108)
  • Button texts: Hide Files / Browse Files (L1167), Cancel (L1173), Creating... (L1179), and Create Task (L1182).
  • Various error messages set via setError(), e.g., Maximum of X images allowed.

Addressing these will make the component fully localizable as intended.

<div className="space-y-2">
<Label htmlFor="description" className="text-sm font-medium text-foreground">
Description <span className="text-destructive">*</span>
{t('creation.descriptionLabel')} <span className="text-destructive">*</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While the label text is now translated, the asterisk * for indicating a required field remains hardcoded. This can be problematic for localization, as different languages have different conventions for marking required fields (e.g., placing the * before the label).

For better internationalization, I recommend using the Trans component from react-i18next. This allows the entire label, including the asterisk and its styling, to be translatable.

You'll need to import Trans from react-i18next. Then, you can update the Label as suggested. In your JSON translation file, you would create a new key like this:
"descriptionLabelRequired": "Description <1>*</1>"

Suggested change
{t('creation.descriptionLabel')} <span className="text-destructive">*</span>
<Trans i18nKey="creation.descriptionLabelRequired">Description <span className="text-destructive">*</span></Trans>

@AndyMik90 AndyMik90 self-assigned this Jan 7, 2026
Copy link
Owner

@AndyMik90 AndyMik90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto Claude PR Review

Merge Verdict: 🟠 NEEDS REVISION

🟠 Needs revision - 1 issue(s) require attention.

1 issue(s) must be addressed (0 required, 1 recommended), 1 suggestions

Risk Assessment

Factor Level Notes
Complexity Low Based on lines changed
Security Impact None Based on security findings
Scope Coherence Good Based on structural review

Findings Summary

  • Medium: 1 issue(s)
  • Low: 1 issue(s)

Generated by Auto Claude PR Review

Findings (2 selected of 2 total)

🟡 [aae83ab0a0a8] [MEDIUM] PR claims completeness but leaves ~20+ hardcoded strings

📁 apps/frontend/src/renderer/components/TaskCreationWizard.tsx:0

The PR description states it 'removes all hardcoded user-facing strings from the TaskCreationWizard component', but multiple reviewers found approximately 20+ hardcoded strings still present. The 11 strings that WERE converted are correct and follow existing patterns, but the remaining untranslated strings include: footer buttons ('Cancel', 'Create Task', 'Creating...', 'Browse Files', 'Hide Files'), classification section labels ('Category', 'Priority', 'Complexity', 'Impact' and their placeholders), review requirement section text, Git options section labels, image success message, and error messages. Either complete the i18n conversion or update the PR description to accurately reflect the partial scope.

Suggested fix:

Option 1: Complete the i18n conversion by adding translation keys for all remaining hardcoded strings (~20+ strings). Option 2: Update the PR description to accurately state 'Converts 11 specific strings to i18n' rather than claiming to remove 'all' hardcoded strings.

🔵 [59fdd1180aa6] [LOW] Gemini Code Assist asterisk concern is a false positive

📁 apps/frontend/src/renderer/components/TaskCreationWizard.tsx:762

Gemini flagged the hardcoded asterisk * for required fields as problematic for i18n. This is a FALSE POSITIVE. The asterisk is a universal symbol for required fields used consistently across 8+ components in this codebase (AddFeatureDialog, TaskEditDialog, ProfileEditDialog, etc.) with the exact same pattern: <span className="text-destructive">*</span>. The asterisk is recognized globally and does not need translation. Proper accessibility is already implemented via aria-required="true" on the input elements.

Suggested fix:

No fix needed. The asterisk is intentionally hardcoded as part of the established UI pattern. Dismiss the Gemini comment.

This review was generated by Auto Claude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants