forked from zaproxy/community-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload files to Crowdin on release and manually
Change release process to upload the files to Crowdin as part of the add-on release. Add workflow to trigger the upload of the files, to allow to start to translate the files before the actual release. Signed-off-by: thc202 <[email protected]>
- Loading branch information
Showing
4 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Crowdin Upload Files | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
upload: | ||
name: Upload Files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- name: Upload Files | ||
env: | ||
CROWDIN_AUTH_TOKEN: ${{ secrets.ZAPBOT_CROWDIN_TOKEN }} | ||
run: ./gradlew crowdinUploadSourceFiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
projects: | ||
- id: 9301 | ||
sources: | ||
- dir: "src/main/resources/org/zaproxy/zap/extension/%addOnId%/resources" | ||
crowdinPath: | ||
dir: "/addons/%addOnId%" | ||
filename: "%file_pathname%" | ||
exportPattern: | ||
dir: "/zaproxy/addons/%addOnId%" | ||
filename: "%file_name%_%locale_with_underscore%%file_extension%" | ||
includes: | ||
- pattern: "Messages.properties" | ||
type: "properties" | ||
|
||
- id: 32705 | ||
sources: | ||
- dir: "src/main/javahelp/org/zaproxy/zap/extension/%addOnId%/resources/help" | ||
outputDir: "src/main/javahelp/org/zaproxy/zap/extension/%addOnId%/resources" | ||
crowdinPath: | ||
dir: "/addons/%addOnId%" | ||
filename: "%file_pathname%" | ||
exportPattern: | ||
dir: "/zaproxy/addons/%addOnId%" | ||
filename: "help_%locale_with_underscore%/%file_pathname%" | ||
includes: | ||
- pattern: "contents/***.html" | ||
- pattern: "helpset.hs" | ||
crowdinPathFilename: "%file_name%.xml" | ||
exportPatternFilename: "help_%locale_with_underscore%/%file_name%_%locale_with_underscore%%file_extension%" | ||
translatableElements: | ||
- "/helpset/title" | ||
- "/helpset/presentation/title" | ||
- "/helpset/view/label" | ||
- pattern: "toc.xml" | ||
translatableElements: | ||
# Crowdin doesn't support descendant axis | ||
# "/toc/descendant::tocitem[@text]" | ||
# Define manually some: | ||
- "/toc/tocitem[@text]" | ||
- "/toc/tocitem/tocitem[@text]" | ||
- "/toc/tocitem/tocitem/tocitem[@text]" | ||
- "/toc/tocitem/tocitem/tocitem/tocitem[@text]" | ||
- "/toc/tocitem/tocitem/tocitem/tocitem/tocitem[@text]" | ||
- pattern: "index.xml" | ||
translatableElements: | ||
- "/index/indexitem[@text]" |