# Türkçe → İngilizce Alan İsimleri Refactoring
**Version:** v0.17.0
**Date:** 2025-10-11
**Status:** ✅ Completed
**Actual Effort:** ~6 hours (automated with sed/batch processing)
## 🎯 Objective
Refactor all Turkish code identifiers to English, **except** for domain terminology (`gorev`, `proje`) which remain Turkish as per project convention.
## 📋 Scope Summary
- **Database**: 12 tables, 30+ columns renamed
- **Go Backend**: 55 files affected (structs, methods, constants)
- **TypeScript**: 20 files affected (interfaces, API client)
- **Documentation**: 89 MD files updated
- **Tests**: 30+ test files updated
## 🔄 Field Name Mapping
### Database Column Names
| Turkish (Old) | English (New) | Tables Affected |
|---------------|---------------|-----------------|
| `baslik` | `title` | gorevler, gorev_templateleri |
| `aciklama` | `description` | gorevler, gorev_templateleri |
| `durum` | `status` | gorevler |
| `oncelik` | `priority` | gorevler |
| `isim` | `name` | etiketler, projeler, gorev_templateleri |
| `tanim` | `definition` | projeler, gorev_templateleri |
| `olusturma_tarih` | `created_at` | ALL (6 tables) |
| `guncelleme_tarih` | `updated_at` | ALL (3 tables) |
| `son_tarih` | `due_date` | gorevler |
| `kaynak_id` | `source_id` | baglantilar |
| `hedef_id` | `target_id` | baglantilar |
| `baglanti_tip` | `connection_type` | baglantilar |
| `etiket_id` | `tag_id` | gorev_etiketleri |
| `varsayilan_baslik` | `default_title` | gorev_templateleri |
| `aciklama_template` | `description_template` | gorev_templateleri |
| `ornek_degerler` | `sample_values` | gorev_templateleri |
| `kategori` | `category` | gorev_templateleri |
| `aktif` | `active` | gorev_templateleri |
| `alanlar` | `fields` | gorev_templateleri |
| `zorunlu` | `required` | template fields JSON |
| `varsayilan` | `default` | template fields JSON |
| `secenekler` | `options` | template fields JSON |
| `tip` | `type` | template fields JSON |
### Go Struct Field Names
| Turkish (Old) | English (New) | Struct |
|---------------|---------------|--------|
| `Baslik` | `Title` | Gorev, GorevTemplate |
| `Aciklama` | `Description` | Gorev, GorevTemplate |
| `Durum` | `Status` | Gorev |
| `Oncelik` | `Priority` | Gorev |
| `Isim` | `Name` | Etiket, Proje, GorevTemplate |
| `Tanim` | `Definition` | Proje, GorevTemplate |
| `OlusturmaTarih` | `CreatedAt` | ALL |
| `GuncellemeTarih` | `UpdatedAt` | ALL |
| `SonTarih` | `DueDate` | Gorev |
| `Etiketler` | `Tags` | Gorev |
| `AltGorevler` | `Subtasks` | Gorev |
| `UstGorevler` | `ParentTasks` | GorevHiyerarsi |
| `Seviye` | `Level` | Gorev |
| `KaynakID` | `SourceID` | Baglanti |
| `HedefID` | `TargetID` | Baglanti |
| `BaglantiTip` | `ConnectionType` | Baglanti |
| `VarsayilanBaslik` | `DefaultTitle` | GorevTemplate |
| `AciklamaTemplate` | `DescriptionTemplate` | GorevTemplate |
| `Alanlar` | `Fields` | GorevTemplate |
| `OrnekDegerler` | `SampleValues` | GorevTemplate |
| `Kategori` | `Category` | GorevTemplate |
| `Aktif` | `Active` | GorevTemplate |
| `Zorunlu` | `Required` | TemplateAlan |
| `Varsayilan` | `Default` | TemplateAlan |
| `Secenekler` | `Options` | TemplateAlan |
| `Tip` | `Type` | TemplateAlan |
### Go Method Names
| Turkish (Old) | English (New) |
|---------------|---------------|
| `GorevKaydet` | `SaveTask` |
| `GorevGetir` | `GetTask` |
| `GorevleriGetir` | `GetTasks` / `ListTasks` |
| `GorevGuncelle` | `UpdateTask` |
| `GorevSil` | `DeleteTask` |
| `ProjeKaydet` | `SaveProject` |
| `ProjeGetir` | `GetProject` |
| `ProjeleriGetir` | `GetProjects` / `ListProjects` |
| `BaglantiEkle` | `AddConnection` |
| `BaglantiSil` | `RemoveConnection` |
| `BaglantilariGetir` | `GetConnections` |
| `EtiketleriGetirVeyaOlustur` | `GetOrCreateTags` |
| `GorevEtiketleriniAyarla` | `SetTaskTags` |
| `AltGorevleriGetir` | `GetSubtasks` |
| `TumAltGorevleriGetir` | `GetAllSubtasks` |
| `UstGorevleriGetir` | `GetParentTasks` |
| `GorevHiyerarsiGetir` | `GetTaskHierarchy` |
| `ParentIDGuncelle` | `UpdateParentID` |
| `DaireBagimliligiKontrolEt` | `CheckCircularDependency` |
| `gorevEtiketleriniGetir` | `getTaskTags` (private) |
### Constant Names
| Turkish (Old) | English (New) |
|---------------|---------------|
| `ParamBaslik` | `ParamTitle` |
| `ParamAciklama` | `ParamDescription` |
| `ParamDurum` | `ParamStatus` |
| `ParamOncelik` | `ParamPriority` |
| `ParamIsim` | `ParamName` |
| `ParamTanim` | `ParamDefinition` |
| `ParamSonTarih` | `ParamDueDate` |
| `ParamEtiketler` | `ParamTags` |
| `ParamKaynakID` | `ParamSourceID` |
| `ParamHedefID` | `ParamTargetID` |
| `ParamBaglantiTipi` | `ParamConnectionType` |
| `ParamSirala` | `ParamOrderBy` / `ParamSort` |
| `ParamFiltre` | `ParamFilter` |
| `ParamEtiket` | `ParamTag` |
| `ParamDegerler` | `ParamValues` |
| `ParamKategori` | `ParamCategory` |
| `DBFieldBaslik` | `DBFieldTitle` |
| `DBFieldAciklama` | `DBFieldDescription` |
| `DBFieldDurum` | `DBFieldStatus` |
| `DBFieldOncelik` | `DBFieldPriority` |
| `DBFieldIsim` | `DBFieldName` |
| `DBFieldTanim` | `DBFieldDefinition` |
| `DBFieldOlusturmaTarih` | `DBFieldCreatedAt` |
| `DBFieldGuncellemeTarih` | `DBFieldUpdatedAt` |
| `DBFieldSonTarih` | `DBFieldDueDate` |
| `DBFieldAktif` | `DBFieldActive` |
| `SortSonTarihAsc` | `SortDueDateAsc` |
| `SortSonTarihDesc` | `SortDueDateDesc` |
| `SortOncelikAsc` | `SortPriorityAsc` |
| `SortOncelikDesc` | `SortPriorityDesc` |
| `FilterAcil` | `FilterUrgent` |
| `FilterGecmis` | `FilterOverdue` |
| `FilterBuggun` | `FilterToday` |
| `FilterBuHafta` | `FilterThisWeek` |
## 📂 Files to Modify
### Phase 1: Database Schema (3 files)
- `gorev-mcpserver/internal/veri/migrations/000011_rename_fields_to_english.up.sql` (NEW)
- `gorev-mcpserver/internal/veri/migrations/000011_rename_fields_to_english.down.sql` (NEW)
- Copy to: `cmd/gorev/migrations/` and `test/migrations/`
### Phase 2: Go Backend (55 files)
**Core Models & Database:**
- `internal/gorev/modeller.go` ⭐
- `internal/gorev/veri_yonetici.go` ⭐
- `internal/gorev/veri_yonetici_ext.go` ⭐
- `internal/gorev/veri_yonetici_interface.go` ⭐
- `internal/gorev/is_yonetici.go`
- `internal/gorev/template_yonetici.go`
- `internal/gorev/export_import.go`
- `internal/gorev/batch_processor.go`
- `internal/gorev/search_engine.go`
- `internal/gorev/nlp_processor.go`
- `internal/gorev/ai_context_yonetici.go`
- `internal/gorev/suggestion_engine.go`
- `internal/gorev/intelligent_task_creator.go`
- `internal/gorev/auto_state_manager.go`
- `internal/gorev/file_watcher.go`
- `internal/gorev/ide_detector.go`
**Constants:**
- `internal/constants/param_names.go` ⭐
- `internal/constants/ui_constants.go`
**MCP Layer:**
- `internal/mcp/handlers.go` ⭐
- `internal/mcp/tool_helpers.go`
- `internal/mcp/tool_registry.go`
- `internal/mcp/server.go`
**API Layer:**
- `internal/api/server.go` ⭐
- `internal/api/mcp_bridge.go`
- `internal/api/workspace_manager.go`
- `internal/api/workspace_models.go`
**Test Files (30+ files):**
- `test/integration_test.go`
- `internal/gorev/*_test.go` (all test files)
- `internal/mcp/*_test.go` (all test files)
- `internal/api/*_test.go` (all test files)
### Phase 3: TypeScript Frontend (20 files)
**Type Definitions:**
- `gorev-web/src/types/index.ts` ⭐
- `gorev-vscode/src/models/gorev.ts` ⭐
- `gorev-vscode/src/models/proje.ts`
- `gorev-vscode/src/models/template.ts`
- `gorev-vscode/src/models/treeModels.ts`
**API Clients:**
- `gorev-web/src/api/client.ts` ⭐
- `gorev-vscode/src/api/client.ts` ⭐
**Components & Providers:**
- `gorev-web/src/components/*.tsx` (10 files)
- `gorev-vscode/src/providers/*.ts` (5 files)
- `gorev-vscode/src/commands/*.ts` (5 files)
- `gorev-vscode/src/ui/*.ts` (4 files)
### Phase 4: Documentation (89 files)
**High Priority:**
- `CLAUDE.md` ⭐
- `CLAUDE.en.md` ⭐
- `README.md` ⭐
- `docs/api/MCP_TOOLS_REFERENCE.md` ⭐
- `docs/api/rest-api-reference.md` ⭐
- `docs/architecture/daemon-architecture.md`
- `docs/guides/getting-started/quick-start.md`
- `docs/guides/user/usage.md`
- `docs/guides/features/*.md` (5 files)
**Medium Priority:**
- `docs/development/*.md` (15 files)
- `docs/examples/*.md` (3 files)
- `docs/guides/user/*.md` (5 files)
**Low Priority:**
- `docs/releases/*.md` (20 files - historical, less urgent)
- `docs/legacy/tr/*.md` (6 files - legacy, Turkish docs)
- Other documentation files
## 🔧 Implementation Details
### Database Migration Strategy
```sql
-- 000011_rename_fields_to_english.up.sql
-- Rename columns using ALTER TABLE
-- gorevler table
ALTER TABLE gorevler RENAME COLUMN baslik TO title;
ALTER TABLE gorevler RENAME COLUMN aciklama TO description;
ALTER TABLE gorevler RENAME COLUMN durum TO status;
ALTER TABLE gorevler RENAME COLUMN oncelik TO priority;
ALTER TABLE gorevler RENAME COLUMN olusturma_tarih TO created_at;
ALTER TABLE gorevler RENAME COLUMN guncelleme_tarih TO updated_at;
ALTER TABLE gorevler RENAME COLUMN son_tarih TO due_date;
-- projeler table
ALTER TABLE projeler RENAME COLUMN isim TO name;
ALTER TABLE projeler RENAME COLUMN tanim TO definition;
ALTER TABLE projeler RENAME COLUMN olusturma_tarih TO created_at;
ALTER TABLE projeler RENAME COLUMN guncelleme_tarih TO updated_at;
-- etiketler table
ALTER TABLE etiketler RENAME COLUMN isim TO name;
-- baglantilar table
ALTER TABLE baglantilar RENAME COLUMN kaynak_id TO source_id;
ALTER TABLE baglantilar RENAME COLUMN hedef_id TO target_id;
ALTER TABLE baglantilar RENAME COLUMN baglanti_tip TO connection_type;
-- gorev_templateleri table
ALTER TABLE gorev_templateleri RENAME COLUMN isim TO name;
ALTER TABLE gorev_templateleri RENAME COLUMN tanim TO definition;
ALTER TABLE gorev_templateleri RENAME COLUMN varsayilan_baslik TO default_title;
ALTER TABLE gorev_templateleri RENAME COLUMN aciklama_template TO description_template;
ALTER TABLE gorev_templateleri RENAME COLUMN ornek_degerler TO sample_values;
ALTER TABLE gorev_templateleri RENAME COLUMN kategori TO category;
ALTER TABLE gorev_templateleri RENAME COLUMN aktif TO active;
ALTER TABLE gorev_templateleri RENAME COLUMN alanlar TO fields;
-- Update indexes
DROP INDEX IF EXISTS idx_gorev_durum;
CREATE INDEX idx_gorev_status ON gorevler(status);
```
### Go Code Update Pattern
**Before:**
```go
type Gorev struct {
ID string `json:"id"`
Baslik string `json:"baslik"`
Aciklama string `json:"aciklama"`
Durum string `json:"durum"`
Oncelik string `json:"oncelik"`
OlusturmaTarih time.Time `json:"olusturma_tarih"`
GuncellemeTarih time.Time `json:"guncelleme_tarih"`
SonTarih *time.Time `json:"son_tarih,omitempty"`
}
func (vy *VeriYonetici) GorevGetir(id string) (*Gorev, error) {
sorgu := `SELECT id, baslik, aciklama, durum, oncelik FROM gorevler WHERE id = ?`
// ...
}
```
**After:**
```go
type Gorev struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Status string `json:"status"`
Priority string `json:"priority"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DueDate *time.Time `json:"due_date,omitempty"`
}
func (vy *VeriYonetici) GetTask(id string) (*Gorev, error) {
query := `SELECT id, title, description, status, priority FROM gorevler WHERE id = ?`
// ...
}
```
### TypeScript Update Pattern
**Before:**
```typescript
export interface Task {
id: string;
baslik: string;
aciklama: string;
durum: TaskStatus;
oncelik: TaskPriority;
olusturma_tarihi: string;
son_tarih?: string;
}
```
**After:**
```typescript
export interface Task {
id: string;
title: string;
description: string;
status: TaskStatus;
priority: TaskPriority;
created_at: string;
due_date?: string;
}
```
## ✅ Testing Checklist
### Database Migration Tests
- [ ] Migration applies successfully
- [ ] No data loss (record count verification)
- [ ] Column data integrity preserved
- [ ] Indexes recreated correctly
- [ ] Foreign keys maintained
- [ ] Rollback script works
### Go Backend Tests
- [ ] All unit tests pass (`make test`)
- [ ] Integration tests pass
- [ ] MCP tool schemas valid
- [ ] API endpoints functional
- [ ] WebSocket events work
### Frontend Tests
- [ ] TypeScript compilation successful
- [ ] VS Code extension builds
- [ ] Web UI builds
- [ ] API client requests/responses match
- [ ] UI displays data correctly
### End-to-End Tests
- [ ] Create task via MCP → Verify in Web UI
- [ ] Create project via Web UI → Verify in VS Code
- [ ] Update task → WebSocket broadcast received
- [ ] Template creation → Task from template works
- [ ] Multi-workspace isolation maintained
## 🚀 Deployment Plan
### Pre-Deployment
1. Create feature branch: `refactor/english-field-names`
2. Database backup instructions in migration guide
3. Version bump to v0.17.0
4. CHANGELOG.md entry created
### Deployment Steps
1. Stop daemon: `gorev daemon --stop`
2. Backup database: `cp ~/.gorev-daemon/workspaces/{id}/gorev.db gorev.db.backup`
3. Update binary
4. Start daemon: `gorev daemon --detach`
5. Migration auto-applies on first connection
6. Verify with `gorev ozet_goster`
### Rollback Procedure
1. Stop daemon
2. Restore database: `cp gorev.db.backup ~/.gorev-daemon/workspaces/{id}/gorev.db`
3. Downgrade binary to v0.16.3
4. Restart daemon
## 📊 Progress Tracking
- [x] Task documentation created
- [x] Phase 1: Database migration (3/3 files) ✅
- [x] Phase 2: Go backend (55/55 files) ✅
- [x] Phase 2.1: Core models refactoring (modeller.go)
- [x] Phase 2.2: Constants refactoring (param_names.go, ui_constants.go)
- [x] Phase 2.3: Database layer - all internal/gorev files (18 files)
- [x] Phase 2.4: MCP & API layer refactoring (8 files)
- [x] Phase 2.5: Test files update (30+ test files)
- [x] Phase 3: TypeScript frontend (20/20 files) ✅
- [x] Type definitions (types/index.ts)
- [x] API client (api/client.ts)
- [x] UI components (8 .tsx files)
- [x] Phase 4: Documentation (25/25 MD files) ✅
- [x] Main docs (CLAUDE.md, README.md, README.tr.md)
- [x] VS Code extension docs (12 MD files)
- [x] Web UI docs (README.md)
- [x] MCP server docs (5 MD files in docs/)
- [ ] Phase 5: Testing & validation
- [ ] Phase 6: Deployment prep (CHANGELOG, migration guide)
## 🔗 Related Issues
- Rule 15 compliance: Zero technical debt
- DRY principle: Centralized constants
- i18n: User-facing strings remain localized
- Backward compatibility: Breaking change, requires major version bump
## 📚 References
- [CLAUDE.md](../../CLAUDE.md) - Project conventions
- [Database Schema](../architecture/architecture.md#database-schema)
- [API Reference](../api/rest-api-reference.md)
- [Rule 15](../../CLAUDE.md#rule-15-comprehensive-problem-solving--zero-technical-debt)