CI: update usage of crowdin client

This commit is contained in:
Alexey Sokolov
2025-03-15 08:08:42 +00:00
parent 2aeac2f4bb
commit 0524b9aa27
+3 -5
View File
@@ -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'
}