Skip to content

Instantly share code, notes, and snippets.

@bill350
Last active March 22, 2019 19:41
Show Gist options
  • Save bill350/43961c32a604a747ccb82e399a4d22d7 to your computer and use it in GitHub Desktop.
Save bill350/43961c32a604a747ccb82e399a4d22d7 to your computer and use it in GitHub Desktop.
#!/bin/bash
if which $PODS_ROOT/SwiftGen/bin/swiftgen >/dev/null; then
SRCDIR="$PROJECT_DIR/$TARGET_NAME"
$PODS_ROOT/SwiftGen/bin/swiftgen strings "$SRCDIR/Resources/Base.lproj/Localizable.strings" --output "$SRCDIR/Code/Constants/SwiftGen/Strings.swift" --templatePath "$PROJECT_DIR/../../Resources/Localization/localize-flat-swift4.stencil"
$PROJECT_DIR/../../scripts/L10nPlurals.swift --input "$PROJECT_DIR/Localization/Resources" --output "$PROJECT_DIR/Localization/Code/L10nPlurals.swift" -public
else
echo "warning: SwiftGen not installed, download it from https://github.com/AliSoftware/SwiftGen"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment