From 0524b9aa27774dd6f39ebb855958e036e7ded183 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 15 Mar 2025 08:08:42 +0000 Subject: [PATCH] CI: update usage of crowdin client --- .ci/Jenkinsfile.crowdin | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.ci/Jenkinsfile.crowdin b/.ci/Jenkinsfile.crowdin index a1b7e97b..8885f57b 100644 --- a/.ci/Jenkinsfile.crowdin +++ b/.ci/Jenkinsfile.crowdin @@ -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' }