File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change 85
85
- test
86
86
- deploy_gh_pages
87
87
- deploy_npm
88
+ sync_translations :
89
+ << : *defaults
90
+ steps :
91
+ - run :
92
+ name : Sync Translations
93
+ command : |
94
+ echo "Starting translation sync"
95
+ set -ev
96
+ git checkout develop
97
+ # update translations, and test any updated messages
98
+ npm run translate
99
+ npm run translate:update
100
+ npm run test:messages
101
+ # stage any changes in the msg directory
102
+ git add ./msg
103
+ if git diff --cached --exit-code --quiet; then
104
+ echo "Nothing to commit."
105
+ else
106
+ git commit -m 'Update translations from Transifex [skip ci]'
107
+ # add remote, make sure that API token doesn't end up in the log
108
+ git remote add origin-translation \
109
+ https://${GH_TOKEN}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git \
110
+ > /dev/null 2>&1
111
+ git push --set-upstream origin-translation develop
112
+ fi
88
113
workflows :
89
114
version : 2
90
115
default :
@@ -93,4 +118,16 @@ workflows:
93
118
context :
94
119
- dockerhub-credentials
95
120
- scratch-npm-creds
96
- # TODO: another job to replace i18n/sync_translations.sh
121
+ sync_translations :
122
+ triggers :
123
+ - schedule :
124
+ cron : 0 0 * * 1 # weekly on Monday
125
+ filters :
126
+ branches :
127
+ only :
128
+ - develop
129
+ jobs :
130
+ - sync_translations :
131
+ context :
132
+ - dockerhub-credentials
133
+ - scratch-npm-creds
You can’t perform that action at this time.
0 commit comments