Files
honeyDueKMP/TODO-string-localization.md
Trey t 1e2adf7660 Rebrand from Casera/MyCrib to honeyDue
Total rebrand across KMM project:
- Kotlin package: com.example.casera -> com.tt.honeyDue (dirs + declarations)
- Gradle: rootProject.name, namespace, applicationId
- Android: manifest, strings.xml (all languages), widget resources
- iOS: pbxproj bundle IDs, Info.plist, entitlements, xcconfig
- iOS directories: Casera/ -> HoneyDue/, CaseraTests/ -> HoneyDueTests/, etc.
- Swift source: all class/struct/enum renames
- Deep links: casera:// -> honeydue://, .casera -> .honeydue
- App icons replaced with honeyDue honeycomb icon
- Domains: casera.treytartt.com -> honeyDue.treytartt.com
- Bundle IDs: com.tt.casera -> com.tt.honeyDue
- Database table names preserved

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 06:33:57 -06:00

4.2 KiB

String Localization Migration TODO

This file tracks the remaining work to migrate hardcoded strings to Compose Resources (composeApp/src/commonMain/composeResources/values/strings.xml).

Completed

High Priority Files (Done)

  • DocumentFormScreen.kt - 48 strings migrated
  • AddTaskDialog.kt - 28 strings migrated

Remaining Work

Priority 1: Dialogs with Many Strings

AddContractorDialog.kt (~25 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/AddContractorDialog.kt

Strings to migrate:

  • Dialog title: "Add Contractor"
  • Field labels: Name *, Company, Phone, Email, Specialty, Notes, Website, Address
  • Validation errors: "Name is required"
  • Buttons: "Create", "Cancel"

CompleteTaskDialog.kt (~22 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/CompleteTaskDialog.kt

Strings to migrate:

  • Dialog title: "Complete Task"
  • Field labels: Notes, Actual Cost, Completion Date
  • Photo section: "Photos", "Camera", "Gallery", "Remove"
  • Buttons: "Complete", "Cancel"
  • Validation messages

Priority 2: Import/Share Dialogs (~14 strings)

ContractorImportDialog.kt (~7 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ContractorImportDialog.kt

ResidenceImportDialog.kt (~7 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ResidenceImportDialog.kt

Priority 3: Task Components (~14 strings)

TaskActionButtons.kt (~7 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/task/TaskActionButtons.kt

TaskCard.kt (~7 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/task/TaskCard.kt

Priority 4: Other Dialogs (~10 strings)

JoinResidenceDialog.kt (~7 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/JoinResidenceDialog.kt

ManageUsersDialog.kt (~2 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ManageUsersDialog.kt

TaskTemplatesBrowserSheet.kt (~3 strings)

Location: composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/TaskTemplatesBrowserSheet.kt

Priority 5: Smaller Components (~15 strings total)

Files with 1-3 hardcoded strings each:

  • InfoCard.kt
  • FeatureComparisonDialog.kt
  • ThemePickerDialog.kt
  • StandardCard.kt
  • CompactCard.kt
  • ApiResultHandler.kt
  • DocumentCard.kt
  • DocumentStates.kt
  • CompletionHistorySheet.kt
  • DocumentDetailScreen.kt
  • EditTaskScreen.kt
  • MainScreen.kt
  • UpgradePromptDialog.kt
  • VerifyEmailScreen.kt
  • VerifyResetCodeScreen.kt
  • UpgradeFeatureScreen.kt
  • ResidenceFormScreen.kt

How to Migrate Strings

1. Add import to the file:

import honeydue.composeapp.generated.resources.*
import org.jetbrains.compose.resources.stringResource

2. Add string to strings.xml:

<string name="component_field_label">Field Label</string>

3. Replace hardcoded string:

// Before
Text("Field Label")

// After
Text(stringResource(Res.string.component_field_label))

4. For strings with parameters:

<string name="items_count">%1$d items</string>
Text(stringResource(Res.string.items_count, count))

5. For strings used in onClick handlers:

Define outside the lambda (stringResource is @Composable):

val errorMessage = stringResource(Res.string.error_message)

Button(onClick = {
    // Use errorMessage here
    showError = errorMessage
})

Naming Convention

Use this pattern for string names:

  • {component}_{field} - e.g., contractor_name_label
  • {component}_{action} - e.g., contractor_create
  • {component}_{error} - e.g., contractor_name_error

Existing prefixes in strings.xml:

  • auth_ - Authentication screens
  • properties_ - Residence/property screens
  • tasks_ - Task screens and components
  • contractors_ - Contractor screens
  • documents_ - Document screens
  • profile_ - Profile screens
  • common_ - Shared strings (Cancel, OK, Back, etc.)

Testing

After migrating strings, run:

./gradlew :composeApp:compileDebugKotlinAndroid

Build should complete successfully with only deprecation warnings.