You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement Text component localization support (#82)
* Refactor core HTML protocols and builders to Markup
- Rename HTML protocol to Markup for Swift API Design Guidelines compliance
- Rename HTMLBuilder to MarkupBuilder with updated documentation
- Rename HTMLString to MarkupString for consistency
- Update AnyHTML to AnyMarkup with proper type erasure
- Rename HTMLClassContainer to MarkupClassContainer
- Rename HTMLContentBuilder to MarkupContentBuilder
- Update all documentation to use 'markup' terminology
- Rename AttributeBuilder.renderTag to buildMarkupTag for clarity
- Move files from HTML/ directory to Markup/ directory
* Complete HTML to Markup refactoring across entire codebase
- Update all 85+ Swift files to use Markup instead of HTML types
- Replace HTMLBuilder with MarkupBuilder throughout codebase
- Update all protocol conformances and type annotations
- Replace renderTag with buildMarkupTag method name
- Update documentation to use 'markup' and 'stylesheet' terminology
- Maintain backward compatibility for actual HTML tag output
- All tests passing after comprehensive refactor
* Expand abbreviations and improve method names per Swift API Design Guidelines
- CSS → StyleSheet: sanitizedForCSS() → sanitizedForStyleSheet()
- URL → WebAddress: baseURL → baseWebAddress throughout APIs
- XML → ExtensibleMarkupLanguageDocument: generateXML() → generateExtensibleMarkupLanguageDocument()
- Improve method clarity: getData() → retrieveStructuredDataDictionary()
- Improve method clarity: toJSON() → convertToJsonString()
- Boolean properties to assertions: generateSitemap → shouldGenerateSitemap
- Boolean properties to assertions: generateRobotsTxt → shouldGenerateRobotsTxt
- Add backward compatibility aliases with deprecation warnings
- Update all references across codebase and tests
- All 367 tests passing with new method names
* Improve parameter labels for better call-site clarity
- AttributeBuilder.buildAttributes: Add clear parameter labels (identifier, styleSheetClasses, ariaRole, etc.)
- StyleOperation: Add alternative methods with clearer labels (using, with configuration)
- Input component: Improve event handler parameter label clarity
- Add backward compatibility overloads to maintain existing API
- All 254 tests passing with improved parameter clarity
- Complete Swift API Design Guidelines compliance
* Implement Text component localization support
Add comprehensive localization infrastructure for the Text component following SwiftUI patterns:
- LocalizationKey: Supports string literals, interpolation, and table-based organization
- LocalizationManager: Centralized singleton for managing locale and resolution
- Foundation & Bundle resolvers: NSLocalizedString integration with custom bundle support
- Text component enhancements:
- Automatic localization key detection (snake_case, dot.notation patterns)
- Explicit localization support via LocalizationKey parameter
- Backward compatibility maintained for existing string initializers
- Comprehensive test coverage: 20 passing tests covering all functionality
Resolves#76: Text localization now works like SwiftUI with automatic key resolution
0 commit comments