Update crowdin instructions for linux

This commit is contained in:
JustArchi
2018-07-20 01:37:27 +02:00
parent 8ff4c6cba0
commit a044b6d460
5 changed files with 75 additions and 7 deletions

View File

@@ -17,23 +17,29 @@ This tool is being used by ASF developers for synchronization of strings/transla
- Make sure that your `crowdin_identity.yml` file exists - this is the file with login credentials that is not being committed to GitHub. If it doesn't exist yet (e.g. because you've just cloned the repo), create it from `crowdin_identity_example.yml` and fill `api_key` that can be found **[here](https://crowdin.com/project/archisteamfarm/settings#api)**.
- Ensure that `crowdin` command is recognized by your OS.
---
## Installation
### Windows
- Install **[Java JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)**.
- Install **[Java JRE](http://www.oracle.com/technetwork/java/javase/downloads/index.html)** (or entire JDK).
- **[Set JAVA_HOME properly](https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html)**.
- Launch `setup_crowdin.bat` as administrator.
- Open new `cmd` prompt and verify that `crowdin help` indeed works.
### Linux
- Install **[OpenJDK JRE](http://openjdk.java.net/install)** (or entire JDK).
- **[Set JAVA_HOME properly](https://stackoverflow.com/questions/24641536/how-to-set-java-home-in-linux-for-all-users)**.
- Launch `crowdin.sh` as root.
Afterwards you should verify in shell that `crowdin help` command is recognized.
---
## Usage
- `archi_upload.ps1` for pushing strings to Crowdin.
- `archi_upload` for pushing strings to Crowdin.
- `archi_download.ps1` for downloading translations from Crowdin (typically last commit before release).
- `archi_download` for downloading translations from Crowdin.
- `archi_sync.ps1` for upload + download (tree sync).
- `archi_sync` for upload + download.

View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -eu
cd "$(dirname "$(readlink -f "$0")")"
cd ../..
crowdin -b master --identity tools/crowdin-cli/crowdin_identity.yml download
git reset
cd wiki
git pull
git add -A "locale/*.md"
git commit -m "Translations update"
cd ..
git add -A "ArchiSteamFarm/Localization/*.resx" "ArchiSteamFarm/www/locale/*.json" "WebConfigGenerator/src/locale/*.json" "wiki"
git commit -m "Translations update"
git push --recurse-submodules=on-demand
read -p "Press enter to continue..."

28
tools/crowdin-cli/archi_sync.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -eu
cd "$(dirname "$(readlink -f "$0")")"
cd ../..
cd wiki
git reset --hard
git clean -fd
git pull
cd ..
crowdin -b master --identity tools/crowdin-cli/crowdin_identity.yml upload sources
crowdin -b master --identity tools/crowdin-cli/crowdin_identity.yml download
git reset
cd wiki
git pull
git add -A "locale/*.md"
git commit -m "Translations update"
cd ..
git add -A "ArchiSteamFarm/Localization/*.resx" "ArchiSteamFarm/www/locale/*.json" "WebConfigGenerator/src/locale/*.json" "wiki"
git commit -m "Translations update"
git push --recurse-submodules=on-demand
read -p "Press enter to continue..."

View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -eu
cd "$(dirname "$(readlink -f "$0")")"
cd ../..
cd wiki
git reset --hard
git clean -fd
git pull
cd ..
crowdin -b master --identity tools/crowdin-cli/crowdin_identity.yml upload sources
read -p "Press enter to continue..."

0
tools/crowdin-cli/crowdin.sh Normal file → Executable file
View File