mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Update Actions (#437)
Updates all workflows to try to use the newer actions so we don't get as many deprecation warnings.
This commit is contained in:
commit
7efc5d119f
10
.github/workflows/build.yaml
vendored
10
.github/workflows/build.yaml
vendored
@ -32,10 +32,10 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
# Disable Strong Name Verification to let us pull a switch-a-roo
|
||||
- name: Disable strong name validation
|
||||
@ -54,19 +54,19 @@ jobs:
|
||||
run: rm .\NewHorizons\bin\${{ inputs.build_type }}\NewHorizons.xml
|
||||
|
||||
- name: Upload Mod Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: xen.NewHorizons.${{ inputs.build_type }}
|
||||
path: .\NewHorizons\bin\${{ inputs.build_type }}
|
||||
|
||||
- name: Upload Schemas Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: NewHorizons-Schemas-${{ inputs.build_type }}
|
||||
path: .\NewHorizons\Schemas
|
||||
|
||||
- name: Verify Changed Schemas
|
||||
uses: tj-actions/verify-changed-files@v9.1
|
||||
uses: tj-actions/verify-changed-files@v12
|
||||
id: changed_files
|
||||
with:
|
||||
files: NewHorizons/Schemas/**
|
||||
|
||||
8
.github/workflows/docs_build.yml
vendored
8
.github/workflows/docs_build.yml
vendored
@ -33,18 +33,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: szenius/set-timezone@v1.0
|
||||
with:
|
||||
timezoneLinux: "America/New York"
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- run: mkdir ./.venv
|
||||
|
||||
- run: cp -r docs/** .
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
id: cache-dependencies
|
||||
with:
|
||||
path: ./.venv
|
||||
|
||||
2
.github/workflows/update_schemas.yml
vendored
2
.github/workflows/update_schemas.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
@ -9,4 +9,4 @@ name = "pypi"
|
||||
menagerie-docs = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.10"
|
||||
python_version = "3.11"
|
||||
|
||||
@ -32,3 +32,70 @@ Here's an example, for `russian.json`:
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# CLI Tool
|
||||
|
||||
Are you tired of manually translating JSON? Do you want an automatic translator? Well then the [nh-translation-helper](https://www.npmjs.com/package/nh-translation-helper){ target="_blank" } may be for you!
|
||||
|
||||
This tool has the following features:
|
||||
|
||||
- Extract text from XML files and create english.json as the translation source.
|
||||
- Translate english.json to create a json file for another language.
|
||||
|
||||
This section outlines how to install and use the nh-translation-helper.
|
||||
|
||||
## Installation
|
||||
|
||||
To get started, head over to the [repo for the tool](https://github.com/96-38/nh-translation-helper){ target="_blank" } and prepare the requirements:
|
||||
|
||||
- Install [Node.js](https://nodejs.org/){ target="_blank" } >= 12.0.0
|
||||
- Install the LTS version.
|
||||
- Get [DeepL API](https://www.deepl.com/docs-api){ target="_blank" } Key (Free or Pro)
|
||||
- Sign up [here](https://www.deepl.com/pro#developer){ target="_blank" }
|
||||
|
||||
When you are ready, execute the following command in a terminal or command prompt:
|
||||
|
||||
```bash
|
||||
npm i -g nh-translation-helper
|
||||
```
|
||||
|
||||
Now your installation is complete!
|
||||
|
||||
You can use the tool by executing the following command in a terminal or command prompt:
|
||||
|
||||
```bash
|
||||
nh-translation-helper
|
||||
```
|
||||
|
||||
## Generating a english.json from XML
|
||||
|
||||
Select `Generate english.json from XML files` and enter the path of your project folder.
|
||||
|
||||
You are done! a english.json has been generated in "*your_project_root*/translations/".
|
||||
|
||||
## Translating english.json to another language
|
||||
|
||||
Select `Translate JSON (DeepL API key required)` and enter the path of your project folder. ( Note: **Not** the path to the "translations" folder. )
|
||||
|
||||
Select the source and target languages.
|
||||
|
||||
You are done! a translated json file has been generated in "*your_project_root*/translations/".
|
||||
|
||||
Please enter the DeepL API key for the first time only. The API key will be saved on your PC.
|
||||
|
||||
## Note
|
||||
|
||||
- Not supported extracting UIDictionary and AchievementTranslations
|
||||
- It is difficult to parse these automatically, and the number of words is small that it would be better to add them by MOD developers manually for better results.
|
||||
- Translating UIDictionary and AchievementTranslations is supported.
|
||||
|
||||
- Not supported translation into Korean
|
||||
- Translation is provided by the DeepL API, so it is not possible to translate into languages that are not supported by DeepL.
|
||||
|
||||
- The generated translations are "**not**" perfect
|
||||
- It is a machine translation though DeepL. The translations on DeepL are known to be too casual or to abbreviate some sentences.
|
||||
- It will need to be manually corrected to make it a good translation. However, this tool allows you to prototype and is more efficient than starting from scratch. Also, the CDATA tag has been removed from the translated text and must be added manually.
|
||||
|
||||
- Parsing errors may occur when trying to translate manually created JSON files
|
||||
- In many cases, this is due to a specific comment in the JSON. Please remove the comments and try again.
|
||||
- Most comments are processed normally, but errors may occur if the comment contains special symbols or if the comment is located at the end of a JSON object.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user