Context-aware routing to the Anytype iOS localization system. Use when working with .xcstrings files, Loc constants, hardcoded strings, or user-facing text.
Context-aware routing to the Anytype iOS localization system. Helps you navigate the 3-file .xcstrings structure and use Loc constants correctly.
.xcstrings filesLoc constantsLoc constantsen), Crowdin handles othersmake generate after editing .xcstrings filesrg "yourSearchTerm" Modules/Loc/Sources/Loc/Generated/Strings.swiftmake generateAnytypeText(Loc.yourKey, style: .uxCalloutMedium)Is this text for authentication/login/vault?
YES β Auth.xcstrings (86 keys)
NO β Continue
Is this text for spaces/objects/collaboration?
YES β Workspace.xcstrings (493 keys)
NO β Continue
Is this text for settings/widgets/general UI?
YES β UI.xcstrings (667 keys)
Modules/Loc/Sources/Loc/Resources/Auth.xcstringsModules/Loc/Sources/Loc/Resources/Workspace.xcstringsModules/Loc/Sources/Loc/Resources/UI.xcstringsGenerated output: All 3 files β single Strings.swift (~5,000 lines, 1,246 total keys)
"Your localization key" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Your English text here"
}
}
}
}
Key naming:
"No properties yet" β
"No properties yet. Add some." β"QR.join.title" β Loc.Qr.Join.title// String: "You've reached the limit of %lld editors"
Loc.SpaceLimit.Editors.title(4)
// String: "Welcome, %@!"
Loc.welcomeMessage("John")
String(format: Loc.limitReached, 10) // DON'T DO THIS
Why: SwiftGen auto-generates parameterized functions for format specifiers (%lld, %d, %@).
Format specifiers:
%lld β Int parameter%d β Int parameter%@ β String parameter%.1f β Double parameterrg "keyName" --type swiftmake generate// β WRONG
Text("Delete")
// β
CORRECT
Text(Loc.delete)
// In Auth.xcstrings
"Settings" : { ... }
// In UI.xcstrings
"Settings" : { ... } // β DUPLICATE! Breaks generation
// β WRONG
String(format: Loc.limitReached, 10)
// β
CORRECT
Loc.limitReached(10)
// β WRONG - Crowdin will overwrite
"de" : { "value" : "Meine Γbersetzung" }
// β
CORRECT - Only edit English
"en" : { "value" : "My translation" }
Full Guide: Anytype/Sources/PresentationLayer/Common/LOCALIZATION_GUIDE.md
For comprehensive coverage of:
rg in Strings.swift)en)make generateLoc.yourKeyIOS_DEVELOPMENT_GUIDE.md - Never use hardcoded stringsCODE_GENERATION_GUIDE.md - Understanding make generateNavigation: This is a smart router. For deep details, always refer to LOCALIZATION_GUIDE.md.