Smartling exposes a simple REST API that’s fairly easy to adopt. Some differences from the old approach: - We get UTF-8 back instead of UTF-16, so there’s no need to use iconv. - We don’t support “nb_NO”, so we don’t need to remove it each time we fetch translations. - We get back English fallbacks for .stringsdict files, so there’s no need to merge them manually ourselves. - We no longer support country-specific locales *and* the root language, so we don’t need to merge, for example, “es” into “es-MX”. - We handle language mapping & duplication inside the Swift script, which will hopefully be more reliable than cp’ing directories.
39 lines
525 B
Bash
Executable File
39 lines
525 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -x
|
|
set -e
|
|
|
|
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
REPO_ROOT=$BIN_DIR/../..
|
|
cd $REPO_ROOT
|
|
|
|
cat <<EOS
|
|
|
|
Begin Pushing translation source
|
|
################################
|
|
|
|
EOS
|
|
|
|
$BIN_DIR/push-translation-source
|
|
$BIN_DIR/push-metadata-source
|
|
|
|
cat <<EOS
|
|
|
|
Done Pushing translation source
|
|
###############################
|
|
Begin Pulling translations
|
|
|
|
EOS
|
|
|
|
$BIN_DIR/pull-metadata-translations
|
|
$BIN_DIR/pull-translations
|
|
|
|
cat <<EOS
|
|
|
|
Done Pulling translations
|
|
#########################
|
|
|
|
EOS
|
|
|
|
|