diff --git a/frontend/src/components/dialogs/tasks/CreatePRDialog.tsx b/frontend/src/components/dialogs/tasks/CreatePRDialog.tsx index 6c80b8bc..c0f6316f 100644 --- a/frontend/src/components/dialogs/tasks/CreatePRDialog.tsx +++ b/frontend/src/components/dialogs/tasks/CreatePRDialog.tsx @@ -39,7 +39,7 @@ import type { GhCliSetupError } from 'shared/types'; import { useUserSystem } from '@/components/config-provider'; const CreatePrDialog = NiceModal.create(() => { const modal = useModal(); - const { t } = useTranslation(); + const { t } = useTranslation('tasks'); const { isLoaded } = useAuth(); const { environment } = useUserSystem(); const data = modal.args as @@ -188,19 +188,15 @@ const CreatePrDialog = NiceModal.create(() => { return; } case GitHubServiceError.INSUFFICIENT_PERMISSIONS: - setError( - 'Insufficient permissions. Please ensure the GitHub CLI has the necessary permissions.' - ); + setError(t('createPrDialog.errors.insufficientPermissions')); setGhCliHelp(null); return; case GitHubServiceError.REPO_NOT_FOUND_OR_NO_ACCESS: - setError( - 'Repository not found or no access. Please check your repository access and ensure you are authenticated.' - ); + setError(t('createPrDialog.errors.repoNotFoundOrNoAccess')); setGhCliHelp(null); return; default: - setError(result.message || 'Failed to create GitHub PR'); + setError(result.message || t('createPrDialog.errors.failedToCreate')); setGhCliHelp(null); return; } @@ -210,7 +206,7 @@ const CreatePrDialog = NiceModal.create(() => { setError(result.message); setGhCliHelp(null); } else { - setError('Failed to create GitHub PR'); + setError(t('createPrDialog.errors.failedToCreate')); setGhCliHelp(null); } }, [data, prBaseBranch, prBody, prTitle, modal, isMacEnvironment]); @@ -231,9 +227,9 @@ const CreatePrDialog = NiceModal.create(() => { handleCancelCreatePR()}> - Create GitHub Pull Request + {t('createPrDialog.title')} - Create a pull request for this task attempt on GitHub. + {t('createPrDialog.description')} {!isLoaded ? ( @@ -243,34 +239,40 @@ const CreatePrDialog = NiceModal.create(() => { ) : (
- + setPrTitle(e.target.value)} - placeholder="Enter PR title" + placeholder={t('createPrDialog.titlePlaceholder')} />
- +