Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions apps/frontend/src/renderer/components/TaskCreationWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,11 @@ export function TaskCreationWizard({
>
<DialogHeader>
<div className="flex items-center justify-between">
<DialogTitle className="text-foreground">Create New Task</DialogTitle>
<DialogTitle className="text-foreground">{t('creation.title')}</DialogTitle>
{isDraftRestored && (
<div className="flex items-center gap-2">
<span className="text-xs bg-info/10 text-info px-2 py-1 rounded-md">
Draft restored
{t('creation.draftRestored')}
</span>
<Button
variant="ghost"
Expand All @@ -745,22 +745,21 @@ export function TaskCreationWizard({
onClick={handleDiscardDraft}
>
<RotateCcw className="h-3 w-3 mr-1" />
Start Fresh
{t('creation.startFresh')}
</Button>
</div>
)}
</div>
<DialogDescription>
Describe what you want to build. The AI will analyze your request and
create a detailed specification.
{t('creation.dialogDescription')}
</DialogDescription>
</DialogHeader>

<div className="space-y-5 py-4">
{/* Description (Primary - Required) */}
<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>

</Label>
{/* Wrap textarea for file @mentions */}
<div className="relative">
Expand Down Expand Up @@ -795,7 +794,7 @@ export function TaskCreationWizard({
<Textarea
ref={descriptionRef}
id="description"
placeholder="Describe the feature, bug fix, or improvement you want to implement. Be as specific as possible about requirements, constraints, and expected behavior. Type @ to reference files."
placeholder={t('creation.descriptionPlaceholder')}
value={description}
onChange={handleDescriptionChange}
onPaste={handlePaste}
Expand Down Expand Up @@ -825,7 +824,7 @@ export function TaskCreationWizard({
)}
</div>
<p id="description-help" className="text-xs text-muted-foreground">
Files and images can be copy/pasted or dragged & dropped into the description.
{t('creation.descriptionHelp')}
</p>

{/* Image Thumbnails - displayed inline below description */}
Expand Down Expand Up @@ -875,17 +874,17 @@ export function TaskCreationWizard({
{/* Title (Optional - Auto-generated if empty) */}
<div className="space-y-2">
<Label htmlFor="title" className="text-sm font-medium text-foreground">
Task Title <span className="text-muted-foreground font-normal">(optional)</span>
{t('creation.titleLabel')} <span className="text-muted-foreground font-normal">{t('creation.titleOptional')}</span>
</Label>
<Input
id="title"
placeholder="Leave empty to auto-generate from description"
placeholder={t('creation.titlePlaceholder')}
value={title}
onChange={(e) => setTitle(e.target.value)}
disabled={isCreating}
/>
<p className="text-xs text-muted-foreground">
A short, descriptive title will be generated automatically if left empty.
{t('creation.titleHelp')}
</p>
</div>

Expand Down Expand Up @@ -928,7 +927,7 @@ export function TaskCreationWizard({
aria-expanded={showAdvanced}
aria-controls="advanced-options-section"
>
<span>Classification (optional)</span>
<span>{t('creation.classificationOptional')}</span>
{showAdvanced ? (
<ChevronUp className="h-4 w-4" />
) : (
Expand Down
13 changes: 12 additions & 1 deletion apps/frontend/src/shared/i18n/locales/en/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,18 @@
"creation": {
"title": "Create New Task",
"description": "Describe what you want to build",
"placeholder": "Describe your task..."
"placeholder": "Describe your task...",
"dialogDescription": "Describe what you want to build. The AI will analyze your request and create a detailed specification.",
"descriptionLabel": "Description",
"descriptionPlaceholder": "Describe the feature, bug fix, or improvement you want to implement. Be as specific as possible about requirements, constraints, and expected behavior. Type @ to reference files.",
"descriptionHelp": "Files and images can be copy/pasted or dragged & dropped into the description.",
"titleLabel": "Task Title",
"titleOptional": "(optional)",
"titlePlaceholder": "Leave empty to auto-generate from description",
"titleHelp": "A short, descriptive title will be generated automatically if left empty.",
"draftRestored": "Draft restored",
"startFresh": "Start Fresh",
"classificationOptional": "Classification (optional)"
},
"empty": {
"title": "No tasks yet",
Expand Down
13 changes: 12 additions & 1 deletion apps/frontend/src/shared/i18n/locales/fr/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,18 @@
"creation": {
"title": "Créer une nouvelle tâche",
"description": "Décrivez ce que vous voulez construire",
"placeholder": "Décrivez votre tâche..."
"placeholder": "Décrivez votre tâche...",
"dialogDescription": "Décrivez ce que vous voulez construire. L'IA analysera votre demande et créera une spécification détaillée.",
"descriptionLabel": "Description",
"descriptionPlaceholder": "Décrivez la fonctionnalité, la correction de bug ou l'amélioration que vous souhaitez implémenter. Soyez aussi précis que possible sur les exigences, les contraintes et le comportement attendu. Tapez @ pour référencer des fichiers.",
"descriptionHelp": "Les fichiers et images peuvent être copiés-collés ou glissés-déposés dans la description.",
"titleLabel": "Titre de la tâche",
"titleOptional": "(facultatif)",
"titlePlaceholder": "Laisser vide pour générer automatiquement à partir de la description",
"titleHelp": "Un titre court et descriptif sera généré automatiquement si laissé vide.",
"draftRestored": "Brouillon restauré",
"startFresh": "Recommencer",
"classificationOptional": "Classification (facultatif)"
},
"empty": {
"title": "Aucune tâche",
Expand Down
Loading