From 20c9c6c47833e696c16d2394d4df35c2387560b5 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Tue, 8 May 2018 09:19:56 +0200 Subject: [PATCH] Update crowdin for wiki localization --- .gitignore | 2 +- crowdin.yaml | 8 -------- crowdin.yml | 20 +++++++++++++++++++ tools/crowdin-cli/README.md | 2 +- tools/crowdin-cli/archi_download.bat | 2 +- tools/crowdin-cli/archi_sync.bat | 4 ++-- tools/crowdin-cli/archi_upload.bat | 2 +- ...mple.yaml => crowdin_identity_example.yml} | 0 8 files changed, 26 insertions(+), 14 deletions(-) delete mode 100644 crowdin.yaml create mode 100644 crowdin.yml rename tools/crowdin-cli/{crowdin_identity_example.yaml => crowdin_identity_example.yml} (100%) diff --git a/.gitignore b/.gitignore index f7663e228..db8aab249 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ out ArchiSteamFarm/out # Ignore crowdin CLI secret -tools/crowdin-cli/crowdin_identity.yaml +tools/crowdin-cli/crowdin_identity.yml ################# ## Visual Studio diff --git a/crowdin.yaml b/crowdin.yaml deleted file mode 100644 index f56596f68..000000000 --- a/crowdin.yaml +++ /dev/null @@ -1,8 +0,0 @@ -"preserve_hierarchy": true -files: - - source: /ArchiSteamFarm/Localization/Strings.resx - translation: /ArchiSteamFarm/Localization/Strings.%locale%.resx - - source: /ArchiSteamFarm/www/locale/strings.json - translation: /ArchiSteamFarm/www/locale/strings.%locale%.json - - source: /WebConfigGenerator/src/locale/strings.json - translation: /WebConfigGenerator/src/locale/%locale%.json diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 000000000..a03dc74e4 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,20 @@ +"preserve_hierarchy": true +"files": [ + { + "source": "/ArchiSteamFarm/Localization/Strings.resx", + "translation": "/ArchiSteamFarm/Localization/Strings.%locale%.resx" + }, + { + "source": "/ArchiSteamFarm/www/locale/strings.json", + "translation": "/ArchiSteamFarm/www/locale/strings.%locale%.json" + }, + { + "source": "/WebConfigGenerator/src/locale/strings.json", + "translation": "/WebConfigGenerator/src/locale/%locale%.json" + }, + { + "source": "/wiki/*.md", + "translation": "/wiki/locale/%file_name%-%locale%.%file_extension%", + "ignore": [ "/**/_*.md" ] + } +] \ No newline at end of file diff --git a/tools/crowdin-cli/README.md b/tools/crowdin-cli/README.md index 3ce126615..f5f494d5c 100644 --- a/tools/crowdin-cli/README.md +++ b/tools/crowdin-cli/README.md @@ -15,7 +15,7 @@ This tool is being used by ASF developers for synchronization of strings/transla ## Before you begin -- Make sure that your `crowdin_identity.yaml` 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.yaml` and fill `api_key` that can be found **[here](http://l10n.asf.justarchi.net/project/archisteamfarm/settings#api)**. +- 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](http://l10n.asf.justarchi.net/project/archisteamfarm/settings#api)**. - Ensure that `crowdin` command is recognized by your OS. diff --git a/tools/crowdin-cli/archi_download.bat b/tools/crowdin-cli/archi_download.bat index 5a85d883a..f8e49a319 100644 --- a/tools/crowdin-cli/archi_download.bat +++ b/tools/crowdin-cli/archi_download.bat @@ -1,7 +1,7 @@ @echo off pushd %~dp0 cd ..\\.. -call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yaml download +call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yml download git reset git add -A "ArchiSteamFarm\Localization\*.resx" "ArchiSteamFarm\www\locale\*.json" "WebConfigGenerator\src\locale\*.json" git commit -m "Translations update" diff --git a/tools/crowdin-cli/archi_sync.bat b/tools/crowdin-cli/archi_sync.bat index f7454aa10..8b2524dd9 100644 --- a/tools/crowdin-cli/archi_sync.bat +++ b/tools/crowdin-cli/archi_sync.bat @@ -1,8 +1,8 @@ @echo off pushd %~dp0 cd ..\\.. -call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yaml upload sources -call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yaml download +call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yml upload sources +call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yml download git reset git add -A "ArchiSteamFarm\Localization\*.resx" "ArchiSteamFarm\www\locale\*.json" "WebConfigGenerator\src\locale\*.json" git commit -m "Translations update" diff --git a/tools/crowdin-cli/archi_upload.bat b/tools/crowdin-cli/archi_upload.bat index d7c5c6a24..10de07ad3 100644 --- a/tools/crowdin-cli/archi_upload.bat +++ b/tools/crowdin-cli/archi_upload.bat @@ -1,5 +1,5 @@ @echo off pushd %~dp0 cd ..\\.. -call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yaml upload sources +call crowdin -b master --identity tools\\crowdin-cli\\crowdin_identity.yml upload sources pause diff --git a/tools/crowdin-cli/crowdin_identity_example.yaml b/tools/crowdin-cli/crowdin_identity_example.yml similarity index 100% rename from tools/crowdin-cli/crowdin_identity_example.yaml rename to tools/crowdin-cli/crowdin_identity_example.yml