You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
opt: update translation guide
migrate to Crowdin
This commit is contained in:
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: View existing translations
|
||||||
|
url: https://crowdin.com/project/TA_utl
|
||||||
|
about: You can modify existing translations in Crowdin.
|
||||||
38
.github/ISSUE_TEMPLATE/language_request.yml
vendored
Normal file
38
.github/ISSUE_TEMPLATE/language_request.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Language request
|
||||||
|
description: Request a language to be added in WebUI
|
||||||
|
title: "New language request: "
|
||||||
|
labels: []
|
||||||
|
body:
|
||||||
|
- type: input
|
||||||
|
id: langauge
|
||||||
|
attributes:
|
||||||
|
label: Langauge
|
||||||
|
placeholder: English
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: region
|
||||||
|
attributes:
|
||||||
|
label: Region (Optional)
|
||||||
|
placeholder: United States
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
id: confirmation
|
||||||
|
attributes:
|
||||||
|
label: Confirmations
|
||||||
|
description: Make sure check the latest canary version to see if the language is already available before submitting issue.
|
||||||
|
options:
|
||||||
|
- label: This language is not already available in WebUI
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: optional
|
||||||
|
attributes:
|
||||||
|
label: Upload translated file (optional)
|
||||||
|
description: Upload translated file based on template.xml if you have translated it
|
||||||
|
placeholder: translate the template in module/webui/locales/template.xml (optional)
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -24,10 +24,28 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
|
- name: Update translation template
|
||||||
|
run: |
|
||||||
|
# Translation template
|
||||||
|
cp -f module/webui/locales/strings/en.xml module/webui/locales/template.xml
|
||||||
|
|
||||||
|
# Commit if found changes
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
# Force push translation template if changed
|
||||||
|
if git status --porcelain | grep 'module/webui/locales/template.xml'; then
|
||||||
|
git add module/webui/locales/template.xml
|
||||||
|
git commit --amend --no-edit
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Update dependency
|
- name: Update dependency
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
|
# marked.js
|
||||||
curl -Ls https://cdn.jsdelivr.net/npm/marked/marked.min.js > module/webui/scripts/assets/marked.min.js
|
curl -Ls https://cdn.jsdelivr.net/npm/marked/marked.min.js > module/webui/scripts/assets/marked.min.js
|
||||||
|
|
||||||
|
# OpenSSL
|
||||||
wget -q $(curl -Ls https://api.github.com/repos/KOWX712/openssl-static-build/releases/latest | jq -r '.assets[].browser_download_url') -O openssl.tar.gz
|
wget -q $(curl -Ls https://api.github.com/repos/KOWX712/openssl-static-build/releases/latest | jq -r '.assets[].browser_download_url') -O openssl.tar.gz
|
||||||
tar -xzf openssl.tar.gz
|
tar -xzf openssl.tar.gz
|
||||||
mv openssl-arm64 module/bin/arm64-v8a/openssl
|
mv openssl-arm64 module/bin/arm64-v8a/openssl
|
||||||
@@ -50,7 +68,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Push all commits
|
# Push all commits
|
||||||
git push
|
git push --force
|
||||||
|
|
||||||
- name: Extract Module Info
|
- name: Extract Module Info
|
||||||
id: extract_info
|
id: extract_info
|
||||||
|
|||||||
@@ -2,24 +2,11 @@
|
|||||||
|
|
||||||
## Update Existing Language
|
## Update Existing Language
|
||||||
|
|
||||||
1. [Fork this repository](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/fork).
|
- Update translation in [Crowdin](https://crowdin.com/project/TA_utl).
|
||||||
2. Find your language string file in `module/webui/locales/strings`.
|
|
||||||
3. Edit the string value that translated incorrectly or add missing translation field.
|
|
||||||
4. Make a Pull Request.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Add a New Language
|
## Add a New Language
|
||||||
|
|
||||||
### Simple
|
- Create you translation based on [template](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/main/module/webui/locales/template.xml).
|
||||||
|
- Create an [issues](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/issues/new/choose) for language request and upload translated file.
|
||||||
- Contact me in Telegram to add a new translation langauge.
|
|
||||||
|
|
||||||
### Advanced
|
|
||||||
|
|
||||||
1. [Fork this repository](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/fork).
|
|
||||||
2. Copy `module/webui/locales/template.xml` to strings folder.
|
|
||||||
3. Rename it to `language_code.xml` or `language_code-REGION_CODE.xml`, e.g., `en.xml` or `zh-CN.xml`.
|
|
||||||
4. Translate the string value inside.
|
|
||||||
5. Add the language to `module/webui/locales/languages.json`, this step is necessary for displaying your language in WebUI.
|
|
||||||
6. Make a Pull Request.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user