XcstringsGenerator class

Generates iOS String Catalog (.xcstrings) files from analyzed annotations.

Collects all localizable strings from IntentInfo, EntityInfo, EnumInfo, and AppShortcutInfo, then produces a .xcstrings JSON file with optional translations from a YAML file.

Constructors

XcstringsGenerator({String sourceLanguage = 'en'})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceLanguage String
The source language code for the String Catalog (e.g., "en").
final

Methods

collectLocalizableStrings(AnalyzeResult result) Set<String>
Collects all localizable strings from an AnalyzeResult.
convertPlaceholders(String text) String
Converts {paramName} placeholders to %@ format for .xcstrings values.
generate({required AnalyzeResult analyzeResult, Map<String, Map<String, String>> translations = const {}, String? existingXcstringsPath}) String
Generates a .xcstrings JSON string.
loadTranslations(String yamlPath) Map<String, Map<String, String>>
Loads translations from a YAML file.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited