mirror of
https://github.com/znc/znc.git
synced 2026-08-09 10:23:14 +02:00
CI: update usage of crowdin client
This commit is contained in:
@@ -48,14 +48,12 @@ timestamps {
|
||||
// sh "$crowdin_cli upload translations --branch ${upstream_branch} ${crowdin_cli_suffix}"
|
||||
sh "$crowdin_cli download --branch ${upstream_branch} ${crowdin_cli_suffix}"
|
||||
}
|
||||
}
|
||||
sh 'LANG=C.UTF-8 find . -name "*.po" -exec msgfilter -i "{}" -o "{}.replacement" .ci/cleanup-po.pl ";"'
|
||||
sh 'find . -name "*.po" -exec mv "{}.replacement" "{}" ";"'
|
||||
withCredentials([string(credentialsId: 'fe727e3e-a8e0-4019-817f-6583c3c51ef7', variable: 'CROWDIN_API2_KEY')]) {
|
||||
def headers = [[maskValue: true, name: 'Authorization', value: "Bearer ${env.CROWDIN_API2_KEY}"], [maskValue: false, name: 'User-Agent', value: 'https://github.com/znc/znc/blob/master/.ci/Jenkinsfile.crowdin']]
|
||||
def headers = [[maskValue: true, name: 'Authorization', value: "Bearer ${env.CROWDIN_API_KEY}"], [maskValue: false, name: 'User-Agent', value: 'https://github.com/znc/znc/blob/master/.ci/Jenkinsfile.crowdin']]
|
||||
def contributors = httpRequest consoleLogResponseBody: true, customHeaders: headers, url: "https://crowdin.com/api/v2/projects/289533/members?limit=500"
|
||||
writeFile file: 'contributors.tmp', text: contributors.content
|
||||
}
|
||||
sh 'LANG=C.UTF-8 find . -name "*.po" -exec msgfilter -i "{}" -o "{}.replacement" .ci/cleanup-po.pl ";"'
|
||||
sh 'find . -name "*.po" -exec mv "{}.replacement" "{}" ";"'
|
||||
sh '.ci/crowdin-contributors.py < contributors.tmp'
|
||||
sh 'rm contributors.tmp'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user