refactor: extract Android & iOS UI strings to resource files - #9
Merged
Conversation
Move hardcoded user-facing copy out of Compose screens and SwiftUI views into localization resources, with consistent namespaced keys across both platforms. Android: ~190 keys in res/values/strings.xml, referenced via stringResource(R.string.*); interpolated text converted to positional format strings. EchoTab labels moved to @stringres labelRes. iOS: new Localizable.xcstrings String Catalog (217 keys) reusing the same keys; C-style format specifiers. Auto-included via Xcode 16 fileSystemSynchronizedGroups (no project.pbxproj changes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extracts all hardcoded user-facing UI copy out of Compose screens and SwiftUI views into proper string resource files, with consistent namespaced keys shared across both platforms.
Android —
composeApp/src/androidMain/res/values/strings.xmlhome_*,decks_*,deck_detail_*,deck_editor_*,edit_card_*,study_*,discover_*,paste_*,publish_*,onboarding_*,profile_*,friend_profile_*,settings_*,component_*,nav_*).stringResource(R.string.…); interpolated text became positional format strings (e.g.%1$d of %2$d done · keep going!).EchoTabenum labels moved fromStringto@StringRes labelRes: Int, resolved at the composable call site.iOS —
iosApp/iosApp/Localizable.xcstrings(new String Catalog, 217 keys)%lld/%@).LocalizedStringKey; parameterized strings useString(format: NSLocalizedString(...)).project.pbxprojedits needed — the project uses Xcode 16fileSystemSynchronizedGroups, so the catalog iniosApp/iosApp/is auto-included.Verification
:composeApp:compileDebugKotlinpasses.Notes / follow-ups
decks_empty_subtitle,deck_detail_delete_dialog_title,deck_detail_delete_dialog_message. Unify if desired.deck_editor_saving,deck_editor_title_placeholder_untitled,deck_editor_card_new,component_stats_bar_cards,common_coming_soon.DeckEditorView(ternary modifiers bound to only one branch → empty-card label was unstyled); now anif/elsein aGroup.testTag/accessibilityIdentifier,#Previewmock data, log strings, pubky URIs, decorative emoji glyphs, dynamic variables.🤖 Generated with Claude Code