Fix create PR gh helper i18n (vibe-kanban) (#1290)

* Perfect! I've successfully fixed all i18n issues for the Create PR GitHub helper. Here's a summary of what was completed:

## Summary

All i18n issues have been resolved! The `check-i18n.sh` script now passes with flying colors.

### Changes Made:

1. **Added translation keys to tasks.json** (all 4 languages: en, ja, ko, es):
   - `createPrDialog.title`: "Create GitHub Pull Request"
   - `createPrDialog.description`: Dialog description
   - `createPrDialog.titleLabel`, `titlePlaceholder`: PR title field
   - `createPrDialog.descriptionLabel`, `descriptionPlaceholder`: PR description field
   - `createPrDialog.baseBranchLabel`: Base branch selector
   - `createPrDialog.loadingBranches`, `selectBaseBranch`: Branch loading states
   - `createPrDialog.creating`, `createButton`: Submit button states
   - `createPrDialog.errors.*`: All error messages (insufficientPermissions, repoNotFoundOrNoAccess, failedToCreate)

2. **Updated CreatePRDialog.tsx**:
   - Changed `useTranslation()` to `useTranslation('tasks')` to specify namespace
   - Replaced all 14 hardcoded strings with `t('createPrDialog.*')` translation calls
   - Used `t('common:buttons.cancel')` for the cancel button

3. **Added integrations.github.cliSetup keys to settings.json** (all 4 languages):
   - Created new `integrations` namespace at root level
   - Added all GitHub CLI setup keys that were previously only in `settings.general.github`
   - This ensures the keys exist at both paths for backward compatibility

### Test Results:

 **No new literal strings introduced** - Actually removed 6 hardcoded strings!
 **No duplicate JSON keys found**
 **Translation keys are consistent across all locales** (en, ja, ko, es)

The implementation properly handles all error cases, dialog fields, and button states with proper i18n support across all 4 supported languages.

* Cleanup script changes for task attempt 30cf60d2-f2bc-443a-9c72-28b94962f155
This commit is contained in:
Alex Netsch
2025-11-14 17:24:23 +00:00
committed by Louis Knight-Webb
parent 1ff0395cdc
commit e1f69e2a9d
9 changed files with 227 additions and 21 deletions

View File

@@ -103,6 +103,22 @@
"closeButton": "Cerrar"
},
"createPrDialog": {
"title": "Crear Pull Request de GitHub",
"description": "Crea un pull request para este intento de tarea en GitHub.",
"titleLabel": "Título",
"titlePlaceholder": "Ingresar título del PR",
"descriptionLabel": "Descripción (opcional)",
"descriptionPlaceholder": "Ingresar descripción del PR",
"baseBranchLabel": "Rama Base",
"loadingBranches": "Cargando ramas...",
"selectBaseBranch": "Seleccionar rama base",
"creating": "Creando...",
"createButton": "Crear PR",
"errors": {
"insufficientPermissions": "Permisos insuficientes. Por favor asegúrate de que la CLI de GitHub tenga los permisos necesarios.",
"repoNotFoundOrNoAccess": "Repositorio no encontrado o sin acceso. Por favor verifica el acceso al repositorio y asegúrate de estar autenticado.",
"failedToCreate": "Error al crear PR de GitHub"
},
"loginRequired": {
"title": "Inicia sesión para crear un pull request",
"description": "Debes iniciar sesión antes de poder abrir un pull request para esta tarea. Te llevaremos a la página de inicio de sesión.",