fix: replace hardcoded UI strings with i18n translation keys
Address review findings by converting hardcoded user-facing strings
to react-i18next translation keys in roadmap feature components.
Changes:
- Add 'goToTask', 'convertToTask', 'build' keys to roadmap section
in both en/common.json and fr/common.json
- Replace hardcoded "Go to Task" with t('roadmap.goToTask')
- Replace hardcoded "Convert to Auto-Build Task" with t('roadmap.convertToTask')
- Replace hardcoded "Build" with t('roadmap.build')
Files modified:
- FeatureDetailPanel.tsx: 2 hardcoded strings replaced
- FeatureCard.tsx: 2 hardcoded strings replaced
- en/common.json: 3 new translation keys added
- fr/common.json: 3 new French translations added
Resolves i18n violations identified in PR #1817 review.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,7 @@ export function FeatureCard({
|
||||
}}
|
||||
>
|
||||
<ExternalLink className="h-3 w-3 mr-1" />
|
||||
Go to Task
|
||||
{t('roadmap.goToTask')}
|
||||
</Button>
|
||||
) : (
|
||||
feature.status !== 'done' && (
|
||||
@@ -86,7 +86,7 @@ export function FeatureCard({
|
||||
}}
|
||||
>
|
||||
<Play className="h-3 w-3 mr-1" />
|
||||
Build
|
||||
{t('roadmap.build')}
|
||||
</Button>
|
||||
)
|
||||
)}
|
||||
|
||||
@@ -247,7 +247,7 @@ export function FeatureDetailPanel({
|
||||
<div className="shrink-0 p-4 border-t border-border space-y-2">
|
||||
<Button className="w-full" onClick={() => onGoToTask(feature.linkedSpecId!)}>
|
||||
<ExternalLink className="h-4 w-4 mr-2" />
|
||||
Go to Task
|
||||
{t('roadmap.goToTask')}
|
||||
</Button>
|
||||
{archiveButton}
|
||||
</div>
|
||||
@@ -263,7 +263,7 @@ export function FeatureDetailPanel({
|
||||
<div className="shrink-0 p-4 border-t border-border">
|
||||
<Button className="w-full" onClick={() => onConvertToSpec(feature)}>
|
||||
<Zap className="h-4 w-4 mr-2" />
|
||||
Convert to Auto-Build Task
|
||||
{t('roadmap.convertToTask')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -606,7 +606,10 @@
|
||||
"showLessFeatures": "Show less",
|
||||
"archiveFeature": "Archive",
|
||||
"archiveFeatureConfirmTitle": "Archive Feature?",
|
||||
"archiveFeatureConfirmDescription": "This will remove \"{{title}}\" from your roadmap."
|
||||
"archiveFeatureConfirmDescription": "This will remove \"{{title}}\" from your roadmap.",
|
||||
"goToTask": "Go to Task",
|
||||
"convertToTask": "Convert to Auto-Build Task",
|
||||
"build": "Build"
|
||||
},
|
||||
"roadmapGeneration": {
|
||||
"progress": "Progress",
|
||||
|
||||
@@ -606,7 +606,10 @@
|
||||
"showLessFeatures": "Afficher moins",
|
||||
"archiveFeature": "Archiver",
|
||||
"archiveFeatureConfirmTitle": "Archiver la fonctionnalité ?",
|
||||
"archiveFeatureConfirmDescription": "Cela supprimera \"{{title}}\" de votre feuille de route."
|
||||
"archiveFeatureConfirmDescription": "Cela supprimera \"{{title}}\" de votre feuille de route.",
|
||||
"goToTask": "Aller à la tâche",
|
||||
"convertToTask": "Convertir en tâche Auto-Build",
|
||||
"build": "Construire"
|
||||
},
|
||||
"roadmapGeneration": {
|
||||
"progress": "Progression",
|
||||
|
||||
Reference in New Issue
Block a user