-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1beec5e
commit 401507c
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
phraseapp: | ||
project_id: becaaad32db57a68fa6a9cc7e84cd684 | ||
file_format: strings | ||
push: | ||
sources: | ||
- file: Stripe/Resources/Localizations/en.lproj/Localizable.strings | ||
params: | ||
locale_id: de84834fe809e8f3f90a5e2239ac3711 | ||
update_translations: true | ||
convert_emoji: true | ||
pull: | ||
targets: | ||
- file: Stripe/Resources/Localizations/<locale_code>.lproj/Localizable.strings | ||
params: | ||
file_format: strings | ||
convert_emoji: true | ||
encoding: UTF-8 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
phraseapp pull -t `fetch-password PhraseApp-access-token` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
echo "Generating strings files..." | ||
find Stripe -name \*.m | xargs genstrings -s STPLocalizedString -o Stripe/Resources/Localizations/en.lproj | ||
|
||
if [[ $? -eq 0 ]]; then | ||
|
||
if [[ -z $(which recode) ]]; then | ||
if [[ -z $(which brew) ]]; then | ||
echo "Please install homebrew or the recode command line tool" | ||
exit 1 | ||
else | ||
brew install recode | ||
fi | ||
|
||
if [[ $? -eq 0 ]]; then | ||
|
||
echo "Converting to utf8..." | ||
# Genstrings outputs in utf16 but we want to store in utf8 | ||
recode utf16..utf8 Stripe/Resources/Localizations/en.lproj/Localizable.strings | ||
|
||
if [[ -z $(which phraseapp) ]]; then | ||
if [[ -z $(which brew) ]]; then | ||
echo "Please install homebrew/phraseapp cli client" | ||
exit 1 | ||
else | ||
echo "Installing phraseapp via homebrew..." | ||
brew tap phrase/brewed | ||
brew install phraseapp | ||
fi | ||
fi | ||
|
||
echo "Uploading to Phrase..." | ||
phraseapp push -t `fetch-password PhraseApp-access-token` | ||
|
||
else | ||
echo "Error recoding into utf8" | ||
fi | ||
else | ||
echo "Error occured generating english strings file." | ||
fi |