### Install BartyCrouch via Homebrew Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Use this command to install BartyCrouch for the first time using Homebrew. ```bash brew install bartycrouch ``` -------------------------------- ### Setup Secrets for Translation Tests Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Copy the sample secrets file to create the actual secrets file needed for translation tests to run. This is a shell command. ```shell cp Tests/BartyCrouchTranslatorTests/Secrets/secrets.json.sample Tests/BartyCrouchTranslatorTests/Secrets/secrets.json ``` -------------------------------- ### Complete BartyCrouch Configuration Source: https://context7.com/flinedev/bartycrouch/llms.txt A comprehensive example of the .bartycrouch.toml file covering all available update and linting options. ```toml [update] tasks = ["interfaces", "code", "transform", "translate", "normalize"] [update.interfaces] paths = ["App/Sources"] subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] defaultToBase = false ignoreEmptyStrings = false unstripped = false ignoreKeys = ["#bartycrouch-ignore!", "#bc-ignore!", "#i!"] [update.code] codePaths = ["App/Sources"] subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] localizablePaths = ["App/Supporting Files"] defaultToKeys = false additive = true customFunction = "LocalizedStringResource" customLocalizableName = "Localizable" unstripped = false plistArguments = true ignoreKeys = ["#bartycrouch-ignore!", "#bc-ignore!", "#i!"] overrideComments = false [update.transform] codePaths = ["App/Sources"] subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] localizablePaths = ["App/Supporting Files"] transformer = "foundation" supportedLanguageEnumPath = "App/Supporting Files" typeName = "BartyCrouch" translateMethodName = "translate" separateWithEmptyLine = true [update.translate] paths = ["App/Supporting Files"] subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] translator = "microsoftTranslator" secret = "" sourceLocale = "en" separateWithEmptyLine = true [update.normalize] paths = ["App/Supporting Files"] subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] sourceLocale = "en" harmonizeWithSource = true sortByKeys = true separateWithEmptyLine = true [lint] paths = ["App/Supporting Files"] subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] duplicateKeys = true emptyValues = true ``` -------------------------------- ### Install BartyCrouch via Mint Source: https://context7.com/flinedev/bartycrouch/llms.txt Install or update BartyCrouch using the Swift Package Manager-based Mint installer. ```bash # Install or update to latest version mint install FlineDev/BartyCrouch ``` -------------------------------- ### Install BartyCrouch via Mint Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Use this command to install or update BartyCrouch to the latest version using Mint. ```bash mint install FlineDev/BartyCrouch ``` -------------------------------- ### Install BartyCrouch via Homebrew Source: https://context7.com/flinedev/bartycrouch/llms.txt Use Homebrew to install or upgrade the BartyCrouch command-line tool on macOS. ```bash # Install BartyCrouch brew install bartycrouch # Update to latest version brew upgrade bartycrouch ``` -------------------------------- ### AppIntents Code with Localized Strings Source: https://github.com/flinedev/bartycrouch/blob/main/README.md This is an example of AppIntents code where strings are implicitly localized. To use BartyCrouch, these strings need to be explicitly marked. ```swift struct ExportAllTransactionsIntent: AppIntent { static var title: LocalizedStringResource = "Export all transactions" static var description = IntentDescription("Exports your transaction history as CSV data.") } ``` -------------------------------- ### Xcode Build Script for BartyCrouch Integration Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Add this script to your Xcode target's Build Phases to automatically run BartyCrouch for updating and linting strings files on each build. It checks if BartyCrouch is installed and provides a warning if not. ```shell export PATH="$PATH:/opt/homebrew/bin" if which bartycrouch > /dev/null; then bartycrouch update -x bartycrouch lint -x else echo "warning: BartyCrouch not installed, download it from https://github.com/FlineDev/BartyCrouch" fi ``` -------------------------------- ### Update BartyCrouch via Homebrew Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Use this command to update an existing BartyCrouch installation to the latest version via Homebrew. ```bash brew upgrade bartycrouch ``` -------------------------------- ### Initialize BartyCrouch Configuration Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Run this command in your project's root directory to create the default .bartycrouch.toml configuration file. ```bash bartycrouch init ``` -------------------------------- ### Configure `interfaces` Task Options Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Customize the `interfaces` task by setting options such as `paths` for Storyboard/XIB files, `subpathsToIgnore`, and flags like `defaultToBase` or `ignoreEmptyStrings`. ```toml # Options for `interfaces` task paths = ["./Resources/Storyboards", "./Resources/XIBs"] subpathsToIgnore = ["Vendor", "Tests"] defaultToBase = true ignoreEmptyStrings = false unstripped = false ignoreKeys = ["SKIP_TRANSLATION"] ``` -------------------------------- ### Extract Strings from Interface Builder Source: https://context7.com/flinedev/bartycrouch/llms.txt Configure and run the interfaces task to sync Storyboard/XIB content with .strings files. ```bash # Configure in .bartycrouch.toml: # [update] # tasks = ["interfaces"] # # [update.interfaces] # paths = ["App/Sources"] # defaultToBase = true # ignoreEmptyStrings = true # Run the update bartycrouch update # Example Storyboard with localizable content: # Main.storyboard contains: # - UILabel with text "Welcome" # - UIButton with title "Continue" # # Generated en.lproj/Main.strings: # /* Class = "UILabel"; text = "Welcome"; ObjectID = "abc-12-xyz"; */ # "abc-12-xyz.text" = "Welcome"; # # /* Class = "UIButton"; normalTitle = "Continue"; ObjectID = "def-34-uvw"; */ # "def-34-uvw.normalTitle" = "Continue"; ``` -------------------------------- ### Configure `normalize` Task Options Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Customize the `normalize` task for sorting and cleaning `.strings` files. Options include `paths`, `sourceLocale` for harmonization, and flags like `harmonizeWithSource` and `sortByKeys`. ```toml # Options for `normalize` task paths = ["./Resources/Localization"] subpathsToIgnore = ["Vendor", "Tests"] sourceLocale = "en" harmonizeWithSource = true sortByKeys = true separateWithEmptyLine = true ``` -------------------------------- ### Transform Translation Calls to SwiftGen Syntax Source: https://context7.com/flinedev/bartycrouch/llms.txt Demonstrates the conversion of manual translation calls into generated SwiftGen constants. ```swift // Before transformation: title = BartyCrouch.translate( key: "onboarding.first-page.header-title", translations: [.english: "Welcome!"] ) // After transformation with swiftgenStructured: title = L10n.Onboarding.FirstPage.headerTitle // The key "onboarding.first-page.header-title" follows SwiftGen naming: // - Dots (.) create nested structures // - Hyphens (-) are converted to camelCase ``` -------------------------------- ### Configure `transform` Task Options Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Set up the `transform` task for replacing method calls with translation logic. Specify `codePaths`, `transformer` type (e.g., `foundation` or `swiftgenStructured`), and paths for `SupportedLanguage` enum and translation methods. ```toml # Options for `transform` task codePaths = ["./Sources"] subpathsToIgnore = ["Vendor", "Tests"] localizablePaths = ["./Resources/Localization"] transformer = "foundation" supportedLanguageEnumPath = "./Sources/App/SupportedLanguage.swift" typeName = "App.Localization" translateMethodName = "translate" customLocalizableName = "CustomLocalizable.strings" separateWithEmptyLine = false ``` -------------------------------- ### Configure `code` Task Options Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Configure the `code` task to update `Localizable.strings` from code. Options include `codePaths`, `localizablePaths`, and custom settings like `customFunction` or `plistArguments` for large projects. ```toml # Options for `code` task codePaths = ["./Sources"] subpathsToIgnore = ["Vendor", "Tests"] localizablePaths = ["./Resources/Localization"] defaultToKeys = false additive = false customFunction = "MyLocalizedString" customLocalizableName = "CustomLocalizable.strings" unstripped = false plistArguments = "./Localization.plist" ignoreKeys = ["SKIP_TRANSLATION"] overrideComments = false ``` -------------------------------- ### Configure SwiftLint Linter Source: https://github.com/flinedev/bartycrouch/blob/main/CHANGELOG.md Integrates and configures the SwiftLint linter, fixing all reported warnings and errors. ```swift # No code example provided, only configuration mentioned. ``` -------------------------------- ### Run Update Command Source: https://context7.com/flinedev/bartycrouch/llms.txt Execute the update command to synchronize strings files, with various flags for verbosity and output control. ```bash # Run update with default configuration bartycrouch update # Run with verbose output bartycrouch update -v # Run with Xcode-compatible warning/error output bartycrouch update -x # Run from a different directory bartycrouch update -p /path/to/project # Run with all options combined bartycrouch update -v -x -w -p /path/to/project # Expected output: # ✓ Incrementally updated 'App/Supporting Files/en.lproj/Main.strings'. # ✓ Incrementally updated 'App/Supporting Files/de.lproj/Main.strings'. # ✓ Incrementally updated 'App/Supporting Files/en.lproj/Localizable.strings'. # ✓ Added 3 new keys to 'App/Supporting Files/de.lproj/Localizable.strings'. # ✓ Normalized 'App/Supporting Files/en.lproj/Localizable.strings'. ``` -------------------------------- ### Configure `update` Subcommand Tasks Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Specify which tasks the `update` subcommand should execute by listing them in the `tasks` array within the `[update]` section of your configuration file. ```toml [update] tasks = ["interfaces", "code", "transform", "normalize"] ``` -------------------------------- ### BartyCrouch CLI Usage Source: https://github.com/flinedev/bartycrouch/blob/main/README.md This section describes the general usage of the BartyCrouch CLI, including prerequisites and available sub-commands. ```APIDOC ## BartyCrouch CLI Usage Before using BartyCrouch, ensure your code is committed. It is also recommended to use the build script method. ### Sub-commands - **`update`**: Updates your `.strings` file contents based on your configuration. - **`lint`**: Checks your `.strings` file for empty values and duplicate keys. ### Command Line Options - **`-v`, `--verbose`**: Enables verbose output, printing more detailed information. - **`-x`, `--xcode-output`**: Formats warnings and errors to be compatible with Xcode. - **`-w`, `--fail-on-warnings`**: Causes the command to return a failed status code if any warnings are detected. - **`-p`, `--path`**: Specifies an alternative directory from which to run BartyCrouch. ``` -------------------------------- ### BartyCrouch CLI Global Options Source: https://context7.com/flinedev/bartycrouch/llms.txt Reference for global command-line options available for all BartyCrouch commands. ```APIDOC ## CLI Global Options ### Description Global flags that can be applied to commands like `update` or `lint` to modify output behavior or execution context. ### Parameters - **-v, --verbose** (flag) - Optional - Enables detailed output information. - **-x, --xcode-output** (flag) - Optional - Formats warnings and errors for the Xcode Issue Navigator. - **-w, --fail-on-warnings** (flag) - Optional - Exits with a non-zero status if warnings are detected. - **-p, --path** (string) - Optional - Specifies a custom directory path to run the command from. ### Usage Example ```bash bartycrouch update -v -x -p /path/to/project bartycrouch lint -x -w ``` ``` -------------------------------- ### Configure .bartycrouch.toml for SwiftGen Source: https://context7.com/flinedev/bartycrouch/llms.txt Define the update tasks and transformer settings to enable SwiftGen structured output. ```toml [update] tasks = ["transform", "normalize"] [update.transform] codePaths = ["App/Sources"] localizablePaths = ["App/Supporting Files"] transformer = "swiftgenStructured" supportedLanguageEnumPath = "App/Supporting Files" typeName = "BartyCrouch" translateMethodName = "translate" ``` -------------------------------- ### BartyCrouch Command Line Options Source: https://context7.com/flinedev/bartycrouch/llms.txt Reference for global CLI flags used to control output verbosity, Xcode integration, linting behavior, and file paths. ```bash # Verbose output - shows detailed information bartycrouch update -v bartycrouch update --verbose # Xcode output - formats warnings/errors for Xcode Issue Navigator bartycrouch update -x bartycrouch update --xcode-output # Fail on warnings - exit with non-zero status if warnings found bartycrouch lint -w bartycrouch lint --fail-on-warnings # Custom path - run from a different directory bartycrouch update -p /path/to/project bartycrouch update --path /path/to/project # Combine multiple options bartycrouch update -v -x -p /path/to/project bartycrouch lint -x -w # Version information bartycrouch --version # Output: bartycrouch version 4.15.0 ``` -------------------------------- ### Add Support for Multi-line Comments Source: https://github.com/flinedev/bartycrouch/blob/main/CHANGELOG.md Enhances the tool to support multi-line comments when processing localization strings. ```bash # No code example provided, only feature mentioned. ``` -------------------------------- ### Configure `translate` Task Options Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Configure the `translate` task to update missing translations using external APIs. Specify `paths`, `translator` service (e.g., `microsoftTranslator` or `deepL`), authentication `secret`, and `sourceLocale`. ```toml # Options for `translate` task paths = ["./Resources/Localization"] subpathsToIgnore = ["Vendor", "Tests"] translator = "microsoftTranslator" secret = "YOUR_TRANSLATOR_SECRET" sourceLocale = "en" separateWithEmptyLine = true ``` -------------------------------- ### Add Custom Localizable Name Option Source: https://github.com/flinedev/bartycrouch/blob/main/CHANGELOG.md Introduces the `--custom-localizable-name` option for the `code` subcommand, allowing for custom naming of localizable files. ```bash # No code example provided, only option name mentioned. ``` -------------------------------- ### Normalize Code Files with BartyCrouch Source: https://github.com/flinedev/bartycrouch/blob/main/CHANGELOG.md Use the `normalize` subcommand to manage localization keys in your code files. Options include handling duplicate keys, empty values, ensuring key consistency across languages, and sorting keys. ```bash bartycrouch normalize -p "/path/to/code/files" -l en -d -w -h -s ``` -------------------------------- ### Lint Strings Files with BartyCrouch Source: https://context7.com/flinedev/bartycrouch/llms.txt Analyze strings files for duplicate keys or empty values using various CLI flags. ```bash # Run lint with default configuration bartycrouch lint # Run lint with Xcode-compatible output (for build scripts) bartycrouch lint -x # Run lint and fail on warnings (for CI/CD) bartycrouch lint -w # Combined for CI usage bartycrouch lint -x -w # Expected output on issues: # warning: Found empty value for key 'welcome.message' in 'de.lproj/Localizable.strings'. # warning: Found duplicate key 'button.title' in 'en.lproj/Localizable.strings'. # # BartyCrouch lint finished with 2 warnings. ``` -------------------------------- ### Configure Normalization Task for Strings Files Source: https://context7.com/flinedev/bartycrouch/llms.txt Set up the normalize task in BartyCrouch to sort translation keys alphabetically and harmonize all language files with the source locale. This ensures consistency across all localizations. ```bash # Configure in .bartycrouch.toml: # [update] # tasks = ["normalize"] # # [update.normalize] # paths = ["App/Supporting Files"] # sourceLocale = "en" # harmonizeWithSource = true # sortByKeys = true # separateWithEmptyLine = true # Run normalization bartycrouch update ``` -------------------------------- ### Update Interfaces and Translate Subcommands Source: https://github.com/flinedev/bartycrouch/blob/main/CHANGELOG.md Refactors the tool to use subcommands for updating `interfaces` and `translate` instead of options like `-t`. Introduces a new subcommand to update `Localizable.strings` files from code. ```bash # No code example provided, only subcommand structure mentioned. ``` -------------------------------- ### Simplify BartyCrouch build script Source: https://github.com/flinedev/bartycrouch/blob/main/MIGRATION_GUIDES.md Replace multiple individual file translation commands with a single command using the -s option for automatic file search. ```shell bartycrouch -t $CREDS -i "$EN_PATH/Localizable.strings" -a -c bartycrouch -t $CREDS -i "$EN_PATH/Main.strings" -a bartycrouch -t $CREDS -i "$EN_PATH/LaunchScreen.strings" -a bartycrouch -t $CREDS -i "$EN_PATH/CustomView.strings" -a ``` ```shell bartycrouch -t "$CREDS" -s "$PROJECT_DIR" -l en ``` -------------------------------- ### Extract Loc Strings and Sort by Keys Source: https://github.com/flinedev/bartycrouch/blob/main/CHANGELOG.md Adds two new options to the `code` sub-command: `extract-loc-strings` for extracting strings using a newer tool and `sort-by-keys` for sorting translation entries. ```bash # No code example provided, only option names mentioned. ``` -------------------------------- ### Programmatic Translation API Source: https://context7.com/flinedev/bartycrouch/llms.txt Initialize translation services and perform text translation using the BartyCrouchTranslator Swift library. ```swift import BartyCrouchTranslator // Initialize with Microsoft Translator let microsoftTranslator = BartyCrouchTranslator( translationService: .microsoft(subscriptionKey: "your-subscription-key") ) // Initialize with DeepL let deepLTranslator = BartyCrouchTranslator( translationService: .deepL(apiKey: "your-deepl-api-key") ) // Translate text to multiple languages let result = microsoftTranslator.translate( text: "Hello, World!", from: .english, to: [.german, .french, .spanish, .japanese] ) switch result { case .success(let translations): for translation in translations { print("\(translation.language.rawValue): \(translation.translatedText)") } // Output: // de: Hallo, Welt! // fr: Bonjour le monde! // es: ¡Hola, Mundo! // ja: こんにちは、世界! case .failure(let error): print("Translation failed: \(error.localizedDescription)") } // Available Language enum values include: // .english, .german, .french, .spanish, .italian, .portuguese, .dutch, // .polish, .russian, .japanese, .korean, .chineseSimplified, .chineseTraditional, // .arabic, .hindi, .turkish, .swedish, .danish, .norwegian, .finnish, etc. ``` -------------------------------- ### Configure Microsoft Translator for Translation Source: https://context7.com/flinedev/bartycrouch/llms.txt Set up BartyCrouch to use Microsoft Translator for automatic machine translation of missing strings. Ensure your subscription key and source locale are correctly configured. ```toml # .bartycrouch.toml configuration for Microsoft Translator [update] tasks = ["code", "translate", "normalize"] [update.translate] paths = ["App/Supporting Files"] translator = "microsoftTranslator" secret = "your-microsoft-translator-subscription-key" sourceLocale = "en" separateWithEmptyLine = true ``` -------------------------------- ### Translate using BartyCrouch Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Use this method in Swift code to define translation keys and default translations directly. ```swift self.title = BartyCrouch.translate(key: "onboarding.first-page.header-title", translations: [.english: "Welcome!"]) ``` -------------------------------- ### Default BartyCrouch TOML Configuration Source: https://github.com/flinedev/bartycrouch/blob/main/README.md This is the default configuration file for BartyCrouch, covering update tasks for interfaces, code, transformation, and normalization, as well as linting settings. ```toml [update] tasks = ["interfaces", "code", "transform", "normalize"] [update.interfaces] paths = [". ``` ```toml subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] defaultToBase = false ignoreEmptyStrings = false unstripped = false ignoreKeys = ["#bartycrouch-ignore!", "#bc-ignore!", "#i!"] [update.code] codePaths = [". ``` ```toml subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] localizablePaths = [". ``` ```toml defaultToKeys = false additive = true unstripped = false ignoreKeys = ["#bartycrouch-ignore!", "#bc-ignore!", "#i!"] [update.transform] codePaths = [". ``` ```toml subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] localizablePaths = [". ``` ```toml transformer = "foundation" supportedLanguageEnumPath = "." typeName = "BartyCrouch" translateMethodName = "translate" [update.normalize] paths = [". ``` ```toml subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] sourceLocale = "en" harmonizeWithSource = true sortByKeys = true [lint] paths = [". ``` ```toml subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs"] duplicateKeys = true emptyValues = true ``` -------------------------------- ### Automatic Search for Files with Translate Option Source: https://github.com/flinedev/bartycrouch/blob/main/CHANGELOG.md Enables automatic file searching when using the `-t` (translate) option via the `-s` (search) command-line argument. ```bash # No code example provided, only option functionality mentioned. ``` -------------------------------- ### Transform to SwiftGen Structured Source: https://github.com/flinedev/bartycrouch/blob/main/README.md The result of the transform process when the transformer option is set to swiftgenStructured. ```swift self.title = L10n.Onboarding.FirstPage.headerTitle ``` -------------------------------- ### Extract NSLocalizedString from Swift Source Source: https://context7.com/flinedev/bartycrouch/llms.txt Scan source files for localization calls and update Localizable.strings automatically. ```swift // Example Swift code using NSLocalizedString import Foundation class WelcomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // These will be extracted to Localizable.strings titleLabel.text = NSLocalizedString("welcome.title", comment: "Welcome screen title") subtitleLabel.text = NSLocalizedString("welcome.subtitle", comment: "Welcome screen subtitle") // Ignore specific strings using comment marker debugLabel.text = NSLocalizedString("debug.info", comment: "#bc-ignore!") // Using LocalizedStringResource (AppIntents framework) let resource = LocalizedStringResource("Export all transactions", comment: "Export intent title") } } ``` ```bash # Configure in .bartycrouch.toml: # [update] # tasks = ["code"] # # [update.code] # codePaths = ["App/Sources"] # localizablePaths = ["App/Supporting Files"] # customFunction = "LocalizedStringResource" # additive = true # Run the update bartycrouch update # Generated en.lproj/Localizable.strings: # /* Welcome screen title */ # "welcome.title" = ""; # # /* Welcome screen subtitle */ # "welcome.subtitle" = ""; # # /* Export intent title */ # "Export all transactions" = ""; ``` -------------------------------- ### Configure DeepL for Translation Source: https://context7.com/flinedev/bartycrouch/llms.txt Configure BartyCrouch to use the DeepL API for machine translation. This requires your DeepL API key, noting that Free API keys have a specific suffix. ```toml # .bartycrouch.toml configuration for DeepL [update] tasks = ["code", "translate", "normalize"] [update.translate] paths = ["App/Supporting Files"] translator = "deepL" secret = "your-deepl-api-key" # Use key ending with ":fx" for Free API sourceLocale = "en" separateWithEmptyLine = true ``` -------------------------------- ### Explicitly Marking Localized Strings for BartyCrouch Source: https://github.com/flinedev/bartycrouch/blob/main/README.md Modify your AppIntents code to explicitly mark strings using `LocalizedStringResource(_: String, comment: String)` for BartyCrouch to process. Ensure you use the full form of the initializer. ```swift struct ExportAllTransactionsIntent: AppIntent { static var title = LocalizedStringResource("Export all transactions", comment: "") static var description = IntentDescription(LocalizedStringResource("Exports your transaction history as CSV data.", comment: "")) } ``` -------------------------------- ### BartyCrouch TOML Translation Configuration Source: https://github.com/flinedev/bartycrouch/blob/main/README.md This TOML snippet configures the `translate` task for BartyCrouch, specifying the Microsoft Translator API, paths, source locale, and requiring a secret API key. ```toml [update.translate] paths = "." translator = "microsoftTranslator" secret = "<#Subscription Key#>" sourceLocale = "en" ``` -------------------------------- ### Integrate BartyCrouch into Xcode Build Script Source: https://context7.com/flinedev/bartycrouch/llms.txt Add a run script phase to your Xcode project to automate BartyCrouch tasks on every build. This ensures your localization files are updated and linted automatically. ```bash export PATH="$PATH:/opt/homebrew/bin" if which bartycrouch > /dev/null; then bartycrouch update -x bartycrouch lint -x else echo "warning: BartyCrouch not installed, download it from https://github.com/FlineDev/BartyCrouch" fi ``` -------------------------------- ### Transform to Foundation NSLocalizedString Source: https://github.com/flinedev/bartycrouch/blob/main/README.md The result of the transform process when the transformer option is set to foundation. ```swift self.title = NSLocalizedString("onboarding.first-page.header-title", comment: "") ``` -------------------------------- ### Exclude Strings from Interface Builder Source: https://context7.com/flinedev/bartycrouch/llms.txt Apply ignore markers directly to text values or within the Identity Inspector's comment field for Storyboards and XIBs. ```xml