Created
April 28, 2015 19:28
-
-
Save mr-fixit/edf6dd517a57d17d250d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# given a spreadsheet, create a Localizable.strings file for a given language | |
cat localized.csv | | |
while IFS=',' read devConst devValue englishValue spanishValue; do | |
if [[ $devValue ]]; then | |
devConst=`echo "$devConst" | tr -d '/* '` | |
# key=`echo $devValue | cut -d " = " -f 1 | tr -d '"'` | |
key=`echo $devValue | cut -d "=" -f 1 | sed -e 's/\"//g' | sed -e 's/ $//'` | |
echo "/* $devConst */" | |
echo \"$key\" = \"$spanishValue\"\; | |
echo | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment